From 1e8cdc2e593c4e9ec7f4bdac2fbf48a4ad29f5b8 Mon Sep 17 00:00:00 2001 From: deraadt Date: Sun, 16 Nov 2014 12:30:52 +0000 Subject: 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 --- sys/kern/kern_resource.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/kern/kern_resource.c') diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index 133029ac393..813c421e1f4 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_resource.c,v 1.50 2014/03/30 21:54:48 guenther Exp $ */ +/* $OpenBSD: kern_resource.c,v 1.51 2014/11/16 12:31:00 deraadt Exp $ */ /* $NetBSD: kern_resource.c,v 1.38 1996/10/23 07:19:38 matthias Exp $ */ /*- @@ -281,7 +281,7 @@ dosetrlimit(struct proc *p, u_int which, struct rlimit *limp) vm_prot_t prot; if (limp->rlim_cur > alimp->rlim_cur) { - prot = VM_PROT_READ|VM_PROT_WRITE; + prot = PROT_READ | PROT_WRITE; size = limp->rlim_cur - alimp->rlim_cur; #ifdef MACHINE_STACK_GROWS_UP addr = USRSTACK + alimp->rlim_cur; @@ -289,7 +289,7 @@ dosetrlimit(struct proc *p, u_int which, struct rlimit *limp) addr = USRSTACK - limp->rlim_cur; #endif } else { - prot = VM_PROT_NONE; + prot = PROT_NONE; size = alimp->rlim_cur - limp->rlim_cur; #ifdef MACHINE_STACK_GROWS_UP addr = USRSTACK + limp->rlim_cur; -- cgit v1.2.3-59-g8ed1b