]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: x86/mmu: WARN on attempt to check permissions for Shadow Stack #PF
authorSean Christopherson <seanjc@google.com>
Fri, 19 Sep 2025 22:32:28 +0000 (15:32 -0700)
committerSean Christopherson <seanjc@google.com>
Tue, 23 Sep 2025 16:16:53 +0000 (09:16 -0700)
commit296599346c671f31854d674db2891ff2e1654b6a
tree27715e802c9de7bc8596a5895cab852ca950a171
parentd4c03f63957c66bc95f5f33052f8b4be804631c3
KVM: x86/mmu: WARN on attempt to check permissions for Shadow Stack #PF

Add PFERR_SS_MASK, a.k.a. Shadow Stack access, and WARN if KVM attempts to
check permissions for a Shadow Stack access as KVM hasn't been taught to
understand the magic Writable=0,Dirty=1 combination that is required for
Shadow Stack accesses, and likely will never learn.  There are no plans to
support Shadow Stacks with the Shadow MMU, and the emulator rejects all
instructions that affect Shadow Stacks, i.e. it should be impossible for
KVM to observe a #PF due to a shadow stack access.

Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://lore.kernel.org/r/20250919223258.1604852-22-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/mmu.h