From: sashiko-bot@kernel.org
To: "Dennis Reußwig" <dennis@reusswig.codes>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH 03/10] KVM: VMX: Report shadow-stack accesses in EPT violations as PFERR_SS
Date: Thu, 03 Dec 2026 23:59:54 +0000 [thread overview]
Message-ID: <sashiko-outbox-248797@kernel.org> (raw)
In-Reply-To: <20261204-nested-sss-v1-3-57de06f58b2b@reusswig.codes>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] KVM: x86/mmu: stale comment in permission_fault() about EPT
PFERR_SS_MASK
--
commit c0dab1dec45e42b4de309f5d5842522ed551086c
Author: Dennis Reußwig <dennis@reusswig.codes>
KVM: VMX: Report shadow-stack accesses in EPT violations as PFERR_SS
This commit defines EPT_VIOLATION_SHADOW_STACK for bit 13 of the EPT
violation exit qualification and translates it into PFERR_SS_MASK in
__vt_handle_ept_violation().
> diff --git a/arch/x86/kvm/vmx/common.h b/arch/x86/kvm/vmx/common.h
> index b2905335a2d21..eb60ba97074cf 100644
> --- a/arch/x86/kvm/vmx/common.h
> +++ b/arch/x86/kvm/vmx/common.h
> @@ -144,6 +144,9 @@ static inline int __vt_handle_ept_violation(struct kvm_vcpu *vcpu, gpa_t gpa,
> /* Is it a fetch fault? */
> error_code |= (exit_qualification & EPT_VIOLATION_ACC_INSTR)
> ? PFERR_FETCH_MASK : 0;
> + /* Is it a shadow-stack access? */
> + error_code |= (exit_qualification & EPT_VIOLATION_SHADOW_STACK)
> + ? PFERR_SS_MASK : 0;
> /* ept page table entry is present? */
> error_code |= (exit_qualification &
> (EPT_VIOLATION_PROT_MASK & ~EPT_VIOLATION_PROT_USER_EXEC))
[Severity: Low]
Should the comment in permission_fault() be updated now that EPT
violations pass PFERR_SS_MASK through kvm_mmu_page_fault()?
arch/x86/kvm/mmu.h:permission_fault() {
...
/*
* Of the error codes that do not contribute to the index in
* fmt->permissions, PK and SS are not supported by shadow paging
* and also not provided to EPT violations, but SS *is* included
* in the NPT exit code. RSVD faults are handled elsewhere.
*/
unsigned int pfec = access & ~PFERR_SS_MASK;
...
}
With this change, PFERR_SS_MASK is now provided on EPT violations as well
as NPT exit codes, so the comment is stale (though permission_fault()
already masks off PFERR_SS_MASK, so there is no functional impact).
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261204-nested-sss-v1-0-57de06f58b2b@reusswig.codes?part=3
next prev parent reply other threads:[~2026-12-03 23:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 23:49 [PATCH 00/10] KVM: nVMX: Supervisor shadow-stack control for nested EPT and CET with eVMCS Dennis Reußwig
2026-12-03 23:49 ` [PATCH 01/10] KVM: nVMX: Allow CET entry/exit controls with enlightened VMCS Dennis Reußwig
2026-12-03 23:49 ` [PATCH 02/10] KVM: x86/mmu: Move TDP A/D tracking type to SPTE bits 56-57 Dennis Reußwig
2026-12-03 23:49 ` [PATCH 03/10] KVM: VMX: Report shadow-stack accesses in EPT violations as PFERR_SS Dennis Reußwig
2026-12-03 23:59 ` sashiko-bot [this message]
2026-12-03 23:49 ` [PATCH 04/10] KVM: x86/mmu: Handle the EPT supervisor shadow-stack bit like a write bit Dennis Reußwig
2026-12-03 23:49 ` [PATCH 05/10] KVM: nVMX: Shadow supervisor shadow-stack control of nested EPT Dennis Reußwig
2026-12-03 23:49 ` [PATCH 06/10] KVM: nVMX: Advertise supervisor shadow-stack control for " Dennis Reußwig
2026-12-03 23:49 ` [PATCH 07/10] KVM: selftests: Add helpers for nested EPT shadow-stack and MBEC tests Dennis Reußwig
2026-12-03 23:49 ` [PATCH 08/10] KVM: selftests: Add nested EPT supervisor shadow-stack test Dennis Reußwig
2026-12-04 0:00 ` sashiko-bot
2026-12-03 23:49 ` [PATCH 09/10] KVM: selftests: Add nested EPT mode-based execute control test Dennis Reußwig
2026-12-03 23:49 ` [PATCH 10/10] KVM: selftests: Check VMX capabilities for CET in L2 with MBEC Dennis Reußwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-248797@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dennis@reusswig.codes \
--cc=kvm@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox