Module Name: src
Committed By: christos
Date: Fri May 19 14:38:46 UTC 2017
Modified Files:
src/sys/uvm: uvm_map.c
Log Message:
Provide a helpful message to the user trying to run an birary that needs page
0 access.
To generate a diff of this commit:
cvs rdiff -u -r1.344 -r1.345 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.344 src/sys/uvm/uvm_map.c:1.345
--- src/sys/uvm/uvm_map.c:1.344 Sat May 6 17:34:52 2017
+++ src/sys/uvm/uvm_map.c Fri May 19 10:38:46 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_map.c,v 1.344 2017/05/06 21:34:52 joerg Exp $ */
+/* $NetBSD: uvm_map.c,v 1.345 2017/05/19 14:38:46 christos 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.344 2017/05/06 21:34:52 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.345 2017/05/19 14:38:46 christos Exp $");
#include "opt_ddb.h"
#include "opt_pax.h"
@@ -1066,8 +1066,12 @@ uvm_map(struct vm_map *map, vaddr_t *sta
#ifndef __USER_VA0_IS_SAFE
if ((flags & UVM_FLAG_FIXED) && *startp == 0 &&
- !VM_MAP_IS_KERNEL(map) && user_va0_disable)
+ !VM_MAP_IS_KERNEL(map) && user_va0_disable) {
+ uprintf("%s: process wants to map page 0; "
+ "run 'sysctl -w vm.user_va0_disable=0' to enable access.\n",
+ __func__);
return EACCES;
+ }
#endif
/*