mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] KVM: x86: Syzkaller nested_run_pending defense
@ 2026-03-12 23:48 Sean Christopherson
  2026-03-12 23:48 ` [PATCH v2 1/2] KVM: x86: Move nested_run_pending to kvm_vcpu_arch Sean Christopherson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sean Christopherson @ 2026-03-12 23:48 UTC (permalink / raw)
  To: Sean Christopherson, Paolo Bonzini; +Cc: kvm, linux-kernel, Yosry Ahmed

Stop playing a losing game of whack-a-mole with syzkaller over
nested_run_pending, and simply treat the flag as "untrusted" if userspace gains
control of the vCPU.  I.e. don't WARN if userspace _may_ have stuffed vCPU
state to force an impossible VM-Exit.

The signal:noise ratio for nested_run_pending WARNs when syzkaller is fuzzing
nVMX/nSVM is awful, and playing whack-a-mole with syzkaller is doing more harm
that good at this point.  While it's possible syzkaller could find an actual
KVM bug by stuffing vCPU state, if the _only_ symptom is the nested_run_pending
WARN, then in theory the bug should also be hittable by stuffing L2 state prior
to nested VM-Enter.

v2:
 - Put the state transition in kvm_x86_vcpu_pre_run(). [Yosry]
 - Add Yosry's review.

v1: https://lore.kernel.org/all/20260310224546.2582118-1-seanjc@google.com

Sean Christopherson (1):
  KVM: x86: Suppress WARNs on nested_run_pending after userspace exit

Yosry Ahmed (1):
  KVM: x86: Move nested_run_pending to kvm_vcpu_arch

 arch/x86/include/asm/kvm_host.h | 15 ++++++++++
 arch/x86/kvm/svm/nested.c       | 23 ++++++++-------
 arch/x86/kvm/svm/svm.c          | 16 +++++------
 arch/x86/kvm/svm/svm.h          |  4 ---
 arch/x86/kvm/vmx/nested.c       | 50 +++++++++++++++++----------------
 arch/x86/kvm/vmx/vmx.c          | 16 +++++------
 arch/x86/kvm/vmx/vmx.h          |  3 --
 arch/x86/kvm/x86.c              |  7 +++++
 arch/x86/kvm/x86.h              | 10 +++++++
 9 files changed, 87 insertions(+), 57 deletions(-)


base-commit: bfd7f4adc1230373c25e1b787a6f1ee407eb0656
-- 
2.53.0.851.ga537e3e6e9-goog


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-04-08  0:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-12 23:48 [PATCH v2 0/2] KVM: x86: Syzkaller nested_run_pending defense Sean Christopherson
2026-03-12 23:48 ` [PATCH v2 1/2] KVM: x86: Move nested_run_pending to kvm_vcpu_arch Sean Christopherson
2026-03-12 23:48 ` [PATCH v2 2/2] KVM: x86: Suppress WARNs on nested_run_pending after userspace exit Sean Christopherson
2026-04-08  0:14 ` [PATCH v2 0/2] KVM: x86: Syzkaller nested_run_pending defense Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®