diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2009-04-27 23:32:36 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-05-21 01:44:21 -0400 |
commit | d89ebca2248ab03a5928e7dd30b6c304283fc207 (patch) | |
tree | b1090979a0d344ec6df62d5abd9eedd1b42fb3d5 /arch/powerpc/include/asm/elf.h | |
parent | 8e27f4dab386c3898566cb7c4fa674c9eda4c79f (diff) |
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: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm/elf.h')
-rw-r--r-- | arch/powerpc/include/asm/elf.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h index d6b4a12cdeff..014a624f4c8e 100644 --- a/arch/powerpc/include/asm/elf.h +++ b/arch/powerpc/include/asm/elf.h | |||
@@ -256,11 +256,11 @@ do { \ | |||
256 | * even if we have an executable stack. | 256 | * even if we have an executable stack. |
257 | */ | 257 | */ |
258 | # define elf_read_implies_exec(ex, exec_stk) (test_thread_flag(TIF_32BIT) ? \ | 258 | # define elf_read_implies_exec(ex, exec_stk) (test_thread_flag(TIF_32BIT) ? \ |
259 | (exec_stk != EXSTACK_DISABLE_X) : 0) | 259 | (exec_stk == EXSTACK_DEFAULT) : 0) |
260 | #else | 260 | #else |
261 | # define SET_PERSONALITY(ex) \ | 261 | # define SET_PERSONALITY(ex) \ |
262 | set_personality(PER_LINUX | (current->personality & (~PER_MASK))) | 262 | set_personality(PER_LINUX | (current->personality & (~PER_MASK))) |
263 | # define elf_read_implies_exec(ex, exec_stk) (exec_stk != EXSTACK_DISABLE_X) | 263 | # define elf_read_implies_exec(ex, exec_stk) (exec_stk == EXSTACK_DEFAULT) |
264 | #endif /* __powerpc64__ */ | 264 | #endif /* __powerpc64__ */ |
265 | 265 | ||
266 | extern int dcache_bsize; | 266 | extern int dcache_bsize; |