Source-Changes-HG archive

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

[src/trunk]: src/sys/uvm Remove this check, it has never protected against mm...



details:   https://anonhg.NetBSD.org/src/rev/fbf3cf4f578c
branches:  trunk
changeset: 433396:fbf3cf4f578c
user:      maxv <maxv%NetBSD.org@localhost>
date:      Wed Sep 12 15:58:08 2018 +0000

description:
Remove this check, it has never protected against mmap on page zero, and
has since been replaced by the code in exec_vm_minaddr.

diffstat:

 sys/uvm/uvm_map.c |  13 ++-----------
 1 files changed, 2 insertions(+), 11 deletions(-)

diffs (34 lines):

diff -r 482b85b9cb6d -r fbf3cf4f578c sys/uvm/uvm_map.c
--- a/sys/uvm/uvm_map.c Wed Sep 12 15:29:11 2018 +0000
+++ b/sys/uvm/uvm_map.c Wed Sep 12 15:58:08 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_map.c,v 1.355 2018/09/03 16:29:37 riastradh Exp $  */
+/*     $NetBSD: uvm_map.c,v 1.356 2018/09/12 15:58:08 maxv Exp $       */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.355 2018/09/03 16:29:37 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.356 2018/09/12 15:58:08 maxv Exp $");
 
 #include "opt_ddb.h"
 #include "opt_pax.h"
@@ -1064,15 +1064,6 @@
 
        KASSERT((size & PAGE_MASK) == 0);
 
-#ifndef __USER_VA0_IS_SAFE
-       if ((flags & UVM_FLAG_FIXED) && *startp == 0 &&
-           !VM_MAP_IS_KERNEL(map) && user_va0_disable) {
-               uprintf("%s: process wants to map virtual address 0; see "
-                   "vm.user_va0_disable in sysctl(7).\n", __func__);
-               return EACCES;
-       }
-#endif
-
        /*
         * for pager_map, allocate the new entry first to avoid sleeping
         * for memory while we have the map locked.



Home | Main Index | Thread Index | Old Index