summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exec.c
diff options
context:
space:
mode:
authorart <art@openbsd.org>2003-04-14 04:53:50 +0000
committerart <art@openbsd.org>2003-04-14 04:53:50 +0000
commit17725b5eb79f4010ebb7ef2291f70ec156dc4798 (patch)
tree8857d4115cbb487c1ebd346f19800747aade1b55 /sys/kern/kern_exec.c
parentstrlcpy, pretty easy (diff)
downloadwireguard-openbsd-17725b5eb79f4010ebb7ef2291f70ec156dc4798.tar.xz
wireguard-openbsd-17725b5eb79f4010ebb7ef2291f70ec156dc4798.zip
There are two related changes.
The first one is an mquery(2) syscall. It's for asking the VM system about where to map things. It will be used by ld.so, read the man page for details. The second change is related and is a centralization of uvm_map hint that all callers of uvm_map calculated. This will allow us to adjust this hint on architectures that have segments for non-exec mappings. deraadt@ drahn@ ok.
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r--sys/kern/kern_exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 77faaf4960f..9504237bc22 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_exec.c,v 1.76 2003/03/09 01:27:50 millert Exp $ */
+/* $OpenBSD: kern_exec.c,v 1.77 2003/04/14 04:53:50 art Exp $ */
/* $NetBSD: kern_exec.c,v 1.75 1996/02/09 18:59:28 christos Exp $ */
/*-
@@ -732,7 +732,7 @@ exec_sigcode_map(struct proc *p, struct emul *e)
}
/* Just a hint to uvm_mmap where to put it. */
- p->p_sigcode = round_page((vaddr_t)p->p_vmspace->vm_daddr + MAXDSIZ);
+ p->p_sigcode = uvm_map_hint(p, VM_PROT_READ|VM_PROT_EXECUTE);
uao_reference(e->e_sigobject);
if (uvm_map(&p->p_vmspace->vm_map, &p->p_sigcode, round_page(sz),
e->e_sigobject, 0, 0, UVM_MAPFLAG(UVM_PROT_RX, UVM_PROT_RX,