Module Name:    src
Committed By:   maxv
Date:           Wed Sep 12 15:58:08 UTC 2018

Modified Files:
        src/sys/uvm: uvm_map.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.355 -r1.356 src/sys/uvm/uvm_map.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/uvm/uvm_map.c
diff -u src/sys/uvm/uvm_map.c:1.355 src/sys/uvm/uvm_map.c:1.356
--- src/sys/uvm/uvm_map.c:1.355	Mon Sep  3 16:29:37 2018
+++ src/sys/uvm/uvm_map.c	Wed Sep 12 15:58:08 2018
@@ -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 @@ uvm_map(struct vm_map *map, vaddr_t *sta
 
 	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.

Reply via email to