public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2]  KVM: x86/mmu: nEPT X-only unsync bug fix
@ 2022-05-13 19:49 Sean Christopherson
  2022-05-13 19:49 ` [PATCH 1/2] KVM: x86/mmu: Drop RWX=0 SPTEs during ept_sync_page() Sean Christopherson
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Sean Christopherson @ 2022-05-13 19:49 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Sean Christopherson, Vitaly Kuznetsov, Wanpeng Li, Jim Mattson,
	Joerg Roedel, kvm, linux-kernel, David Matlack, Ben Gardon

Fix a contrived bug where KVM can create a shadow-present SPTE with RWX=0
if L1 modifies an existing RX or RWX 4kb SPTE to be X-only and the combined
permissions for the upper level SPTEs yield !X.

Patch 2 adds a comment explaining why FNAME(sync_page) isn't repsonsible
for flushing synchronized entries that reduce protections, e.g. drop X
(or add NX).  Lack of a flush made me do a double-take and a lot of
staring.

Sean Christopherson (2):
  KVM: x86/mmu: Drop RWX=0 SPTEs during ept_sync_page()
  KVM: x86/mmu: Comment FNAME(sync_page) to document TLB flushing logic

 arch/x86/kvm/mmu/paging_tmpl.h | 18 +++++++++++++++++-
 arch/x86/kvm/mmu/spte.c        |  2 ++
 2 files changed, 19 insertions(+), 1 deletion(-)


base-commit: 2764011106d0436cb44702cfb0981339d68c3509
-- 
2.36.0.550.gb090851708-goog


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

end of thread, other threads:[~2022-05-20 13:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-13 19:49 [PATCH 0/2] KVM: x86/mmu: nEPT X-only unsync bug fix Sean Christopherson
2022-05-13 19:49 ` [PATCH 1/2] KVM: x86/mmu: Drop RWX=0 SPTEs during ept_sync_page() Sean Christopherson
2022-05-13 20:54   ` David Matlack
2022-05-14  0:55     ` Sean Christopherson
2022-05-16 22:22       ` David Matlack
2022-05-17  3:52         ` Sean Christopherson
2022-05-13 19:50 ` [PATCH 2/2] KVM: x86/mmu: Comment FNAME(sync_page) to document TLB flushing logic Sean Christopherson
2022-05-13 20:27   ` Jim Mattson
2022-05-20 13:31 ` [PATCH 0/2] KVM: x86/mmu: nEPT X-only unsync bug fix Paolo Bonzini

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