summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2014-11-17 03:15:58 +0000
committerderaadt <deraadt@openbsd.org>2014-11-17 03:15:58 +0000
commit9084c3374b43b2e9a8cc7a32c22f235e1ecd6ee8 (patch)
treeded953d38012317d5a300f05898cf24a9a3878e2
parentapply siphash to the key selection for the ufs inode hash. (diff)
downloadwireguard-openbsd-9084c3374b43b2e9a8cc7a32c22f235e1ecd6ee8.tar.xz
wireguard-openbsd-9084c3374b43b2e9a8cc7a32c22f235e1ecd6ee8.zip
instead of PROT_MASK, use PROT_READ | PROT_WRITE | PROT_EXEC to
show the maxprot available in obreak mappings. (the default remains PROT_READ | PROT_WRITE, so don't be afraid). ok tedu
-rw-r--r--sys/uvm/uvm_unix.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/uvm/uvm_unix.c b/sys/uvm/uvm_unix.c
index 81c82bff826..424ab04e1db 100644
--- a/sys/uvm/uvm_unix.c
+++ b/sys/uvm/uvm_unix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_unix.c,v 1.51 2014/11/16 12:31:01 deraadt Exp $ */
+/* $OpenBSD: uvm_unix.c,v 1.52 2014/11/17 03:15:58 deraadt Exp $ */
/* $NetBSD: uvm_unix.c,v 1.18 2000/09/13 15:00:25 thorpej Exp $ */
/*
@@ -85,7 +85,8 @@ sys_obreak(struct proc *p, void *v, register_t *retval)
if (new > old) {
error = uvm_map(&vm->vm_map, &old, new - old, NULL,
UVM_UNKNOWN_OFFSET, 0,
- UVM_MAPFLAG(PROT_READ | PROT_WRITE, PROT_MASK, UVM_INH_COPY,
+ UVM_MAPFLAG(PROT_READ | PROT_WRITE,
+ PROT_READ | PROT_WRITE | PROT_EXEC, UVM_INH_COPY,
POSIX_MADV_NORMAL, UVM_FLAG_AMAPPAD|UVM_FLAG_FIXED|
UVM_FLAG_OVERLAY|UVM_FLAG_COPYONW));
if (error) {