]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
ARM: 6342/1: fix ASLR of PIE executables
authorNicolas Pitre <nico@fluxnic.net>
Fri, 20 Aug 2010 20:14:46 +0000 (21:14 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 8 Oct 2010 09:02:53 +0000 (10:02 +0100)
Since commits 990cb8acf2 and cc92c28b2d, it is possible to have full
address space layout randomization (ASLR) on ARM.  Except that one small
change was missing for ASLR of PIE executables.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
fs/binfmt_elf.c

index 535e763ab1a61e56ef5d25d725dc4f39eb899a49..6884e198e0c70d092192a34089d0b6d828e43f33 100644 (file)
@@ -800,7 +800,7 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
                         * default mmap base, as well as whatever program they
                         * might try to exec.  This is because the brk will
                         * follow the loader, and is not movable.  */
-#ifdef CONFIG_X86
+#if defined(CONFIG_X86) || defined(CONFIG_ARM)
                        load_bias = 0;
 #else
                        load_bias = ELF_PAGESTART(ELF_ET_DYN_BASE - vaddr);