kernel/arm: set PXN for user memory

* set PXN for all page tables below KERNEL_BASE
* also set PXN for physical page mapper

PXN, Privileged execute-never

When the PXN bit is 1, a Permission fault is generated if the processor
is executing at PL1 and attempts to execute an instruction fetched from
the corresponding memory region.

Change-Id: I3056cbed151004ac9edfbc81ebeada328aeb603c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5607
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
David Karoly
2022-09-02 16:24:08 +00:00
committed by waddlesplash
parent c0a7601219
commit 3d79cd3332
3 changed files with 7 additions and 8 deletions
@@ -38,6 +38,7 @@
// 31 10 9 8 5 432 10
// | page table address |0| domain |000|01|
#define ARM_MMU_L1_FLAG_PXN 0x00000004
// the domain is not used so and the ? is implementation specified... have not
// found it in the cortex A8 reference... so I set t to 0