Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern This is just a temporary stack that holds fake argu...
details: https://anonhg.NetBSD.org/src/rev/13678645ccc9
branches: trunk
changeset: 347816:13678645ccc9
user: maxv <maxv%NetBSD.org@localhost>
date: Sat Sep 17 12:09:22 2016 +0000
description:
This is just a temporary stack that holds fake arguments, and that gets
remapped as RW in sys_execve. Still, in this small window, it does not need
to be executable.
diffstat:
sys/kern/init_main.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (33 lines):
diff -r 1adee34bf417 -r 13678645ccc9 sys/kern/init_main.c
--- a/sys/kern/init_main.c Sat Sep 17 12:00:34 2016 +0000
+++ b/sys/kern/init_main.c Sat Sep 17 12:09:22 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: init_main.c,v 1.482 2016/07/07 06:55:43 msaitoh Exp $ */
+/* $NetBSD: init_main.c,v 1.483 2016/09/17 12:09:22 maxv Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.482 2016/07/07 06:55:43 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.483 2016/09/17 12:09:22 maxv Exp $");
#include "opt_ddb.h"
#include "opt_inet.h"
@@ -931,10 +931,10 @@
*/
addr = (vaddr_t)STACK_ALLOC(USRSTACK, PAGE_SIZE);
if (uvm_map(&p->p_vmspace->vm_map, &addr, PAGE_SIZE,
- NULL, UVM_UNKNOWN_OFFSET, 0,
- UVM_MAPFLAG(UVM_PROT_ALL, UVM_PROT_ALL, UVM_INH_COPY,
- UVM_ADV_NORMAL,
- UVM_FLAG_FIXED|UVM_FLAG_OVERLAY|UVM_FLAG_COPYONW)) != 0)
+ NULL, UVM_UNKNOWN_OFFSET, 0,
+ UVM_MAPFLAG(UVM_PROT_RW, UVM_PROT_RW, UVM_INH_COPY,
+ UVM_ADV_NORMAL,
+ UVM_FLAG_FIXED|UVM_FLAG_OVERLAY|UVM_FLAG_COPYONW)) != 0)
panic("init: couldn't allocate argument space");
p->p_vmspace->vm_maxsaddr = (void *)STACK_MAX(addr, PAGE_SIZE);
Home |
Main Index |
Thread Index |
Old Index