git: 1b3698a38f88 - stable/15 - arm64/pmap: Fix invalidate_icache condition in stage2 fault
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 22 Nov 2026 18:44:12 UTC
The branch stable/15 has been updated by alc:
URL: https://cgit.FreeBSD.org/src/commit/?id=1b3698a38f88ac27cba4b1a65e39a0f53e3c73e7
commit 1b3698a38f88ac27cba4b1a65e39a0f53e3c73e7
Author: Kajetan Puchalski <kajetan.puchalski@arm.com>
AuthorDate: 2026-09-08 11:21:52 +0000
Commit: Alan Cox <alc@FreeBSD.org>
CommitDate: 2026-11-22 18:34:03 +0000
arm64/pmap: Fix invalidate_icache condition in stage2 fault
pmap_stage2_fault is supposed to invalidate the icache if it is
accessing an executable page. Instead, the condition currently checks
whether execution is disallowed at any EL. Make it check whether
execution is allowed at any EL to match the intended behaviour.
Signed-off-by: Kajetan Puchalski <kajetan.puchalski@arm.com>
Reviewed by: andrew
Sponsored by: Arm Ltd
Pull Request: https://github.com/freebsd/freebsd-src/pull/2416
(cherry picked from commit 728d9f322935905c09236e8312b3268b6ff8691b)
---
sys/arm64/arm64/pmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c
index 1a0a1abf5e51..a8ab4423d0a8 100644
--- a/sys/arm64/arm64/pmap.c
+++ b/sys/arm64/arm64/pmap.c
@@ -9468,7 +9468,7 @@ fault_exec:
* of Coherency.
*/
if ((pte & ATTR_S2_XN_MASK) !=
- ATTR_S2_XN(ATTR_S2_XN_NONE)) {
+ ATTR_S2_XN(ATTR_S2_XN_ALL)) {
invalidate_icache();
}
pmap_set_bits(ptep, ATTR_AF | ATTR_DESCR_VALID);