Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Use VM_MAXUSER_ADDRESS for proc0, not VM_MAX_ADDRES...



details:   https://anonhg.NetBSD.org/src/rev/df1ea499482a
branches:  trunk
changeset: 817957:df1ea499482a
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sat Sep 17 12:00:34 2016 +0000

description:
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).

diffstat:

 sys/kern/kern_proc.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 24ad6d2e9caf -r df1ea499482a sys/kern/kern_proc.c
--- a/sys/kern/kern_proc.c      Sat Sep 17 11:07:42 2016 +0000
+++ b/sys/kern/kern_proc.c      Sat Sep 17 12:00:34 2016 +0000
@@ -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 @@
         * 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



Home | Main Index | Thread Index | Old Index