summarylogtreecommitdiffstats
path: root/mm-Revert-x86_64-and-arm64-ELF_ET_DYN_BASE-base.patch
diff options
context:
space:
mode:
Diffstat (limited to 'mm-Revert-x86_64-and-arm64-ELF_ET_DYN_BASE-base.patch')
-rw-r--r--mm-Revert-x86_64-and-arm64-ELF_ET_DYN_BASE-base.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/mm-Revert-x86_64-and-arm64-ELF_ET_DYN_BASE-base.patch b/mm-Revert-x86_64-and-arm64-ELF_ET_DYN_BASE-base.patch
new file mode 100644
index 000000000000..bf089e08adc6
--- /dev/null
+++ b/mm-Revert-x86_64-and-arm64-ELF_ET_DYN_BASE-base.patch
@@ -0,0 +1,35 @@
+diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h
+index acae781f7359..3288c2b36731 100644
+--- a/arch/arm64/include/asm/elf.h
++++ b/arch/arm64/include/asm/elf.h
+@@ -114,10 +114,10 @@
+
+ /*
+ * This is the base location for PIE (ET_DYN with INTERP) loads. On
+- * 64-bit, this is raised to 4GB to leave the entire 32-bit address
++ * 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.
+ */
+-#define ELF_ET_DYN_BASE 0x100000000UL
++#define ELF_ET_DYN_BASE (2 * TASK_SIZE_64 / 3)
+
+ #ifndef __ASSEMBLY__
+
+diff --git a/arch/x86/include/asm/elf.h b/arch/x86/include/asm/elf.h
+index 1c18d83d3f09..9aeb91935ce0 100644
+--- a/arch/x86/include/asm/elf.h
++++ b/arch/x86/include/asm/elf.h
+@@ -247,11 +247,11 @@ extern int force_personality32;
+
+ /*
+ * This is the base location for PIE (ET_DYN with INTERP) loads. On
+- * 64-bit, this is raised to 4GB to leave the entire 32-bit address
++ * 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.
+ */
+ #define ELF_ET_DYN_BASE (mmap_is_ia32() ? 0x000400000UL : \
+- 0x100000000UL)
++ (TASK_SIZE / 3 * 2))
+
+ /* This yields a mask that user programs can use to figure out what
+ instruction set this CPU supports. This could be done in user space,