diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2014-12-17 06:58:12 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2014-12-17 06:58:12 +0000 |
commit | a45b759c4782fe513ec89d5d4bb06bf38784f061 (patch) | |
tree | 2f819accb4d69bd46127e29bbe803b2c5e5ad7ae /sys/kern/kern_exec.c | |
parent | 055668cf6b0974a1072d2833eb7db870dc7f43be (diff) |
Prefer MADV_* over POSIX_MADV_* in kernel for consistency: the latter
doesn't have all the values and therefore can't be used everywhere.
ok deraadt@ kettenis@
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r-- | sys/kern/kern_exec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 496e539b428..cad14a48ed5 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_exec.c,v 1.152 2014/12/16 18:30:04 tedu Exp $ */ +/* $OpenBSD: kern_exec.c,v 1.153 2014/12/17 06:58:11 guenther Exp $ */ /* $NetBSD: kern_exec.c,v 1.75 1996/02/09 18:59:28 christos Exp $ */ /*- @@ -836,7 +836,7 @@ exec_sigcode_map(struct process *pr, struct emul *e) if ((r = uvm_map(kernel_map, &va, round_page(sz), e->e_sigobject, 0, 0, UVM_MAPFLAG(PROT_READ | PROT_WRITE, PROT_READ | PROT_WRITE, - MAP_INHERIT_SHARE, POSIX_MADV_RANDOM, 0)))) { + MAP_INHERIT_SHARE, MADV_RANDOM, 0)))) { uao_detach(e->e_sigobject); return (ENOMEM); } @@ -848,7 +848,7 @@ exec_sigcode_map(struct process *pr, struct emul *e) uao_reference(e->e_sigobject); if (uvm_map(&pr->ps_vmspace->vm_map, &pr->ps_sigcode, round_page(sz), e->e_sigobject, 0, 0, UVM_MAPFLAG(PROT_READ | PROT_EXEC, - PROT_READ | PROT_EXEC, MAP_INHERIT_SHARE, POSIX_MADV_RANDOM, 0))) { + PROT_READ | PROT_EXEC, MAP_INHERIT_SHARE, MADV_RANDOM, 0))) { uao_detach(e->e_sigobject); return (ENOMEM); } |