diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2014-08-12 04:28:08 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2014-08-12 04:28:08 +0000 |
commit | ab356290dd89c18222b05146b355ce96d1c54f41 (patch) | |
tree | b449dd21e86fcd4ec914f4f257ea0d6965a5ffdd /sys/arch | |
parent | 9a5cac98d1a78ba397f0923ce406a2e9dab83a6a (diff) |
Pass 0 instead of uvm_map_hint() to uvm_map() in exec_md_map() to figure out
where to put the fpu assist page, for uvm_map_hint() may return an address
outside userland bounds due to aggressive randomization. Passing zero will
still get a random address, but correctly bounded.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/mips64/mips64/mips64_machdep.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/mips64/mips64/mips64_machdep.c b/sys/arch/mips64/mips64/mips64_machdep.c index 5c14041b4de..b0663d27ac5 100644 --- a/sys/arch/mips64/mips64/mips64_machdep.c +++ b/sys/arch/mips64/mips64/mips64_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mips64_machdep.c,v 1.15 2014/04/03 08:07:16 mpi Exp $ */ +/* $OpenBSD: mips64_machdep.c,v 1.16 2014/08/12 04:28:07 miod Exp $ */ /* * Copyright (c) 2009, 2010, 2012 Miodrag Vallat. @@ -181,7 +181,7 @@ exec_md_map(struct proc *p, struct exec_package *pack) * successful conditional branches. */ - va = uvm_map_hint(p->p_vmspace, UVM_PROT_RX); + va = 0; rc = uvm_map(&p->p_vmspace->vm_map, &va, PAGE_SIZE, NULL, UVM_UNKNOWN_OFFSET, 0, UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_ALL, UVM_INH_COPY, |