aboutsummaryrefslogtreecommitdiffstats
path: root/fs/binfmt_elf.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2013-04-30 18:27:45 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-30 20:04:04 -0400
commitc1d025e22e0ef167a4589cf5a6b2a32bfef0472c (patch)
tree1f1f2d4ef18082854a0b5e21cdac998d15a276a3 /fs/binfmt_elf.c
parent2535e0d723e4d7723b030f39fb350e436bdb983f (diff)
binfmt_elf: PIE: make PF_RANDOMIZE check comment more accurate
The comment I originally added in commit a3defbe5c337 ("binfmt_elf: fix PIE execution with randomization disabled") is not really 100% accurate -- sysctl is not the only way how PF_RANDOMIZE could be forcibly unset in runtime. Another option of course is direct modification of personality flags (i.e. running through setarch wrapper). Make the comment more explicit and accurate. Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/binfmt_elf.c')
-rw-r--r--fs/binfmt_elf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 86af964c2425..e32344bdfab1 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -803,7 +803,8 @@ static int load_elf_binary(struct linux_binprm *bprm)
803 * follow the loader, and is not movable. */ 803 * follow the loader, and is not movable. */
804#ifdef CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE 804#ifdef CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE
805 /* Memory randomization might have been switched off 805 /* Memory randomization might have been switched off
806 * in runtime via sysctl. 806 * in runtime via sysctl or explicit setting of
807 * personality flags.
807 * If that is the case, retain the original non-zero 808 * If that is the case, retain the original non-zero
808 * load_bias value in order to establish proper 809 * load_bias value in order to establish proper
809 * non-randomized mappings. 810 * non-randomized mappings.