Enable reservations early (before any mapping is created) if the new process is in PCuABI, and otherwise disable them (the corresponding mm flag being inherited from the parent).
Signed-off-by: Kevin Brodsky kevin.brodsky@arm.com --- fs/binfmt_elf.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index e330dec431be..8617b5328197 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -1287,6 +1287,8 @@ static int load_elf_binary(struct linux_binprm *bprm) if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space) current->flags |= PF_RANDOMIZE;
+ reserv_mm_set_flag(current->mm, ELF_COMPAT); + setup_new_exec(bprm);
/* Do this so that we can load the interpreter, if need be. We will