Author: kib
Date: Sat Apr 25 08:03:36 2015
New Revision: 281978
URL: https://svnweb.freebsd.org/changeset/base/281978

Log:
  MFC r281883:
  Handle incorrect ELF images specifying size for PT_GNU_STACK not being
  multiple of page size.

Modified:
  stable/10/sys/kern/kern_exec.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/kern/kern_exec.c
==============================================================================
--- stable/10/sys/kern/kern_exec.c      Sat Apr 25 06:50:15 2015        
(r281977)
+++ stable/10/sys/kern/kern_exec.c      Sat Apr 25 08:03:36 2015        
(r281978)
@@ -1089,7 +1089,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);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to