|
@@ -1021,6 +1021,12 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
|
|
current->mm->end_data = end_data;
|
|
current->mm->end_data = end_data;
|
|
current->mm->start_stack = bprm->p;
|
|
current->mm->start_stack = bprm->p;
|
|
|
|
|
|
|
|
+#ifdef arch_randomize_brk
|
|
|
|
+ if (current->flags & PF_RANDOMIZE)
|
|
|
|
+ current->mm->brk = current->mm->start_brk =
|
|
|
|
+ arch_randomize_brk(current->mm);
|
|
|
|
+#endif
|
|
|
|
+
|
|
if (current->personality & MMAP_PAGE_ZERO) {
|
|
if (current->personality & MMAP_PAGE_ZERO) {
|
|
/* Why this, you ask??? Well SVr4 maps page 0 as read-only,
|
|
/* Why this, you ask??? Well SVr4 maps page 0 as read-only,
|
|
and some applications "depend" upon this behavior.
|
|
and some applications "depend" upon this behavior.
|