diff options
author | Kurt Miller <kurt@cvs.openbsd.org> | 2008-07-18 16:40:18 +0000 |
---|---|---|
committer | Kurt Miller <kurt@cvs.openbsd.org> | 2008-07-18 16:40:18 +0000 |
commit | 9d741144290ccbc0fa7905a4b2359a24d7606fbd (patch) | |
tree | aaf5480cc97ddb01e80b6498db6c60b3f8610427 /sys/arch/sparc64/include | |
parent | 98b4cba6a75c90bb5103f54759d0b1b7a886ed22 (diff) |
Add new uvm function called uvm_map_pie() which takes align as a
parameter and returns an aligned random load address for position
independent executables to use. This also adds three new vmparam.h
defines to specify the maximum address, minimum address and minimum
allowed alignment for uvm_map_pie() to use. The PIE address range
for i386 was carefully selected to work well within the i386 W^X
framework.
With much help and feedback from weingart@.
okay weingart@, miod@, kettenis@, drahn@
Diffstat (limited to 'sys/arch/sparc64/include')
-rw-r--r-- | sys/arch/sparc64/include/vmparam.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/sparc64/include/vmparam.h b/sys/arch/sparc64/include/vmparam.h index ba1bdaf2120..f2239697466 100644 --- a/sys/arch/sparc64/include/vmparam.h +++ b/sys/arch/sparc64/include/vmparam.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vmparam.h,v 1.17 2008/06/04 18:11:34 miod Exp $ */ +/* $OpenBSD: vmparam.h,v 1.18 2008/07/18 16:40:17 kurt Exp $ */ /* $NetBSD: vmparam.h,v 1.18 2001/05/01 02:19:19 thorpej Exp $ */ /* @@ -131,6 +131,10 @@ #define VM_MAX_ADDRESS ((vaddr_t)-1) #define VM_MAXUSER_ADDRESS ((vaddr_t)-1) +/* map PIE into the first quarter of the address space before hole */ +#define VM_PIE_MIN_ADDR PAGE_SIZE +#define VM_PIE_MAX_ADDR 0x10000000000 + #define VM_MIN_KERNEL_ADDRESS ((vaddr_t)KERNBASE) #define VM_MAX_KERNEL_ADDRESS ((vaddr_t)0x000007ffffffffffL) |