Skip to content

Commit c1d025e

Browse files
Jiri Kosinatorvalds
authored andcommitted
binfmt_elf: PIE: make PF_RANDOMIZE check comment more accurate
The comment I originally added in commit a3defbe ("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>
1 parent 2535e0d commit c1d025e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎fs/binfmt_elf.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,8 @@ static int load_elf_binary(struct linux_binprm *bprm)
803803
* follow the loader, and is not movable. */
804804
#ifdef CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE
805805
/* Memory randomization might have been switched off
806-
* in runtime via sysctl.
806+
* in runtime via sysctl or explicit setting of
807+
* personality flags.
807808
* If that is the case, retain the original non-zero
808809
* load_bias value in order to establish proper
809810
* non-randomized mappings.

0 commit comments

Comments
 (0)