aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/mpi/mpi-mul.c
diff options
context:
space:
mode:
authorMarc Zyngier <[email protected]>2025-06-03 07:08:21 +0000
committerMarc Zyngier <[email protected]>2025-06-05 13:17:32 +0000
commit6678791ee3da0b78c28fe7d77814097f53cbb8df (patch)
treed2db955a4088aa3a9ea9991c901f1ce29678451d /lib/crypto/mpi/mpi-mul.c
parentKVM: arm64: vgic-debug: Avoid dereferencing NULL ITE pointer (diff)
downloadkernel-6678791ee3da0b78c28fe7d77814097f53cbb8df.tar.gz
kernel-6678791ee3da0b78c28fe7d77814097f53cbb8df.zip
KVM: arm64: Add assignment-specific sysreg accessor
Assigning a value to a system register doesn't do what it is supposed to be doing if that register is one that has RESx bits. The main problem is that we use __vcpu_sys_reg(), which can be used both as a lvalue and rvalue. When used as a lvalue, the bit masking occurs *before* the new value is assigned, meaning that we (1) do pointless work on the old cvalue, and (2) potentially assign an invalid value as we fail to apply the masks to it. Fix this by providing a new __vcpu_assign_sys_reg() that does what it says on the tin, and sanitises the *new* value instead of the old one. This comes with a significant amount of churn. Reviewed-by: Miguel Luis <[email protected]> Reviewed-by: Oliver Upton <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Zyngier <[email protected]>
Diffstat (limited to 'lib/crypto/mpi/mpi-mul.c')
0 files changed, 0 insertions, 0 deletions