diff options
author | Mark Johnston <markj@FreeBSD.org> | 2022-01-17 16:42:13 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2022-01-17 16:42:13 +0000 |
commit | 5a8413e779a2258b02f92bad69a03d283c4bf2a6 (patch) | |
tree | 9afe5b2e19071246a1b3050b02df270da5f5cb06 | |
parent | 3fc21fdd5f8a4eeb71f43cc6841f59ef1debaf9a (diff) | |
download | src-5a8413e779a2258b02f92bad69a03d283c4bf2a6.tar.gz src-5a8413e779a2258b02f92bad69a03d283c4bf2a6.zip |
setrlimit: Remove special handling for RLIMIT_STACK with a stack gap
This will not be required with a forthcoming reimplementation of ASLR
stack randomization. Moreover, this change was not sufficient to enable
the use of a stack size limit smaller than the stack gap itself.
PR: 260303
Reviewed by: kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33704
-rw-r--r-- | sys/kern/kern_resource.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index 527e7f16e297..504e338ba922 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -672,9 +672,6 @@ kern_proc_setrlimit(struct thread *td, struct proc *p, u_int which, if (limp->rlim_max < 0) limp->rlim_max = RLIM_INFINITY; - if (which == RLIMIT_STACK && limp->rlim_cur != RLIM_INFINITY) - limp->rlim_cur += p->p_vmspace->vm_stkgap; - oldssiz.rlim_cur = 0; newlim = lim_alloc(); PROC_LOCK(p); |