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, Jun 23, 8:35 PM
Unknown Object (File)
May 23 2024, 4:48 PM
Unknown Object (File)
May 23 2024, 5:47 AM
Unknown Object (File)
Apr 2 2024, 5:09 PM
Unknown Object (File)
Mar 8 2024, 12:04 AM
Unknown Object (File)
Feb 19 2024, 2:52 AM
Unknown Object (File)
Dec 23 2023, 12:53 AM
Unknown Object (File)
Dec 20 2023, 6:21 PM
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 Not Applicable
Unit
Tests Not Applicable