From: deraadt Date: Thu, 18 Aug 2016 19:59:16 +0000 (+0000) Subject: uvm_wxcheck() should only abort the process if kern.wxabort is set. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a1ccd9d3514034bf21612795ce28997c5c991bce;p=openbsd 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 --- 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 */