Skip to content

Commit 14383c2

Browse files
Jon Medhurst (Tixy)Russell King
authored andcommitted
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 <[email protected]> Tested-by: Leif Lindholm <[email protected]> Acked-by: Nicolas Pitre <[email protected]> Signed-off-by: Jon Medhurst <[email protected]> Signed-off-by: Russell King <[email protected]>
1 parent fe41db7 commit 14383c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm/kernel/kprobes-test-arm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ void kprobe_arm_test_cases(void)
550550
TEST_RPR( "strccd r",8, VAL2,", [r",13,0, ", r",12,48,"]")
551551
TEST_RPR( "strd r",4, VAL1,", [r",2, 24,", r",3, 48,"]!")
552552
TEST_RPR( "strcsd r",12,VAL2,", [r",11,48,", -r",10,24,"]!")
553-
TEST_RPR( "strd r",2, VAL1,", [r",3, 24,"], r",4,48,"")
553+
TEST_RPR( "strd r",2, VAL1,", [r",5, 24,"], r",4,48,"")
554554
TEST_RPR( "strd r",10,VAL2,", [r",9, 48,"], -r",7,24,"")
555555
TEST_UNSUPPORTED(".word 0xe1afc0fa @ strd r12, [pc, r10]!")
556556

0 commit comments

Comments
 (0)