From 3391c22e5b6aaeb289bcc1ad0d5b3f2ba5421f22 Mon Sep 17 00:00:00 2001 From: Markus Schoder Date: Mon, 10 Jul 2006 17:06:06 +0200 Subject: [PATCH] x86_64: Bring x86-64 ia32 emul in sync with i386 on READ_IMPLIES_EXEC enabling Currently ia32 binaries behave differently with respect to enabling READ_IMPLIES_EXEC. On i386 a binary with the exec_stack flag set is executed with READ_IMPLIES_EXEC enabled as well. The same binary executes without READ_IMPLIES_EXEC on x86-64. This causes binaries that work on i386 to fail on x86-64 which goes somewhat against the whole 32 bit emulation idea. It has been argued that READ_IMPLIES_EXEC should not be enabled at all for binaries that have the exec_stack flag. Which is probably a valid point. However until this is clarified I think x86-64 should behave the same for ia32 binaries as i386. The following patch brings x86-64 in sync with i386 for ia32 binaries. Signed-off-by: Markus Schoder Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds --- arch/x86_64/ia32/ia32_binfmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c index 926c4743d13b2..a9dc0f3b5b519 100644 --- a/arch/x86_64/ia32/ia32_binfmt.c +++ b/arch/x86_64/ia32/ia32_binfmt.c @@ -182,7 +182,7 @@ struct elf_prpsinfo #define user user32 #define __ASM_X86_64_ELF_H 1 -#define elf_read_implies_exec(ex, have_pt_gnu_stack) (!(have_pt_gnu_stack)) +#define elf_read_implies_exec(ex, executable_stack) (executable_stack != EXSTACK_DISABLE_X) //#include #include -- cgit 1.2.3-korg