]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
[ARM] 5404/1: Fix condition in arm_elf_read_implies_exec() to set READ_IMPLIES_EXEC
authorMakito SHIOKAWA <lkhmkt@gmail.com>
Thu, 19 Feb 2009 14:34:59 +0000 (15:34 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 19 Feb 2009 14:45:27 +0000 (14:45 +0000)
READ_IMPLIES_EXEC must be set when:
o binary _is_ an executable stack (i.e. not EXSTACK_DISABLE_X)
o processor architecture is _under_ ARMv6 (XN bit is supported from ARMv6)

Signed-off-by: Makito SHIOKAWA <lkhmkt@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/elf.c

index 84849098c8e8139da19ae6b8d8fecd089539ee30..d4a0da1e48f40988bb7f92ce34664d86adb74a32 100644 (file)
@@ -74,9 +74,9 @@ EXPORT_SYMBOL(elf_set_personality);
  */
 int arm_elf_read_implies_exec(const struct elf32_hdr *x, int executable_stack)
 {
-       if (executable_stack != EXSTACK_ENABLE_X)
+       if (executable_stack != EXSTACK_DISABLE_X)
                return 1;
-       if (cpu_architecture() <= CPU_ARCH_ARMv6)
+       if (cpu_architecture() < CPU_ARCH_ARMv6)
                return 1;
        return 0;
 }