diff options
| author | Will Deacon <will@kernel.org> | 2026-11-03 13:35:39 +0000 |
|---|---|---|
| committer | Marc Zyngier <maz@kernel.org> | 2026-11-03 14:46:04 +0000 |
| commit | 9d447709895d3977e207dd1bc01a30f5c0f76156 (patch) | |
| tree | 4583c0423e326ff8e7420252b996df0b45c99272 /tools/perf/scripts/python | |
| parent | 4bc0c9cd84767a978046c3b2a73dc932bdb8d9f9 (diff) | |
KVM: arm64: Use S1E1A when Stage-1 PIE is supported
On a system with stage-1 PIE, a guest can try to execute from an
execute-only mapping at stage-1 but trigger a permission fault at
stage-2 if the stage-2 mapping is execute-never.
In this case, the EL2 permission fault handler will attempt to translate
the faulting VA using an AT S1E1R operation, which will fail due to the
lack of read permission at stage-1. We will then return to the guest and
take the exact same fault the next time around.
Similarly to commit 55f4b215fb60 ("KVM: arm64: use `at s1e1a` for POE"),
use the S1E1A operation to bypass stage-1 permission checks when
obtaining the IPA for a stage-2 permission fault. Like FEAT_S1POE,
FEAT_S1PIE implies FEAT_ATS1A, so extend the existing AT invocation in
__translate_far_to_hpfar() to use the permission-bypassing variant when
S1PIE is implemented.
Cc: Marc Zyngier <maz@kernel.org>
Cc: Oliver Upton <oupton@kernel.org>
Cc: Fuad Tabba <fuad.tabba@linux.dev>
Cc: Joey Gouly <joey.gouly@arm.com>
Cc: Steffen Eiden <seiden@linux.ibm.com>
Cc: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
Link: https://patch.msgid.link/20261103133540.29566-1-will@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
