[PATCH][Jaunty] ARM: Toggle incorrect READ_IMPLIES_EXEC logic

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH][Jaunty] ARM: Toggle incorrect READ_IMPLIES_EXEC logic

Amit Kucheria-6
SRU justification:

Impact:
 - Was (incorrectly) setting READ_IMPLIES_EXEC when stack execution was disabled
 - Was (incorrectly) setting READ_IMPLIES_EXEC for ARMv6 processors. They
   support the XN bit.

Fix: Toggle the incorrect logic in arm_elf_read_implies_exec()

Testcase: /proc/self/personality should not have READ_IMPLIES_EXEC on iMX51

Makito SHIOKAWA (1):
  UBUNTU: [ARM] 5404/1: Fix condition in arm_elf_read_implies_exec() to
    set READ_IMPLIES_EXEC

 arch/arm/kernel/elf.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[PATCH] UBUNTU: [ARM] 5404/1: Fix condition in arm_elf_read_implies_exec() to set READ_IMPLIES_EXEC

Amit Kucheria-6
From: Makito SHIOKAWA <[hidden email]>

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)

Bug: #364358

Signed-off-by: Makito SHIOKAWA <[hidden email]>
Signed-off-by: Russell King <[hidden email]>
Signed-off-by: Amit Kucheria <[hidden email]>
---
 arch/arm/kernel/elf.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/kernel/elf.c b/arch/arm/kernel/elf.c
index 8484909..d4a0da1 100644
--- a/arch/arm/kernel/elf.c
+++ b/arch/arm/kernel/elf.c
@@ -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;
 }
--
1.6.0.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH][Jaunty] ARM: Toggle incorrect READ_IMPLIES_EXEC logic

Stefan Bader-2
In reply to this post by Amit Kucheria-6
Amit Kucheria wrote:

> SRU justification:
>
> Impact:
>  - Was (incorrectly) setting READ_IMPLIES_EXEC when stack execution was disabled
>  - Was (incorrectly) setting READ_IMPLIES_EXEC for ARMv6 processors. They
>    support the XN bit.
>
> Fix: Toggle the incorrect logic in arm_elf_read_implies_exec()
>
> Testcase: /proc/self/personality should not have READ_IMPLIES_EXEC on iMX51
>
> Makito SHIOKAWA (1):
>   UBUNTU: [ARM] 5404/1: Fix condition in arm_elf_read_implies_exec() to
>     set READ_IMPLIES_EXEC
>
>  arch/arm/kernel/elf.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
>
ACK

--

When all other means of communication fail, try words!



--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH][Jaunty] ARM: Toggle incorrect READ_IMPLIES_EXEC logic

Tim Gardner-2
In reply to this post by Amit Kucheria-6
Amit Kucheria wrote:

> SRU justification:
>
> Impact:
>  - Was (incorrectly) setting READ_IMPLIES_EXEC when stack execution was disabled
>  - Was (incorrectly) setting READ_IMPLIES_EXEC for ARMv6 processors. They
>    support the XN bit.
>
> Fix: Toggle the incorrect logic in arm_elf_read_implies_exec()
>
> Testcase: /proc/self/personality should not have READ_IMPLIES_EXEC on iMX51
>
> Makito SHIOKAWA (1):
>   UBUNTU: [ARM] 5404/1: Fix condition in arm_elf_read_implies_exec() to
>     set READ_IMPLIES_EXEC
>
>  arch/arm/kernel/elf.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
>

ACK

--
Tim Gardner [hidden email]

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH][Jaunty] ARM: Toggle incorrect READ_IMPLIES_EXEC logic

Colin Ian King-2
In reply to this post by Amit Kucheria-6
ACK, looks sane

On Thu, 2009-04-23 at 10:23 +0300, Amit Kucheria wrote:

> SRU justification:
>
> Impact:
>  - Was (incorrectly) setting READ_IMPLIES_EXEC when stack execution was disabled
>  - Was (incorrectly) setting READ_IMPLIES_EXEC for ARMv6 processors. They
>    support the XN bit.
>
> Fix: Toggle the incorrect logic in arm_elf_read_implies_exec()
>
> Testcase: /proc/self/personality should not have READ_IMPLIES_EXEC on iMX51
>
> Makito SHIOKAWA (1):
>   UBUNTU: [ARM] 5404/1: Fix condition in arm_elf_read_implies_exec() to
>     set READ_IMPLIES_EXEC
>
>  arch/arm/kernel/elf.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
>
--
Colin King   <[hidden email]>
"Me transmitte sursum, caledoni"


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH][Jaunty] ARM: Toggle incorrect READ_IMPLIES_EXEC logic

Stefan Bader-2
In reply to this post by Amit Kucheria-6