summaryrefslogtreecommitdiff
path: root/arch/arm64/mm/proc.S
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2024-03-12 20:00:20 +0000
committerCatalin Marinas <catalin.marinas@arm.com>2024-03-13 10:53:20 +0000
commit69ebc0182406541f0be0f086cdfff13ac56e7385 (patch)
tree30d949dc857a11ebd5ebd5920b49cbc46edd65f6 /arch/arm64/mm/proc.S
parentf1bbc4e9cfa4c0f29883171e9d01c01cbe94becc (diff)
Revert "arm64: mm: add support for WXN memory translation attribute"
This reverts commit 50e3ed0f93f4f62ed2aa83de5db6cb84ecdd5707. The SCTLR_EL1.WXN control forces execute-never when a page has write permissions. While the idea of hardening such write/exec combinations is good, with permissions indirection enabled (FEAT_PIE) this control becomes RES0. FEAT_PIE introduces a slightly different form of WXN which only has an effect when the base permission is RWX and the write is toggled by the permission overlay (FEAT_POE, not yet supported by the arm64 kernel). Revert the patch for now. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Link: https://lore.kernel.org/r/ZfGESD3a91lxH367@arm.com
Diffstat (limited to 'arch/arm64/mm/proc.S')
-rw-r--r--arch/arm64/mm/proc.S6
1 files changed, 0 insertions, 6 deletions
diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S
index bfd2ad896108..9d40f3ffd8d2 100644
--- a/arch/arm64/mm/proc.S
+++ b/arch/arm64/mm/proc.S
@@ -546,12 +546,6 @@ alternative_else_nop_endif
* Prepare SCTLR
*/
mov_q x0, INIT_SCTLR_EL1_MMU_ON
-#ifdef CONFIG_ARM64_WXN
- ldr_l x1, arm64_sw_feature_override + FTR_OVR_VAL_OFFSET
- tst x1, #0xf << ARM64_SW_FEATURE_OVERRIDE_NOWXN
- orr x1, x0, #SCTLR_ELx_WXN
- csel x0, x0, x1, ne
-#endif
ret // return to head.S
.unreq mair