diff options
| author | 2025-10-30 11:58:02 -0700 | |
|---|---|---|
| committer | 2025-11-04 09:14:21 -0800 | |
| commit | 9bc610b6a2a71d1a6acac27e82a0bc8ca861c7ac (patch) | |
| tree | 7a6756a521064cf84a7a7d1de845e51f67e09fca /rust/kernel/debugfs/git:/ssh:/git@git.zx2c4.com | |
| parent | KVM: x86: Unload "FPU" state on INIT if and only if its currently in-use (diff) | |
| download | wireguard-linux-9bc610b6a2a71d1a6acac27e82a0bc8ca861c7ac.tar.xz wireguard-linux-9bc610b6a2a71d1a6acac27e82a0bc8ca861c7ac.zip | |
KVM: x86: Harden KVM against imbalanced load/put of guest FPU state
Assert, via KVM_BUG_ON(), that guest FPU state isn't/is in use when
loading/putting the FPU to help detect KVM bugs without needing an assist
from KASAN. If an imbalanced load/put is detected, skip the redundant
load/put to avoid clobbering guest state and/or crashing the host.
Note, kvm_access_xstate_msr() already provides a similar assertion.
Reviewed-by: Yao Yuan <yaoyuan@linux.alibaba.com>
Reviewed-by: Chao Gao <chao.gao@intel.com>
Link: https://patch.msgid.link/20251030185802.3375059-3-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'rust/kernel/debugfs/git:/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions
