Source-Changes-HG archive

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

[src/trunk]: src/sys/uvm Provide a helpful message to the user trying to run ...



details:   https://anonhg.NetBSD.org/src/rev/3169fd82633a
branches:  trunk
changeset: 824035:3169fd82633a
user:      christos <christos%NetBSD.org@localhost>
date:      Fri May 19 14:38:46 2017 +0000

description:
Provide a helpful message to the user trying to run an birary that needs page
0 access.

diffstat:

 sys/uvm/uvm_map.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r 1f73ef77b635 -r 3169fd82633a sys/uvm/uvm_map.c
--- a/sys/uvm/uvm_map.c Fri May 19 14:35:01 2017 +0000
+++ b/sys/uvm/uvm_map.c Fri May 19 14:38:46 2017 +0000
@@ -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 @@
 
 #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
 
        /*



Home | Main Index | Thread Index | Old Index