The
mprotect() system call changes the specified pages to have protection
prot. Not all implementations will guarantee protection on a page basis; the granularity of protection changes may be as large as an entire region.
The protections (region accessibility) are specified in the
prot argument by OR'ing the following values:
PROT_EXEC
Pages may be executed.
PROT_READ
Pages may be read.
PROT_WRITE
Pages may be written.
PROT_NONE
No permissions.