Make sure the PAX flags are copied/zeroed correctly.
This commit is contained in:
parent
8473aea40f
commit
65b594ff61
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kern_exec.c,v 1.272 2008/04/24 18:39:24 ad Exp $ */
|
||||
/* $NetBSD: kern_exec.c,v 1.273 2008/06/04 12:16:06 ad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1993, 1994, 1996 Christopher G. Demetriou
|
||||
@ -33,7 +33,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.272 2008/04/24 18:39:24 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.273 2008/06/04 12:16:06 ad Exp $");
|
||||
|
||||
#include "opt_ktrace.h"
|
||||
#include "opt_syscall_debug.h"
|
||||
@ -492,6 +492,7 @@ execve1(struct lwp *l, const char *path, char * const *args,
|
||||
pack.ep_emul_root = NULL;
|
||||
pack.ep_interp = NULL;
|
||||
pack.ep_esch = NULL;
|
||||
pack.ep_pax_flags = 0;
|
||||
|
||||
#ifdef LKM
|
||||
rw_enter(&exec_lock, RW_READER);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: proc.h,v 1.278 2008/06/03 22:14:24 ad Exp $ */
|
||||
/* $NetBSD: proc.h,v 1.279 2008/06/04 12:16:06 ad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
|
||||
@ -308,6 +308,7 @@ struct proc {
|
||||
size_t p_psnargv; /* :: offset of ps_nargvstr in above */
|
||||
size_t p_psenv; /* :: offset of ps_envstr in above */
|
||||
size_t p_psnenv; /* :: offset of ps_nenvstr in above */
|
||||
u_int p_pax; /* :: PAX flags */
|
||||
|
||||
/*
|
||||
* End area that is copied on creation
|
||||
@ -318,7 +319,6 @@ struct proc {
|
||||
u_short p_acflag; /* p: Acc. flags; see struct lwp also */
|
||||
struct mdproc p_md; /* p: Any machine-dependent fields */
|
||||
vaddr_t p_stackbase; /* :: ASLR randomized stack base */
|
||||
u_int p_pax; /* :: PAX flags */
|
||||
};
|
||||
|
||||
#define p_rlimit p_limit->pl_rlimit
|
||||
|
Loading…
Reference in New Issue
Block a user