Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/usermode/usermode Advise to explicitly set flags +a...



details:   https://anonhg.NetBSD.org/src/rev/0a32cdad189c
branches:  trunk
changeset: 834282:0a32cdad189c
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Sun Aug 05 18:57:49 2018 +0000

description:
Advise to explicitly set flags +agm instead of only clearing them when set

diffstat:

 sys/arch/usermode/usermode/db_memrw.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (35 lines):

diff -r 0f4061750b6d -r 0a32cdad189c sys/arch/usermode/usermode/db_memrw.c
--- a/sys/arch/usermode/usermode/db_memrw.c     Sun Aug 05 18:42:48 2018 +0000
+++ b/sys/arch/usermode/usermode/db_memrw.c     Sun Aug 05 18:57:49 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_memrw.c,v 1.3 2018/08/03 11:18:22 reinoud Exp $     */
+/*     $NetBSD: db_memrw.c,v 1.4 2018/08/05 18:57:49 reinoud Exp $     */
 
 /*-
  * Copyright (c) 1996, 2000 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_memrw.c,v 1.3 2018/08/03 11:18:22 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_memrw.c,v 1.4 2018/08/05 18:57:49 reinoud Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -226,14 +226,14 @@
        /*
         * if we are in the kernel range, just allow writing by using
         * mprotect(); Note that this needs an unprotected binary, set with
-        * `paxctl -agm netbsd`
+        * `paxctl +agm netbsd`
         */
        if (addr > kmem_k_start) {
                ret = thunk_mprotect((void *) trunc_page(addr), PAGE_SIZE,
                        PROT_READ | PROT_WRITE | PROT_EXEC);
                if (ret != 0)
                        panic("please unprotect kernel binary with "
-                             "`paxctl -agm netbsd`");
+                             "`paxctl +agm netbsd`");
                assert(ret == 0);
        }
 



Home | Main Index | Thread Index | Old Index