#
f2ce2829 |
| 12-Aug-2018 |
maxv <maxv@NetBSD.org> |
More ASLR: randomize the location of the PTE area. The PTE slot is not created in locore anymore, but a little later; by using the already entered L4 page, rather than the recursive slot itself (whic
More ASLR: randomize the location of the PTE area. The PTE slot is not created in locore anymore, but a little later; by using the already entered L4 page, rather than the recursive slot itself (which doesn't exist yet).
In the prekern we still map the slot - the prekern behaves as an external locore -, because we need it as part of the randomization/relocation work. The kernel then removes this slot, and regenerates a randomized one.
Tested on GENERIC and GENERIC_KASLR, Xen doesn't have it and dom0 still boots fine.
show more ...
|
#
5becad1b |
| 12-Aug-2018 |
maxv <maxv@NetBSD.org> |
Move the PTE area from slot 255 to slot 509. I've never understood why we put it on 255; the "kernel" half of the VM space begins on slot 256, so if anything, the PTE area should have been above it,
Move the PTE area from slot 255 to slot 509. I've never understood why we put it on 255; the "kernel" half of the VM space begins on slot 256, so if anything, the PTE area should have been above it, not below.
Virtually extend the user slots in slotspace, because we don't want (randomized) kernel mappings to land on slot 255.
The prekern is updated accordingly.
Tested on GENERIC, GENERIC_KASLR and XEN3_DOM0.
show more ...
|