Page MenuHomeFreeBSD

arm64: Reduce the kernel executable pages
Needs ReviewPublic

Authored by andrew on Thu, May 2, 4:10 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 4, 5:55 PM
Unknown Object (File)
Fri, May 3, 5:32 AM
Unknown Object (File)
Fri, May 3, 5:32 AM
Unknown Object (File)
Thu, May 2, 10:47 PM
Subscribers

Details

Reviewers
manu
Group Reviewers
arm64
Summary

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

We can reduce the number of 2 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).

Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 57545
Build 54433: arc lint + arc unit

Event Timeline

andrew requested review of this revision.Thu, May 2, 4:10 PM

I assume that's supposed to be "l2 blocks" in the comment message?

And I guess it's really marking memory beyond this (rounded up end of .text) as non-executable