plan9fox/sys/src/9
cinap_lenrek 7bb1a9a185 pc64: map kernel text readonly and everything else no-execute
the idea is to catch bugs and make kernel exploitation
harder by mapping the kernel text section readonly
and everything else no-execute.

l.s maps the KZERO address space using 2MB pages so
to get the 4K granularity for the text section we use
the new ptesplit() function to split that mapping up.

we need to set EFER no-execute enable bit early
in apbootstrap so secondary application processors
will understand the NX bit in our shared kernel page
tables. also APBOOTSTRAP needs to be kept executable.

rebootjump() needs to mark REBOOTADDR page executable.
2019-08-29 07:35:22 +02:00
..
bcm kernel: catch execution read fault on SG_NOEXEC segment 2019-08-27 03:47:18 +02:00
bcm64 kernel: catch execution read fault on SG_NOEXEC segment 2019-08-27 03:47:18 +02:00
boot bootrc: fix $rootdir and $rootspec handling (thanks lucio) 2019-05-05 17:02:37 +02:00
ip devip: if the server does not support TCP ws option, disable window scaling (thanks joe9) 2019-05-22 22:20:31 +02:00
kw kernel: catch execution read fault on SG_NOEXEC segment 2019-08-27 03:47:18 +02:00
mtx kernel: catch execution read fault on SG_NOEXEC segment 2019-08-27 03:47:18 +02:00
omap kernel: catch execution read fault on SG_NOEXEC segment 2019-08-27 03:47:18 +02:00
pc pc64: implement NX bit discovery, map kernel mappings no-execute 2019-08-27 03:55:12 +02:00
pc64 pc64: map kernel text readonly and everything else no-execute 2019-08-29 07:35:22 +02:00
port kernel: prohibit changing cache attributes (SG_CACHED|SG_DEVICE) in segattach(), set SG_RONLY in data2txt() 2019-08-27 06:16:20 +02:00
ppc kernel: catch execution read fault on SG_NOEXEC segment 2019-08-27 03:47:18 +02:00
sgi kernel: catch execution read fault on SG_NOEXEC segment (for mips) 2019-08-27 03:48:51 +02:00
teg2 kernel: catch execution read fault on SG_NOEXEC segment 2019-08-27 03:47:18 +02:00
xen kernel: catch execution read fault on SG_NOEXEC segment 2019-08-27 03:47:18 +02:00
zynq kernel: catch execution read fault on SG_NOEXEC segment 2019-08-27 03:47:18 +02:00
mkfile remove unmaintained omap4 (pandaboard) kernel 2016-05-05 16:35:25 +02:00