Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 273229
b: refs/heads/master
c: a3defbe
h: refs/heads/master
i:
  273227: 92878dc
v: v3
  • Loading branch information
Jiri Kosina authored and Linus Torvalds committed Nov 2, 2011
1 parent 39992f2 commit dc415f8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b35a35b556f5e6b7993ad0baf20173e75c09ce8c
refs/heads/master: a3defbe5c337dbc6da911f8cc49ae3cc3b49b453
11 changes: 10 additions & 1 deletion trunk/fs/binfmt_elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,16 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
* might try to exec. This is because the brk will
* follow the loader, and is not movable. */
#if defined(CONFIG_X86) || defined(CONFIG_ARM)
load_bias = 0;
/* Memory randomization might have been switched off
* in runtime via sysctl.
* If that is the case, retain the original non-zero
* load_bias value in order to establish proper
* non-randomized mappings.
*/
if (current->flags & PF_RANDOMIZE)
load_bias = 0;
else
load_bias = ELF_PAGESTART(ELF_ET_DYN_BASE - vaddr);
#else
load_bias = ELF_PAGESTART(ELF_ET_DYN_BASE - vaddr);
#endif
Expand Down

0 comments on commit dc415f8

Please sign in to comment.