Commit 4980d2c
authored
Use PROT_MPROTECT for NetBSD mprotect restrictions (#185)
NetBSD's mprotect seems to be more restrictive than other OSes, where it
does not allow less restrictive mappings than the original mmap, and can
be subject to PaX restrictions. According to NetBSD documentation, there
is a PROT_MPROTECT macro to define allowed protections for later uses of
mprotect, without granting the permissions immediately in mmap. This can
be used to ensure that the full range of protections blink could make in
the course of execution are permitted.1 parent 4fdcd8d commit 4980d2c
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
171 | 176 | | |
172 | 177 | | |
173 | 178 | | |
| |||
0 commit comments