Page MenuHomeFreeBSD

Correctly mark as used physical blocks used to map the kernel
ClosedPublic

Authored by jtl on Feb 8 2018, 5:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Sep 22, 6:47 AM
Unknown Object (File)
Sat, Sep 21, 4:47 PM
Unknown Object (File)
Mon, Sep 16, 9:31 AM
Unknown Object (File)
Aug 12 2024, 7:41 PM
Unknown Object (File)
Aug 6 2024, 9:02 AM
Unknown Object (File)
Jul 30 2024, 3:26 PM
Unknown Object (File)
Jul 29 2024, 4:15 AM
Unknown Object (File)
Jul 13 2024, 11:23 AM
Subscribers

Details

Summary

On bootup, the amd64 pmap initialization code maps the pages used for the kernel and some initial allocations for the page table. It maps the kernel and the blocks used for these initial allocations using 2MB pages. However, if the kernel does not end on a 2MB boundary, it still maps the last portion using a 2MB page, but reports that the unused blocks within this 2MB allocation are free physical blocks. This means that these same physical blocks could also be mapped elsewhere - for example, into a user process. Given the proximity to the kernel text and data area, it seems wise to avoid allowing someone to write data to physical blocks also mapped into these virtual addresses.

Consequently, let's reserve the physical blocks covered by this allocation.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 14875
Build 14987: arc lint + arc unit