]> git.karo-electronics.de Git - karo-tx-linux.git/commit
fs: binfmt_elf: create Kconfig variable for PIE randomization
authorDavid Daney <ddaney.cavm@gmail.com>
Fri, 2 Dec 2011 03:12:48 +0000 (14:12 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 2 Dec 2011 03:15:45 +0000 (14:15 +1100)
commitca1b2c5e3e725563f489a67cc4b91b65f0aac755
treee178f7bc1f29672bfeee9b3e1aa3cdf4a087e018
parenta46475e91df944e977e70c760f4378bb82ad8b35
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
arch/x86/Kconfig
fs/Kconfig.binfmt
fs/binfmt_elf.c