* [PATCH] ARM: kprobes: Change testcase with unpredictable STRD instruction
@ 2011-11-27 12:11 Tixy
2011-11-28 16:29 ` Nicolas Pitre
2011-11-30 23:56 ` Russell King - ARM Linux
0 siblings, 2 replies; 4+ messages in thread
From: Tixy @ 2011-11-27 12:11 UTC (permalink / raw)
To: linux-arm-kernel
There is a kprobes testcase for the instruction "strd r2, [r3], r4".
This has unpredictable behaviour as it uses r3 for register writeback
addressing and also stores it to memory.
On a cortex A9, this testcase would fail because the instruction writes
the updated value of r3 to memory, whereas the kprobes emulation code
writes the original value.
Fix this by changing testcase to used r5 instead of r3.
Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
---
arch/arm/kernel/kprobes-test-arm.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/kernel/kprobes-test-arm.c b/arch/arm/kernel/kprobes-test-arm.c
index fc82de8..edf9ad8 100644
--- a/arch/arm/kernel/kprobes-test-arm.c
+++ b/arch/arm/kernel/kprobes-test-arm.c
@@ -550,7 +550,7 @@ void kprobe_arm_test_cases(void)
TEST_RPR( "strccd r",8, VAL2,", [r",13,0, ", r",12,48,"]")
TEST_RPR( "strd r",4, VAL1,", [r",2, 24,", r",3, 48,"]!")
TEST_RPR( "strcsd r",12,VAL2,", [r",11,48,", -r",10,24,"]!")
- TEST_RPR( "strd r",2, VAL1,", [r",3, 24,"], r",4,48,"")
+ TEST_RPR( "strd r",2, VAL1,", [r",5, 24,"], r",4,48,"")
TEST_RPR( "strd r",10,VAL2,", [r",9, 48,"], -r",7,24,"")
TEST_UNSUPPORTED(".word 0xe1afc0fa @ strd r12, [pc, r10]!")
--
1.7.2.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] ARM: kprobes: Change testcase with unpredictable STRD instruction
2011-11-27 12:11 [PATCH] ARM: kprobes: Change testcase with unpredictable STRD instruction Tixy
@ 2011-11-28 16:29 ` Nicolas Pitre
2011-11-30 23:56 ` Russell King - ARM Linux
1 sibling, 0 replies; 4+ messages in thread
From: Nicolas Pitre @ 2011-11-28 16:29 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, 27 Nov 2011, Tixy wrote:
> There is a kprobes testcase for the instruction "strd r2, [r3], r4".
> This has unpredictable behaviour as it uses r3 for register writeback
> addressing and also stores it to memory.
>
> On a cortex A9, this testcase would fail because the instruction writes
> the updated value of r3 to memory, whereas the kprobes emulation code
> writes the original value.
>
> Fix this by changing testcase to used r5 instead of r3.
>
> Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Acked-by: Nicolas Pitre <nico@linaro.org>
> ---
> arch/arm/kernel/kprobes-test-arm.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/kernel/kprobes-test-arm.c b/arch/arm/kernel/kprobes-test-arm.c
> index fc82de8..edf9ad8 100644
> --- a/arch/arm/kernel/kprobes-test-arm.c
> +++ b/arch/arm/kernel/kprobes-test-arm.c
> @@ -550,7 +550,7 @@ void kprobe_arm_test_cases(void)
> TEST_RPR( "strccd r",8, VAL2,", [r",13,0, ", r",12,48,"]")
> TEST_RPR( "strd r",4, VAL1,", [r",2, 24,", r",3, 48,"]!")
> TEST_RPR( "strcsd r",12,VAL2,", [r",11,48,", -r",10,24,"]!")
> - TEST_RPR( "strd r",2, VAL1,", [r",3, 24,"], r",4,48,"")
> + TEST_RPR( "strd r",2, VAL1,", [r",5, 24,"], r",4,48,"")
> TEST_RPR( "strd r",10,VAL2,", [r",9, 48,"], -r",7,24,"")
> TEST_UNSUPPORTED(".word 0xe1afc0fa @ strd r12, [pc, r10]!")
>
> --
> 1.7.2.5
>
>
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] ARM: kprobes: Change testcase with unpredictable STRD instruction
2011-11-27 12:11 [PATCH] ARM: kprobes: Change testcase with unpredictable STRD instruction Tixy
2011-11-28 16:29 ` Nicolas Pitre
@ 2011-11-30 23:56 ` Russell King - ARM Linux
2011-12-01 7:33 ` Tixy
1 sibling, 1 reply; 4+ messages in thread
From: Russell King - ARM Linux @ 2011-11-30 23:56 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, Nov 27, 2011 at 12:11:25PM +0000, Tixy wrote:
> There is a kprobes testcase for the instruction "strd r2, [r3], r4".
> This has unpredictable behaviour as it uses r3 for register writeback
> addressing and also stores it to memory.
>
> On a cortex A9, this testcase would fail because the instruction writes
> the updated value of r3 to memory, whereas the kprobes emulation code
> writes the original value.
>
> Fix this by changing testcase to used r5 instead of r3.
Is this a -stable candidate?
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] ARM: kprobes: Change testcase with unpredictable STRD instruction
2011-11-30 23:56 ` Russell King - ARM Linux
@ 2011-12-01 7:33 ` Tixy
0 siblings, 0 replies; 4+ messages in thread
From: Tixy @ 2011-12-01 7:33 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, 2011-11-30 at 23:56 +0000, Russell King - ARM Linux wrote:
> On Sun, Nov 27, 2011 at 12:11:25PM +0000, Tixy wrote:
> > There is a kprobes testcase for the instruction "strd r2, [r3], r4".
> > This has unpredictable behaviour as it uses r3 for register writeback
> > addressing and also stores it to memory.
> >
> > On a cortex A9, this testcase would fail because the instruction writes
> > the updated value of r3 to memory, whereas the kprobes emulation code
> > writes the original value.
> >
> > Fix this by changing testcase to used r5 instead of r3.
>
> Is this a -stable candidate?
No, the test code is new in 3.2
--
Tixy
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-12-01 7:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-27 12:11 [PATCH] ARM: kprobes: Change testcase with unpredictable STRD instruction Tixy
2011-11-28 16:29 ` Nicolas Pitre
2011-11-30 23:56 ` Russell King - ARM Linux
2011-12-01 7:33 ` Tixy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).