aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/proc.h
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2019-07-02 19:07:17 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2019-07-02 19:07:17 +0000
commit5dc7e31a098741399f171c1bd7be51124e75b12f (patch)
tree96703a93b51f5d48d8b713c1307d2ef5c6f4da62 /sys/sys/proc.h
parent3730695151008c2f83ee606d87f6561a597fd463 (diff)
downloadsrc-5dc7e31a098741399f171c1bd7be51124e75b12f.tar.gz
src-5dc7e31a098741399f171c1bd7be51124e75b12f.zip
Control implicit PROT_MAX() using procctl(2) and the FreeBSD note
feature bit. In particular, allocate the bit to opt-out the image from implicit PROTMAX enablement. Provide procctl(2) verbs to set and query implicit PROTMAX handling. The knobs mimic the same per-image flag and per-process controls for ASLR. Reviewed by: emaste, markj (previous version) Discussed with: brooks Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D20795
Notes
Notes: svn path=/head/; revision=349609
Diffstat (limited to 'sys/sys/proc.h')
-rw-r--r--sys/sys/proc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index a257de430ba7..857bb5234d12 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -761,6 +761,8 @@ struct proc {
#define P2_ASLR_ENABLE 0x00000040 /* Force enable ASLR. */
#define P2_ASLR_DISABLE 0x00000080 /* Force disable ASLR. */
#define P2_ASLR_IGNSTART 0x00000100 /* Enable ASLR to consume sbrk area. */
+#define P2_PROTMAX_ENABLE 0x00000200 /* Force enable implied PROT_MAX. */
+#define P2_PROTMAX_DISABLE 0x00000400 /* Force disable implied PROT_MAX. */
/* Flags protected by proctree_lock, kept in p_treeflags. */
#define P_TREE_ORPHANED 0x00000001 /* Reparented, on orphan list */