freebsd-skq/sys/amd64
Jonathan T. Looney 31ba4c7b5b On bootup, the amd64 pmap initialization code creates page-table
mappings for the pages used for the kernel and some initial allocations
used 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 4K 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.

(Note that this isn't a security vulnerability: the direct map makes
most/all memory on the system mapped into kernel space. And, nothing
in the kernel should be trying to access these pages, as the virtual
addresses are unused. It simply seems wise to avoid reusing these
physical blocks while they are mapped to virtual addresses so close
to the kernel text and data area.)

Consequently, let's reserve the physical blocks covered by the
page-table mappings for these initial allocations.

Reviewed by:	kib, markj
MFC after:	2 weeks
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D14268
2018-02-09 17:46:33 +00:00
..
acpica sys/amd64: further adoption of SPDX licensing ID tags. 2017-11-27 15:03:07 +00:00
amd64 On bootup, the amd64 pmap initialization code creates page-table 2018-02-09 17:46:33 +00:00
cloudabi32 Use TO_PTR() to convert integers to pointers. 2017-11-26 14:45:56 +00:00
cloudabi64 Use TO_PTR() to convert integers to pointers. 2017-11-26 14:45:56 +00:00
conf Move VM_NUMA_ALLOC and DEVICE_NUMA under the single global config option NUMA. 2018-01-14 03:36:03 +00:00
ia32 IBRS support, AKA Spectre hardware mitigation. 2018-01-31 14:36:27 +00:00
include IBRS support, AKA Spectre hardware mitigation. 2018-01-31 14:36:27 +00:00
linux Additional linuxolator whitespace cleanup, missed in r328890 2018-02-05 18:39:06 +00:00
linux32 Linuxolator whitespace cleanup 2018-02-05 17:29:12 +00:00
pci sys/amd64: further adoption of SPDX licensing ID tags. 2017-11-27 15:03:07 +00:00
sgx Fix module unload when SGX support is not present in CPU. 2017-08-18 14:47:06 +00:00
vmm vmm/svm: post LAPIC interrupts using event injection, not virtual interrupts 2018-01-31 11:14:26 +00:00
Makefile Bring the tags and links entries for amd64 up to date. 2015-10-27 22:59:24 +00:00