Commit d89ebca2 authored by Kumar Gala's avatar Kumar Gala Committed by Benjamin Herrenschmidt

powerpc: Fix up elf_read_implies_exec() usage

We believe if a toolchain supports PT_GNU_STACK that it sets the proper
PHDR permissions.  Therefor elf_read_implies_exec() should only be true
if we don't see PT_GNU_STACK set.
Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 8e27f4da
...@@ -256,11 +256,11 @@ do { \ ...@@ -256,11 +256,11 @@ do { \
* even if we have an executable stack. * even if we have an executable stack.
*/ */
# define elf_read_implies_exec(ex, exec_stk) (test_thread_flag(TIF_32BIT) ? \ # define elf_read_implies_exec(ex, exec_stk) (test_thread_flag(TIF_32BIT) ? \
(exec_stk != EXSTACK_DISABLE_X) : 0) (exec_stk == EXSTACK_DEFAULT) : 0)
#else #else
# define SET_PERSONALITY(ex) \ # define SET_PERSONALITY(ex) \
set_personality(PER_LINUX | (current->personality & (~PER_MASK))) set_personality(PER_LINUX | (current->personality & (~PER_MASK)))
# define elf_read_implies_exec(ex, exec_stk) (exec_stk != EXSTACK_DISABLE_X) # define elf_read_implies_exec(ex, exec_stk) (exec_stk == EXSTACK_DEFAULT)
#endif /* __powerpc64__ */ #endif /* __powerpc64__ */
extern int dcache_bsize; extern int dcache_bsize;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment