https://github.com/torvalds/linux
Revision 053d2290c0307e3642e75e0185ddadf084dc36c1 authored by Sean Christopherson on 02 May 2022, 22:18:50 UTC, committed by Paolo Bonzini on 06 May 2022, 17:08:06 UTC
Exit to userspace with an emulation error if KVM encounters an injected
exception with invalid guest state, in addition to the existing check of
bailing if there's a pending exception (KVM doesn't support emulating
exceptions except when emulating real mode via vm86).

In theory, KVM should never get to such a situation as KVM is supposed to
exit to userspace before injecting an exception with invalid guest state.
But in practice, userspace can intervene and manually inject an exception
and/or stuff registers to force invalid guest state while a previously
injected exception is awaiting reinjection.

Fixes: fc4fad79fc3d ("KVM: VMX: Reject KVM_RUN if emulation is required with pending exception")
Reported-by: syzbot+cfafed3bb76d3e37581b@syzkaller.appspotmail.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220502221850.131873-1-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 0c2c7c0
History
Tip revision: 053d2290c0307e3642e75e0185ddadf084dc36c1 authored by Sean Christopherson on 02 May 2022, 22:18:50 UTC
KVM: VMX: Exit to userspace if vCPU has injected exception and invalid state
Tip revision: 053d229
File Mode Size
Documentation
LICENSES
arch
block
certs
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format -rw-r--r-- 16.6 KB
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 71 bytes
.gitattributes -rw-r--r-- 62 bytes
.gitignore -rw-r--r-- 1.9 KB
.mailmap -rw-r--r-- 22.2 KB
COPYING -rw-r--r-- 496 bytes
CREDITS -rw-r--r-- 98.9 KB
Kbuild -rw-r--r-- 1.3 KB
Kconfig -rw-r--r-- 555 bytes
MAINTAINERS -rw-r--r-- 641.4 KB
Makefile -rw-r--r-- 63.6 KB
README -rw-r--r-- 727 bytes

README

back to top