summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2016-08-18 19:59:17 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2016-08-18 19:59:17 +0000
commit67f9b42cdbfb3a8e36938af4dd2c9f8db25de27a (patch)
tree32694b797841c12939047605e5184da189f00e73
parent218999672eafee26a871f5ff461adb0d18c87f50 (diff)
uvm_wxcheck() should only abort the process if kern.wxabort is set.
The new semantics are W^X violations are reported to the application via ENOTSUP. Forgot to fix this during the last change. Spotted by kettenis
-rw-r--r--sys/uvm/uvm_mmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/uvm/uvm_mmap.c b/sys/uvm/uvm_mmap.c
index 81cc0b513d4..e5d61950072 100644
--- a/sys/uvm/uvm_mmap.c
+++ b/sys/uvm/uvm_mmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_mmap.c,v 1.138 2016/08/08 17:15:51 deraadt Exp $ */
+/* $OpenBSD: uvm_mmap.c,v 1.139 2016/08/18 19:59:16 deraadt Exp $ */
/* $NetBSD: uvm_mmap.c,v 1.49 2001/02/18 21:19:08 chs Exp $ */
/*
@@ -325,7 +325,7 @@ uvm_wxcheck(struct proc *p, char *call)
if (pr->ps_wxcounter++ == 0)
log(LOG_NOTICE, "%s(%d): %s W^X violation\n",
p->p_comm, p->p_pid, call);
- if (!wxallowed || uvm_wxabort) {
+ if (uvm_wxabort) {
struct sigaction sa;
/* Send uncatchable SIGABRT for coredump */