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/5fb47eafc510
branches:  trunk
changeset: 365201:5fb47eafc510
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 54cd99feb66e -r 5fb47eafc510 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