aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm/elf.h
diff options
context:
space:
mode:
authorSteve Capper <steve.capper@arm.com>2018-12-06 22:50:42 +0000
committerWill Deacon <will.deacon@arm.com>2018-12-10 18:42:18 +0000
commitb9567720a1b8e739380e0241413606c056c57859 (patch)
tree760f658f0fbb3ec46f0cbdaa0314245f6f094fb7 /arch/arm64/include/asm/elf.h
parentarm64: mm: introduce 52-bit userspace support (diff)
downloadlinux-dev-b9567720a1b8e739380e0241413606c056c57859.tar.xz
linux-dev-b9567720a1b8e739380e0241413606c056c57859.zip
arm64: mm: Allow forcing all userspace addresses to 52-bit
On arm64 52-bit VAs are provided to userspace when a hint is supplied to mmap. This helps maintain compatibility with software that expects at most 48-bit VAs to be returned. In order to help identify software that has 48-bit VA assumptions, this patch allows one to compile a kernel where 52-bit VAs are returned by default on HW that supports it. This feature is intended to be for development systems only. Signed-off-by: Steve Capper <steve.capper@arm.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to '')
-rw-r--r--arch/arm64/include/asm/elf.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h
index bc9bd9e77d9d..6adc1a90e7e6 100644
--- a/arch/arm64/include/asm/elf.h
+++ b/arch/arm64/include/asm/elf.h
@@ -117,7 +117,11 @@
* 64-bit, this is above 4GB to leave the entire 32-bit address
* space open for things that want to use the area for 32-bit pointers.
*/
+#ifdef CONFIG_ARM64_FORCE_52BIT
+#define ELF_ET_DYN_BASE (2 * TASK_SIZE_64 / 3)
+#else
#define ELF_ET_DYN_BASE (2 * DEFAULT_MAP_WINDOW_64 / 3)
+#endif /* CONFIG_ARM64_FORCE_52BIT */
#ifndef __ASSEMBLY__