summaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/kprobes-test-arm.c
diff options
context:
space:
mode:
authorJon Medhurst (Tixy) <tixy@yxit.co.uk>2011-11-29 08:14:35 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-12-01 00:54:53 +0100
commit14383c295ab48178c449336f5d74e9e615e36723 (patch)
treed18981956db104fc75fc4212976e6363a094ecc3 /arch/arm/kernel/kprobes-test-arm.c
parentARM: 7177/1: GIC: avoid skipping non-existent PPIs in irq_start calculation (diff)
downloadlinux-14383c295ab48178c449336f5d74e9e615e36723.tar.xz
linux-14383c295ab48178c449336f5d74e9e615e36723.zip
ARM: 7180/1: Change kprobes testcase with unpredictable STRD instruction
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. Reported-by: Leif Lindholm <leif.lindholm@arm.com> Tested-by: Leif Lindholm <leif.lindholm@arm.com> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org> Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to '')
-rw-r--r--arch/arm/kernel/kprobes-test-arm.c2
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 fc82de8bdcce..edf9ad8d3c6b 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]!")