author: Kees Cook <keescook@chromium.org> 2015-04-14 15:48:12 -0700
committer: Linus Torvalds <torvalds@linux-foundation.org> 2015-04-14 16:49:05 -0700
commit: 204db6ed17743000691d930368a5abd6ea541c58
parent: d1fd836dcf00d2028c700c7e44d2c23404062c90
Commit Summary:
Diffstat:
1 file changed, 1 insertion, 3 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index b20c05477e90..241ef68d2893 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -1050,15 +1050,13 @@ static int load_elf_binary(struct linux_binprm *bprm)
current->mm->end_data = end_data;
current->mm->start_stack = bprm->p;
-#ifdef arch_randomize_brk
if ((current->flags & PF_RANDOMIZE) && (randomize_va_space > 1)) {
current->mm->brk = current->mm->start_brk =
arch_randomize_brk(current->mm);
-#ifdef CONFIG_COMPAT_BRK
+#ifdef compat_brk_randomized
current->brk_randomized = 1;
#endif
}
-#endif
if (current->personality & MMAP_PAGE_ZERO) {
/* Why this, you ask??? Well SVr4 maps page 0 as read-only,