diff options
author | 2014-11-16 12:30:52 +0000 | |
---|---|---|
committer | 2014-11-16 12:30:52 +0000 | |
commit | 1e8cdc2e593c4e9ec7f4bdac2fbf48a4ad29f5b8 (patch) | |
tree | 739083100a383196b1776cb84f65da8812dc079b /sys/kern/kern_malloc.c | |
parent | Read your compiler output even when it succeeds. Add missing variable to (diff) | |
download | wireguard-openbsd-1e8cdc2e593c4e9ec7f4bdac2fbf48a4ad29f5b8.tar.xz wireguard-openbsd-1e8cdc2e593c4e9ec7f4bdac2fbf48a4ad29f5b8.zip |
Replace a plethora of historical protection options with just
PROT_NONE, PROT_READ, PROT_WRITE, and PROT_EXEC from mman.h.
PROT_MASK is introduced as the one true way of extracting those bits.
Remove UVM_ADV_* wrapper, using the standard names.
ok doug guenther kettenis
Diffstat (limited to 'sys/kern/kern_malloc.c')
-rw-r--r-- | sys/kern/kern_malloc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index dc52bc330ff..a7d48d5c3b0 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_malloc.c,v 1.123 2014/11/06 17:29:23 tedu Exp $ */ +/* $OpenBSD: kern_malloc.c,v 1.124 2014/11/16 12:31:00 deraadt Exp $ */ /* $NetBSD: kern_malloc.c,v 1.15.4.2 1996/06/13 17:10:56 cgd Exp $ */ /* @@ -294,7 +294,7 @@ malloc(size_t size, int type, int flags) vm_map_lock(kmem_map); rv = uvm_map_checkprot(kmem_map, addr, - addr + sizeof(struct kmem_freelist), VM_PROT_WRITE); + addr + sizeof(struct kmem_freelist), PROT_WRITE); vm_map_unlock(kmem_map); if (!rv) { |