diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2014-07-13 08:15:17 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2014-07-13 08:15:17 +0000 |
commit | 2e9ef6b66a94d42389c1dc52c78b4db32d1d364a (patch) | |
tree | 26b61a78e891475ac44430ec5fbf51b621da7678 /sys | |
parent | 74a4d39df3a7a3646f5b03d73676221d5f47906c (diff) |
more mmap random on 64-bit platforms. noticed in freebsd aslr patches.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/uvm/uvm_map.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/uvm/uvm_map.c b/sys/uvm/uvm_map.c index 702b3bfe307..86fb84d4425 100644 --- a/sys/uvm/uvm_map.c +++ b/sys/uvm/uvm_map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_map.c,v 1.171 2014/07/12 18:44:01 tedu Exp $ */ +/* $OpenBSD: uvm_map.c,v 1.172 2014/07/13 08:15:16 tedu Exp $ */ /* $NetBSD: uvm_map.c,v 1.86 2000/11/27 08:40:03 chs Exp $ */ /* @@ -3541,7 +3541,11 @@ uvm_map_hint(struct vmspace *vm, vm_prot_t prot) } #endif +#ifdef __LP64__ + spacing = (MIN((4UL * 1024 * 1024 * 1024), BRKSIZ) - 1); +#else spacing = (MIN((256 * 1024 * 1024), BRKSIZ) - 1); +#endif addr = (vaddr_t)vm->vm_daddr; /* |