From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796342395; b=GRGckOlkWOT57Wlcv3gH/UKP9+8w4NGhE0nYpHD8RvxZak+08vgSSiL2bs+ge2PsA4pP 5yhnaKIYvN58AeW+E7JGvQA6mT3cgUNo2wTcvMX1oPutwmk1IgUPvfqAM7PNthmZKz92K GT/39S5x9ZJPhODueyc10zxGc1MO5GmFnEFbd9ecCdN61qnkU74b5ijmVD3UmKYcESQFn bqFzaTg1dnIPdkl9Sc77npuF+DXEJRK9nk19MFMYjxgFQ/PoJw2Vlmbco1YP9B9Xje1pE rLZX+IEG0uhervdp8kqB1W9CJRu/GNwmJkYi8mBHwBmK6zlHSKWyzsPP/L+yB7tdNjg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796342395; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=efW30+TycwmQGIrGt+W7EDAE5ylb7qciCqsuUfESiA0=; b=ReGuIQ+H3hKx4efELyzfTX+Od+X4M6ltCVD12ZgtvJoh+EdMW0Du/E3pD69Dy39WsYjx bFTRaCOt/6LQcj2stb1hyFkKTw0WPgXZfNvqVDtmcmsQAS9MvM/2scRn7mYbNVweAEzPM q2t6pDFu87I6SbVcWOSrASVi8pQRP0gaHtpfq5DoFlOduZPFYfRGJ7+bm18ony/dV4hs0 DO1KRwI/xW84KIZaVYHz3HKHuVXKOfPFyz/zcQocW8tNStIKBisXdGgSYSfXvtaqG4gTj XbWxaOkAc878X23wz2yObbJqHLgc7fkIWiQ9JcwzYKw9XqJ+58O9kx9iCD+bKcPRikQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="Uku+p4q/"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 314E8606A322 for ; Thu, 3 Dec 2026 23:59:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Uku+p4q/ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A9991F000C2; Thu, 3 Dec 2026 23:59:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796342394; bh=efW30+TycwmQGIrGt+W7EDAE5ylb7qciCqsuUfESiA0=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=Uku+p4q/OS3oBeCbCQ1jdUZuOnlhj1dVrq14UyPXg3LOdpyWLXv95Gpr+8PS7lOi2 Z6ugVhvsgHqN0ZC0aHpWw2oJZuDyDyrfhRfu3oqCoUVUBnBF1TdnNWg8Z59jqpTW1O UaXoJhlZpHyJDFBtUSVmJDtraXpIs6LBIheEgyFRq7vfil+WLKi92/TGJE4JHCYQHj Tm9KpVh+7agUHpytHylLzBfXj37E8DDADsd2VMq5u//ulluxQiqqWphUfDU1KUp1u5 vA7jssT7aaE6Pe8IwO1WEV+Xd2wZnIzx3nrLMFPhsvWomR+3bxYkhsTLwn/1ZG2yQJ rtYaZUnYzj11g== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 03/10] KVM: VMX: Report shadow-stack accesses in EPT violations as PFERR_SS Reply-To: sashiko-reviews@lists.linux.dev To: =?utf-8?b?RGVubmlzIFJldcOfd2ln?= Cc: kvm@vger.kernel.org In-Reply-To: <20261204-nested-sss-v1-3-57de06f58b2b@reusswig.codes> References: <20261204-nested-sss-v1-0-57de06f58b2b@reusswig.codes> <20261204-nested-sss-v1-3-57de06f58b2b@reusswig.codes> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 23:59:54 +0000 X-Mailing-List: kvm@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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=C3=9Fwig 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 kv= m_vcpu *vcpu, gpa_t gpa, > /* Is it a fetch fault? */ > error_code |=3D (exit_qualification & EPT_VIOLATION_ACC_INSTR) > ? PFERR_FETCH_MASK : 0; > + /* Is it a shadow-stack access? */ > + error_code |=3D (exit_qualification & EPT_VIOLATION_SHADOW_STACK) > + ? PFERR_SS_MASK : 0; > /* ept page table entry is present? */ > error_code |=3D (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 =3D 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). --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204-nested-sss= -v1-0-57de06f58b2b@reusswig.codes?part=3D3