Applying mimmutable(2) to bss, data and text made the sys/kern/noexec tests fail
authoranton <anton@openbsd.org>
Sun, 27 Nov 2022 15:12:57 +0000 (15:12 +0000)
committeranton <anton@openbsd.org>
Sun, 27 Nov 2022 15:12:57 +0000 (15:12 +0000)
commit511bcdc49140787e0039904e43c14b7b929509c3
tree35f6f02249ae4168c3ef43f26ebff603bc45d5da
parent4b35839404b4e4cbd51a5530ab7075a9324d4f21
Applying mimmutable(2) to bss, data and text made the sys/kern/noexec tests fail
since they try to mutate the permissions of the aforementioned sections which is
no longer possible. Instead, "mimic" the sections by allocating and operating on
memory with the same initial permissions.

With help from deraadt@
regress/sys/kern/noexec/Makefile
regress/sys/kern/noexec/noexec.c