diff options
author | deraadt <deraadt@openbsd.org> | 2019-05-11 20:02:00 +0000 |
---|---|---|
committer | deraadt <deraadt@openbsd.org> | 2019-05-11 20:02:00 +0000 |
commit | 8c8a7f03b5bfca8da6f3ae8b1d91c8c4593c91e2 (patch) | |
tree | 21fbf268ee863a72329669f4c4dbd4996cf7a77a /sys/uvm | |
parent | vm_dump_header allocated space for a signature but it was never set; (diff) | |
download | wireguard-openbsd-8c8a7f03b5bfca8da6f3ae8b1d91c8c4593c91e2.tar.xz wireguard-openbsd-8c8a7f03b5bfca8da6f3ae8b1d91c8c4593c91e2.zip |
move the noise about W^X mapping failure inside the sysctl kern.wxabort
knob, since we found a proram which tests RWX mapping then changes execution
behaviour to non-W^X.
(that program is chrome, as v8 is heading towards W^X compliance with
mprotect RW/RX swaps, and also has jitless components in developent.)
ok sthen kettenis robert
Diffstat (limited to 'sys/uvm')
-rw-r--r-- | sys/uvm/uvm_mmap.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/uvm/uvm_mmap.c b/sys/uvm/uvm_mmap.c index 149fa967a4c..6b35906f142 100644 --- a/sys/uvm/uvm_mmap.c +++ b/sys/uvm/uvm_mmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_mmap.c,v 1.155 2019/04/02 11:02:01 deraadt Exp $ */ +/* $OpenBSD: uvm_mmap.c,v 1.156 2019/05/11 20:02:00 deraadt Exp $ */ /* $NetBSD: uvm_mmap.c,v 1.49 2001/02/18 21:19:08 chs Exp $ */ /* @@ -183,14 +183,14 @@ uvm_wxcheck(struct proc *p, char *call) if (wxallowed && (pr->ps_flags & PS_WXNEEDED)) return (0); - /* Report W^X failures, and potentially SIGABRT */ - if (pr->ps_wxcounter++ == 0) - log(LOG_NOTICE, "%s(%d): %s W^X violation\n", - pr->ps_comm, pr->ps_pid, call); - - /* Send uncatchable SIGABRT for coredump */ - if (uvm_wxabort) + if (uvm_wxabort) { + /* Report W^X failures */ + if (pr->ps_wxcounter++ == 0) + log(LOG_NOTICE, "%s(%d): %s W^X violation\n", + pr->ps_comm, pr->ps_pid, call); + /* Send uncatchable SIGABRT for coredump */ sigexit(p, SIGABRT); + } return (ENOTSUP); } |