Skip to content

Commit

Permalink
[ARM] 5404/1: Fix condition in arm_elf_read_implies_exec() to set REA…
Browse files Browse the repository at this point in the history
…D_IMPLIES_EXEC

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>
  • Loading branch information
Makito SHIOKAWA authored and Russell King committed Feb 19, 2009
1 parent 41f3103 commit 9da616f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm/kernel/elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9da616f

Please sign in to comment.