HomeFreeBSD

arm64: Reduce the kernel executable pages

Description

arm64: Reduce the kernel executable pages

When creating the kernel page tables we create them all executable to
allow the kernel to boot.

We can reduce the number of l2 blocks or l3 pages created as executable
by looking where the end of the .text section is and only marking
memory up to this as executable (rounded up to the block/page size).

Memory after the .text is marked as execute never as it will be data.

Reviewed by: alc
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D45063

Details

Provenance
andrewAuthored on Jun 12 2025, 9:37 AM
Reviewer
alc
Differential Revision
D45063: arm64: Reduce the kernel executable pages
Parents
rG95059bef2437: arm64: Use tables to find early page tables
Branches
Unknown
Tags
Unknown