From 6244ef07ab6b5ef59d4d4c2b1aaa2c05d6587fec Mon Sep 17 00:00:00 2001 From: David Daney Date: Tue, 10 Jan 2012 15:10:21 -0800 Subject: [PATCH] --- yaml --- r: 283083 b: refs/heads/master c: e39f560239984c3098237ad94c9449b1494163f8 h: refs/heads/master i: 283081: 65dfc65d56d1913ba4197029117bc8cb36306c97 283079: d1ae240e5468f64453835e286ff206ac8cc7fdfc v: v3 --- [refs] | 2 +- trunk/arch/arm/Kconfig | 1 + trunk/arch/x86/Kconfig | 1 + trunk/fs/Kconfig.binfmt | 3 +++ trunk/fs/binfmt_elf.c | 2 +- 5 files changed, 7 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 65a3bdf51a55..d6e851bab129 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5742332dea5560d6c449b007d9539dbdc8ee531b +refs/heads/master: e39f560239984c3098237ad94c9449b1494163f8 diff --git a/trunk/arch/arm/Kconfig b/trunk/arch/arm/Kconfig index 9d66dfc33a5a..98a6459cd398 100644 --- a/trunk/arch/arm/Kconfig +++ b/trunk/arch/arm/Kconfig @@ -16,6 +16,7 @@ config ARM select HAVE_FTRACE_MCOUNT_RECORD if (!XIP_KERNEL) select HAVE_DYNAMIC_FTRACE if (!XIP_KERNEL) select HAVE_FUNCTION_GRAPH_TRACER if (!THUMB2_KERNEL) + select ARCH_BINFMT_ELF_RANDOMIZE_PIE select HAVE_GENERIC_DMA_COHERENT select HAVE_KERNEL_GZIP select HAVE_KERNEL_LZO diff --git a/trunk/arch/x86/Kconfig b/trunk/arch/x86/Kconfig index 1d2a69dd36d8..d6ddc0bfe36a 100644 --- a/trunk/arch/x86/Kconfig +++ b/trunk/arch/x86/Kconfig @@ -62,6 +62,7 @@ config X86 select ANON_INODES select HAVE_ARCH_KMEMCHECK select HAVE_USER_RETURN_NOTIFIER + select ARCH_BINFMT_ELF_RANDOMIZE_PIE select HAVE_ARCH_JUMP_LABEL select HAVE_TEXT_POKE_SMP select HAVE_GENERIC_HARDIRQS diff --git a/trunk/fs/Kconfig.binfmt b/trunk/fs/Kconfig.binfmt index 79e2ca7973b7..e95d1b64082c 100644 --- a/trunk/fs/Kconfig.binfmt +++ b/trunk/fs/Kconfig.binfmt @@ -27,6 +27,9 @@ config COMPAT_BINFMT_ELF bool depends on COMPAT && BINFMT_ELF +config ARCH_BINFMT_ELF_RANDOMIZE_PIE + bool + config BINFMT_ELF_FDPIC bool "Kernel support for FDPIC ELF binaries" default y diff --git a/trunk/fs/binfmt_elf.c b/trunk/fs/binfmt_elf.c index 21ac5ee4b43f..bcb884e2d613 100644 --- a/trunk/fs/binfmt_elf.c +++ b/trunk/fs/binfmt_elf.c @@ -794,7 +794,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. */ -#if defined(CONFIG_X86) || defined(CONFIG_ARM) +#ifdef CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE /* Memory randomization might have been switched off * in runtime via sysctl. * If that is the case, retain the original non-zero