diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2009-04-17 04:03:01 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2009-04-27 23:52:19 -0400 |
commit | 2e8aead1b57ede7979bd4e24797c77e181775d9c (patch) | |
tree | 3094205053e674d29a1fdef05f5ed2488fd1b9b8 /arch/powerpc | |
parent | de60fba2bb5ba0622058d422ab211f3cfd38ed7b (diff) |
powerpc: ppc32 needs elf_read_implies_exec()
On ppc64 we implemented elf_read_implies_exec() for 32-bit binaries
because old toolchains had bugs where they didn't mark program
segments executable that needed to be. For some reason we didn't do
this on ppc32 builds. This hadn't been an issue until commit 8d30c14c
("powerpc/mm: Rework I$/D$ coherency (v3)"), which had as a side
effect that we are now enforcing execute permissions to some extent on
32-bit 4xx and Book E processors.
This fixes it by defining elf_read_implies_exec on 32-bit to turn on
the read-implies-exec behaviour on programs that are sufficiently old
that they don't have a PT_GNU_STACK program header.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/include/asm/elf.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h index 087c22f1d368..d6b4a12cdeff 100644 --- a/arch/powerpc/include/asm/elf.h +++ b/arch/powerpc/include/asm/elf.h | |||
@@ -260,6 +260,7 @@ do { \ | |||
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 | #endif /* __powerpc64__ */ | 264 | #endif /* __powerpc64__ */ |
264 | 265 | ||
265 | extern int dcache_bsize; | 266 | extern int dcache_bsize; |