summaryrefslogtreecommitdiff
path: root/test/py/tests/test_stackprotector.py
diff options
context:
space:
mode:
authorIlias Apalodimas <[email protected]>2025-02-20 15:54:43 +0200
committerIlias Apalodimas <[email protected]>2025-03-14 13:37:54 +0200
commitfb553201b67aededdc794f3a0880e386771cbd58 (patch)
tree3050611012b20a57a1e08e1d1d399ae1d6ac2499 /test/py/tests/test_stackprotector.py
parentec1c6cfb1cfce92909a248f10c36bd8b18894d7e (diff)
arm64: Enable RW, RX and RO mappings for the relocated binary
Now that we have everything in place switch the page permissions for .rodata, .text and .data just after we relocate everything in top of the RAM. Unfortunately we can't enable this by default, since we have examples of U-Boot crashing due to invalid access. This usually happens because code defines const variables that it later writes. So hide it behind a Kconfig option until we sort it out. It's worth noting that EFI runtime services are not covered by this patch on purpose. Since the OS can call SetVirtualAddressMap which can relocate runtime services, we need to set them to RX initially but remap them as RWX right before ExitBootServices. Link: https://lore.kernel.org/u-boot/[email protected]/ Link: https://lore.kernel.org/u-boot/[email protected]/ Reviewed-by: Jerome Forissier <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Signed-off-by: Ilias Apalodimas <[email protected]>
Diffstat (limited to 'test/py/tests/test_stackprotector.py')
0 files changed, 0 insertions, 0 deletions