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)
Nov 23 2024, 10:24 AM
Unknown Object (File)
Nov 23 2024, 8:39 AM
Unknown Object (File)
Oct 19 2024, 5:24 AM
Unknown Object (File)
Sep 22 2024, 6:47 AM
Unknown Object (File)
Sep 21 2024, 4:47 PM
Unknown Object (File)
Sep 16 2024, 9:31 AM
Unknown Object (File)
Aug 12 2024, 7:41 PM
Unknown Object (File)
Aug 6 2024, 9:02 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 Not Applicable
Unit
Tests Not Applicable