Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern only print debugging info if we are actually going ...
details: https://anonhg.NetBSD.org/src/rev/2e05625da743
branches: trunk
changeset: 345251:2e05625da743
user: christos <christos%NetBSD.org@localhost>
date: Sat May 14 17:04:09 2016 +0000
description:
only print debugging info if we are actually going to change the permission.
diffstat:
sys/kern/kern_pax.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 23d719f1c00e -r 2e05625da743 sys/kern/kern_pax.c
--- a/sys/kern/kern_pax.c Sat May 14 14:46:55 2016 +0000
+++ b/sys/kern/kern_pax.c Sat May 14 17:04:09 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_pax.c,v 1.44 2016/05/13 17:33:43 christos Exp $ */
+/* $NetBSD: kern_pax.c,v 1.45 2016/05/14 17:04:09 christos Exp $ */
/*
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_pax.c,v 1.44 2016/05/13 17:33:43 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_pax.c,v 1.45 2016/05/14 17:04:09 christos Exp $");
#include "opt_pax.h"
@@ -411,7 +411,7 @@
if ((*prot & (VM_PROT_WRITE|VM_PROT_EXECUTE)) != VM_PROT_EXECUTE) {
#ifdef PAX_MPROTECT_DEBUG
struct proc *p = l->l_proc;
- if (pax_mprotect_debug) {
+ if ((*prot & VM_PROT_EXECUTE) && pax_mprotect_debug) {
printf("%s: %s,%zu: %d.%d (%s): -x\n",
__func__, file, line,
p->p_pid, l->l_lid, p->p_comm);
@@ -422,7 +422,7 @@
} else {
#ifdef PAX_MPROTECT_DEBUG
struct proc *p = l->l_proc;
- if (pax_mprotect_debug) {
+ if ((*prot & VM_PROT_WRITE) && pax_mprotect_debug) {
printf("%s: %s,%zu: %d.%d (%s): -w\n",
__func__, file, line,
p->p_pid, l->l_lid, p->p_comm);
Home |
Main Index |
Thread Index |
Old Index