diff options
author | Mark Johnston <markj@FreeBSD.org> | 2019-07-10 19:57:48 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2019-07-10 19:57:48 +0000 |
commit | 2ffee5c1b2cf33f28df2c8341fa521fc4239daf1 (patch) | |
tree | 64696a4a03758da21e6eb80117d88a28716bf662 /sys/kern/kern_fork.c | |
parent | 6325d2df9e1d863627869ef6229458c4ff327008 (diff) | |
download | src-2ffee5c1b2cf33f28df2c8341fa521fc4239daf1.tar.gz src-2ffee5c1b2cf33f28df2c8341fa521fc4239daf1.zip |
Inherit P2_PROTMAX_{ENABLE,DISABLE} across fork().
Thus, when using proccontrol(1) to disable implicit application of
PROT_MAX within a process, child processes will inherit this setting.
Discussed with: kib
MFC with: r349609
Sponsored by: The FreeBSD Foundation
Notes
Notes:
svn path=/head/; revision=349892
Diffstat (limited to 'sys/kern/kern_fork.c')
-rw-r--r-- | sys/kern/kern_fork.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 78becdba74f9..c292be55e97c 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -465,7 +465,8 @@ do_fork(struct thread *td, struct fork_req *fr, struct proc *p2, struct thread * */ p2->p_flag = P_INMEM; p2->p_flag2 = p1->p_flag2 & (P2_ASLR_DISABLE | P2_ASLR_ENABLE | - P2_ASLR_IGNSTART | P2_NOTRACE | P2_NOTRACE_EXEC | P2_TRAPCAP); + P2_ASLR_IGNSTART | P2_NOTRACE | P2_NOTRACE_EXEC | + P2_PROTMAX_ENABLE | P2_PROTMAX_DISABLE | P2_TRAPCAP); p2->p_swtick = ticks; if (p1->p_flag & P_PROFIL) startprofclock(p2); |