diff options
Diffstat (limited to 'include/asm-s390/elf.h')
-rw-r--r-- | include/asm-s390/elf.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/asm-s390/elf.h b/include/asm-s390/elf.h index b73a424d0f9..8181ca5b98f 100644 --- a/include/asm-s390/elf.h +++ b/include/asm-s390/elf.h @@ -115,6 +115,7 @@ typedef s390_regs elf_gregset_t; #include <linux/sched.h> /* for task_struct */ #include <asm/system.h> /* for save_access_regs */ +#include <asm/mmu_context.h> /* * This is used to ensure we don't load something for the wrong architecture. @@ -214,4 +215,16 @@ do { \ } while (0) #endif /* __s390x__ */ +/* + * An executable for which elf_read_implies_exec() returns TRUE will + * have the READ_IMPLIES_EXEC personality flag set automatically. + */ +#define elf_read_implies_exec(ex, executable_stack) \ +({ \ + if (current->mm->context.noexec && \ + executable_stack != EXSTACK_DISABLE_X) \ + disable_noexec(current->mm, current); \ + current->mm->context.noexec == 0; \ +}) + #endif |