* [merged] fs-binfmt_elf-create-kconfig-variable-for-pie-randomization.patch removed from -mm tree
@ 2012-01-11 21:31 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2012-01-11 21:31 UTC (permalink / raw)
To: ddaney.cavm, david.daney, hpa, linux, mingo, ralf, tglx, viro,
mm-commits
The patch titled
Subject: fs: binfmt_elf: create Kconfig variable for PIE randomization
has been removed from the -mm tree. Its filename was
fs-binfmt_elf-create-kconfig-variable-for-pie-randomization.patch
This patch was dropped because it was merged into mainline or a subsystem tree
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
From: David Daney <ddaney.cavm@gmail.com>
Subject: fs: binfmt_elf: create Kconfig variable for PIE randomization
Randomization of PIE load address is hard coded in binfmt_elf.c for X86
and ARM. Create a new Kconfig variable
(CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE) for this and use it instead. Thus
architecture specific policy is pushed out of the generic binfmt_elf.c and
into the architecture Kconfig files.
X86 and ARM Kconfigs are modified to select the new variable so there is
no change in behavior. A follow on patch will select it for MIPS too.
Signed-off-by: David Daney <david.daney@cavium.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
arch/arm/Kconfig | 1 +
arch/x86/Kconfig | 1 +
fs/Kconfig.binfmt | 3 +++
fs/binfmt_elf.c | 2 +-
4 files changed, 6 insertions(+), 1 deletion(-)
diff -puN arch/arm/Kconfig~fs-binfmt_elf-create-kconfig-variable-for-pie-randomization arch/arm/Kconfig
--- a/arch/arm/Kconfig~fs-binfmt_elf-create-kconfig-variable-for-pie-randomization
+++ a/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 -puN arch/x86/Kconfig~fs-binfmt_elf-create-kconfig-variable-for-pie-randomization arch/x86/Kconfig
--- a/arch/x86/Kconfig~fs-binfmt_elf-create-kconfig-variable-for-pie-randomization
+++ a/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 -puN fs/Kconfig.binfmt~fs-binfmt_elf-create-kconfig-variable-for-pie-randomization fs/Kconfig.binfmt
--- a/fs/Kconfig.binfmt~fs-binfmt_elf-create-kconfig-variable-for-pie-randomization
+++ a/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 -puN fs/binfmt_elf.c~fs-binfmt_elf-create-kconfig-variable-for-pie-randomization fs/binfmt_elf.c
--- a/fs/binfmt_elf.c~fs-binfmt_elf-create-kconfig-variable-for-pie-randomization
+++ a/fs/binfmt_elf.c
@@ -794,7 +794,7 @@ static int load_elf_binary(struct linux_
* 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
_
Patches currently in -mm which might be from ddaney.cavm@gmail.com are
origin.patch
linux-next.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-01-11 21:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-11 21:31 [merged] fs-binfmt_elf-create-kconfig-variable-for-pie-randomization.patch removed from -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.