acrn-kernel/arch/x86/kvm/svm
Borislav Petkov (AMD) e4679a0342 x86/CPU/AMD: Fix the DIV(0) initial fix attempt
commit f58d6fbcb7 upstream.

Initially, it was thought that doing an innocuous division in the #DE
handler would take care to prevent any leaking of old data from the
divider but by the time the fault is raised, the speculation has already
advanced too far and such data could already have been used by younger
operations.

Therefore, do the innocuous division on every exit to userspace so that
userspace doesn't see any potentially old data from integer divisions in
kernel space.

Do the same before VMRUN too, to protect host data from leaking into the
guest too.

Fixes: 77245f1c3c ("x86/CPU/AMD: Do not leak quotient data after a division by 0")
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Cc: <stable@kernel.org>
Link: https://lore.kernel.org/r/20230811213824.10025-1-bp@alien8.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-26 13:27:00 +02:00
..
avic.c
hyperv.h
nested.c
pmu.c
sev.c KVM: SEV: only access GHCB fields once 2023-08-16 18:27:20 +02:00
svm.c x86/CPU/AMD: Fix the DIV(0) initial fix attempt 2023-08-26 13:27:00 +02:00
svm.h KVM: SEV: snapshot the GHCB before accessing it 2023-08-16 18:27:20 +02:00
svm_onhyperv.c
svm_onhyperv.h
svm_ops.h
vmenter.S