Author: kib
Date: Sat Jan  8 18:41:19 2011
New Revision: 217160
URL: http://svn.freebsd.org/changeset/base/217160

Log:
  Use the same expression to report stack protection mode for AT_STACKEXEC
  as the expression used by exec_new_vmspace().

Modified:
  head/sys/kern/imgact_elf.c

Modified: head/sys/kern/imgact_elf.c
==============================================================================
--- head/sys/kern/imgact_elf.c  Sat Jan  8 18:31:23 2011        (r217159)
+++ head/sys/kern/imgact_elf.c  Sat Jan  8 18:41:19 2011        (r217160)
@@ -982,8 +982,9 @@ __elfN(freebsd_fixup)(register_t **stack
                AUXARGS_ENTRY(pos, AT_PAGESIZES, imgp->pagesizes);
                AUXARGS_ENTRY(pos, AT_PAGESIZESLEN, imgp->pagesizeslen);
        }
-       AUXARGS_ENTRY(pos, AT_STACKPROT, imgp->stack_prot != 0 ?
-           imgp->stack_prot : imgp->sysent->sv_stackprot);
+       AUXARGS_ENTRY(pos, AT_STACKPROT, imgp->sysent->sv_shared_page_obj
+           != NULL && imgp->stack_prot != 0 ? imgp->stack_prot :
+           imgp->sysent->sv_stackprot);
        AUXARGS_ENTRY(pos, AT_NULL, 0);
 
        free(imgp->auxargs, M_TEMP);
_______________________________________________
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