summaryrefslogtreecommitdiffstats
path: root/include/asm-ppc64/elf.h
diff options
context:
space:
mode:
authorAnton Blanchard2005-05-01 17:58:45 +0200
committerLinus Torvalds2005-05-01 17:58:45 +0200
commita2f95a5ae99eb8209ad8d9faeaada00600bd8027 (patch)
treec135aff1ea47e57fcdfe22cca12e77738f433d27 /include/asm-ppc64/elf.h
parent[PATCH] PPC64: Remove hot busy-wait loop in __hash_page (diff)
downloadkernel-qcow2-linux-a2f95a5ae99eb8209ad8d9faeaada00600bd8027.tar.gz
kernel-qcow2-linux-a2f95a5ae99eb8209ad8d9faeaada00600bd8027.tar.xz
kernel-qcow2-linux-a2f95a5ae99eb8209ad8d9faeaada00600bd8027.zip
[PATCH] ppc64: noexec fixes
There were a few issues with the ppc64 noexec support: The 64bit ABI has a non executable stack by default. At the moment 64bit apps require a PT_GNU_STACK section in order to have a non executable stack. Disable the read implies exec workaround on the 64bit ABI. The 64bit toolchain has never had problems with incorrect mmap permissions (the 32bit has, thats why we need to retain the workaround). With these fixes as well as a gcc fix from Alan Modra (that was recently committed) 64bit apps work as expected. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-ppc64/elf.h')
-rw-r--r--include/asm-ppc64/elf.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/asm-ppc64/elf.h b/include/asm-ppc64/elf.h
index 8457d90244fb..6c42d61bedd1 100644
--- a/include/asm-ppc64/elf.h
+++ b/include/asm-ppc64/elf.h
@@ -229,9 +229,13 @@ do { \
/*
* An executable for which elf_read_implies_exec() returns TRUE will
- * have the READ_IMPLIES_EXEC personality flag set automatically.
+ * have the READ_IMPLIES_EXEC personality flag set automatically. This
+ * is only required to work around bugs in old 32bit toolchains. Since
+ * the 64bit ABI has never had these issues dont enable the workaround
+ * even if we have an executable stack.
*/
-#define elf_read_implies_exec(ex, exec_stk) (exec_stk != EXSTACK_DISABLE_X)
+#define elf_read_implies_exec(ex, exec_stk) (test_thread_flag(TIF_32BIT) ? \
+ (exec_stk != EXSTACK_DISABLE_X) : 0)
#endif