freebsd-dev/sys/amd64
Mark Johnston 14327f5334 Tighten mapping protections on preloaded files on amd64.
- We load the kernel at 0x200000.  Memory below that address need not
  be executable, so do not map it as such.
- Remove references to .ldata and related sections in the kernel linker
  script.  They come from ld.bfd's default linker script, but are not
  used, and we now use ld.lld to link the amd64 kernel.  lld does not
  contain a default linker script.
- Pad the .bss to a 2MB as we do between .text and .data.  This
  forces the loader to load additional files starting in the following
  2MB page, preserving the use of superpage mappings for kernel data.
- Map memory above the kernel image with NX.  The kernel linker now
  upgrades protections as needed, and other preloaded file types
  (e.g., entropy, microcode) need not be mapped with execute permissions
  in the first place.

Reviewed by:	kib
MFC after:	1 month
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D21859
2019-10-18 14:05:13 +00:00
..
acpica Merge ACPICA 20190329. 2019-03-29 20:21:28 +00:00
amd64 Tighten mapping protections on preloaded files on amd64. 2019-10-18 14:05:13 +00:00
cloudabi32 Remove sv_pagesize, originally introduced with r100384. 2019-03-01 16:16:38 +00:00
cloudabi64 Remove sv_pagesize, originally introduced with r100384. 2019-03-01 16:16:38 +00:00
conf Implement NetGDB(4) 2019-10-17 21:33:01 +00:00
ia32 Don't pass error from syscallenter() to syscallret(). 2019-07-15 21:25:16 +00:00
include Introduce pmap_change_prot() for amd64. 2019-10-16 22:12:34 +00:00
linux linux: futex_mtx should follow futex_list 2019-10-18 12:25:33 +00:00
linux32 linux: futex_mtx should follow futex_list 2019-10-18 12:25:33 +00:00
pci pci_cfgreg.c: Use io port config access for early boot time. 2019-04-09 18:07:17 +00:00
sgx (4/6) Protect page valid with the busy lock. 2019-10-15 03:45:41 +00:00
vmm Correct the scope of several global variables. 2019-09-27 21:04:33 +00:00
Makefile Bring the tags and links entries for amd64 up to date. 2015-10-27 22:59:24 +00:00