From: deraadt Date: Mon, 8 Aug 2016 17:15:51 +0000 (+0000) Subject: W^X violations are only permitted for binaries marked "wxneeded" on X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=1317a5dd6b8baf9323cd8fe61e2506c37e827054;p=openbsd W^X violations are only permitted for binaries marked "wxneeded" on "wxallowed" filesystems. mmap(2) & mprotect(2) now return ENOTSUP. (To diagnose buggy programs, consider using sysctl kern.wxabort=1 and looking at the coredumps) ok kettenis tedu naddy --- diff --git a/sys/uvm/uvm_mmap.c b/sys/uvm/uvm_mmap.c index 242826a1061..81cc0b513d4 100644 --- a/sys/uvm/uvm_mmap.c +++ b/sys/uvm/uvm_mmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_mmap.c,v 1.137 2016/07/13 17:52:37 kettenis Exp $ */ +/* $OpenBSD: uvm_mmap.c,v 1.138 2016/08/08 17:15:51 deraadt Exp $ */ /* $NetBSD: uvm_mmap.c,v 1.49 2001/02/18 21:19:08 chs Exp $ */ /* @@ -334,7 +334,7 @@ uvm_wxcheck(struct proc *p, char *call) setsigvec(p, SIGABRT, &sa); psignal(p, SIGABRT); } - return (0); /* ENOTSUP later */ + return (ENOTSUP); } /*