aboutsummaryrefslogtreecommitdiffstats
path: root/fs/binfmt_elf.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/binfmt_elf.c')
-rw-r--r--fs/binfmt_elf.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index f0b3171842f2..043a800c8f71 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -1021,6 +1021,12 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
1021 current->mm->end_data = end_data; 1021 current->mm->end_data = end_data;
1022 current->mm->start_stack = bprm->p; 1022 current->mm->start_stack = bprm->p;
1023 1023
1024#ifdef arch_randomize_brk
1025 if (current->flags & PF_RANDOMIZE)
1026 current->mm->brk = current->mm->start_brk =
1027 arch_randomize_brk(current->mm);
1028#endif
1029
1024 if (current->personality & MMAP_PAGE_ZERO) { 1030 if (current->personality & MMAP_PAGE_ZERO) {
1025 /* Why this, you ask??? Well SVr4 maps page 0 as read-only, 1031 /* Why this, you ask??? Well SVr4 maps page 0 as read-only,
1026 and some applications "depend" upon this behavior. 1032 and some applications "depend" upon this behavior.