svn commit: r281883 - head/sys/kern
Konstantin Belousov
kib at FreeBSD.org
Thu Apr 23 11:27:21 UTC 2015
Author: kib
Date: Thu Apr 23 11:27:21 2015
New Revision: 281883
URL: https://svnweb.freebsd.org/changeset/base/281883
Log:
Handle incorrect ELF images specifying size for PT_GNU_STACK not being
multiple of page size.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Modified:
head/sys/kern/kern_exec.c
Modified: head/sys/kern/kern_exec.c
==============================================================================
--- head/sys/kern/kern_exec.c Thu Apr 23 08:41:50 2015 (r281882)
+++ head/sys/kern/kern_exec.c Thu Apr 23 11:27:21 2015 (r281883)
@@ -1060,7 +1060,7 @@ exec_new_vmspace(imgp, sv)
/* Allocate a new stack */
if (imgp->stack_sz != 0) {
- ssiz = imgp->stack_sz;
+ ssiz = trunc_page(imgp->stack_sz);
PROC_LOCK(p);
lim_rlimit(p, RLIMIT_STACK, &rlim_stack);
PROC_UNLOCK(p);
More information about the svn-src-head
mailing list