Module Name: src
Committed By: reinoud
Date: Sun Aug 5 18:57:49 UTC 2018
Modified Files:
src/sys/arch/usermode/usermode: db_memrw.c
Log Message:
Advise to explicitly set flags +agm instead of only clearing them when set
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/usermode/usermode/db_memrw.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/arch/usermode/usermode/db_memrw.c
diff -u src/sys/arch/usermode/usermode/db_memrw.c:1.3 src/sys/arch/usermode/usermode/db_memrw.c:1.4
--- src/sys/arch/usermode/usermode/db_memrw.c:1.3 Fri Aug 3 11:18:22 2018
+++ src/sys/arch/usermode/usermode/db_memrw.c Sun Aug 5 18:57:49 2018
@@ -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 @@ db_write_bytes(vaddr_t addr, size_t size
/*
* 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);
}