Module Name:    src
Committed By:   maxv
Date:           Sat Sep 17 12:00:35 UTC 2016

Modified Files:
        src/sys/kern: kern_proc.c

Log Message:
Use VM_MAXUSER_ADDRESS for proc0, not VM_MAX_ADDRESS. It normally does not
change anything, since kernel processes use the shared kernel map instead
of the one they are given here. For consistency though, it is better to
make sure UVM will not be tempted to access machine-dependent reserved
areas (e.g., the PTE space on x86).


To generate a diff of this commit:
cvs rdiff -u -r1.196 -r1.197 src/sys/kern/kern_proc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/kern_proc.c
diff -u src/sys/kern/kern_proc.c:1.196 src/sys/kern/kern_proc.c:1.197
--- src/sys/kern/kern_proc.c:1.196	Wed May 25 17:43:58 2016
+++ src/sys/kern/kern_proc.c	Sat Sep 17 12:00:34 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_proc.c,v 1.196 2016/05/25 17:43:58 christos Exp $	*/
+/*	$NetBSD: kern_proc.c,v 1.197 2016/09/17 12:00:34 maxv Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_proc.c,v 1.196 2016/05/25 17:43:58 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_proc.c,v 1.197 2016/09/17 12:00:34 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_kstack.h"
@@ -480,7 +480,7 @@ proc0_init(void)
 	 * share proc0's vmspace, and thus, the kernel pmap.
 	 */
 	uvmspace_init(&vmspace0, pmap_kernel(), round_page(VM_MIN_ADDRESS),
-	    trunc_page(VM_MAX_ADDRESS),
+	    trunc_page(VM_MAXUSER_ADDRESS),
 #ifdef __USE_TOPDOWN_VM
 	    true
 #else

Reply via email to