Revise implementation of pmap_protect(9) in preparation for execute-only
authorkettenis <kettenis@openbsd.org>
Thu, 19 Jan 2023 20:17:11 +0000 (20:17 +0000)
committerkettenis <kettenis@openbsd.org>
Thu, 19 Jan 2023 20:17:11 +0000 (20:17 +0000)
commit1a48cf1747c39cd90cef462c6d8ba0cb89a74473
treed74d562d88a0d8ddf6c037a89637f294b793ffa1
parentfbddb143adfdac0535cb24c50035f98acdd09915
Revise implementation of pmap_protect(9) in preparation for execute-only
support.  The current implementation doesn't handle the transition from
RWX to RW correctly.  Also generalize the pmap_write_protect() function
in recognition of the fact that execute permission, write permission,
and in the future read permission on executable pages, are handled by
separate bits.

ok deraadt@, mpi@
sys/arch/amd64/amd64/pmap.c
sys/arch/amd64/include/pmap.h