diff options
Diffstat (limited to 'arch/arm/kernel/kprobes-test.c')
-rw-r--r-- | arch/arm/kernel/kprobes-test.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/arm/kernel/kprobes-test.c b/arch/arm/kernel/kprobes-test.c index c2fd06b4c389..379639998d5a 100644 --- a/arch/arm/kernel/kprobes-test.c +++ b/arch/arm/kernel/kprobes-test.c | |||
@@ -113,7 +113,7 @@ | |||
113 | * @ start of inline data... | 113 | * @ start of inline data... |
114 | * .ascii "mov r0, r7" @ text title for test case | 114 | * .ascii "mov r0, r7" @ text title for test case |
115 | * .byte 0 | 115 | * .byte 0 |
116 | * .align 2 | 116 | * .align 2, 0 |
117 | * | 117 | * |
118 | * @ TEST_ARG_REG | 118 | * @ TEST_ARG_REG |
119 | * .byte ARG_TYPE_REG | 119 | * .byte ARG_TYPE_REG |
@@ -1333,7 +1333,8 @@ static void test_case_failed(const char *message) | |||
1333 | static unsigned long next_instruction(unsigned long pc) | 1333 | static unsigned long next_instruction(unsigned long pc) |
1334 | { | 1334 | { |
1335 | #ifdef CONFIG_THUMB2_KERNEL | 1335 | #ifdef CONFIG_THUMB2_KERNEL |
1336 | if ((pc & 1) && !is_wide_instruction(*(u16 *)(pc - 1))) | 1336 | if ((pc & 1) && |
1337 | !is_wide_instruction(__mem_to_opcode_thumb16(*(u16 *)(pc - 1)))) | ||
1337 | return pc + 2; | 1338 | return pc + 2; |
1338 | else | 1339 | else |
1339 | #endif | 1340 | #endif |
@@ -1378,13 +1379,13 @@ static uintptr_t __used kprobes_test_case_start(const char *title, void *stack) | |||
1378 | 1379 | ||
1379 | if (test_case_is_thumb) { | 1380 | if (test_case_is_thumb) { |
1380 | u16 *p = (u16 *)(test_code & ~1); | 1381 | u16 *p = (u16 *)(test_code & ~1); |
1381 | current_instruction = p[0]; | 1382 | current_instruction = __mem_to_opcode_thumb16(p[0]); |
1382 | if (is_wide_instruction(current_instruction)) { | 1383 | if (is_wide_instruction(current_instruction)) { |
1383 | current_instruction <<= 16; | 1384 | u16 instr2 = __mem_to_opcode_thumb16(p[1]); |
1384 | current_instruction |= p[1]; | 1385 | current_instruction = __opcode_thumb32_compose(current_instruction, instr2); |
1385 | } | 1386 | } |
1386 | } else { | 1387 | } else { |
1387 | current_instruction = *(u32 *)test_code; | 1388 | current_instruction = __mem_to_opcode_arm(*(u32 *)test_code); |
1388 | } | 1389 | } |
1389 | 1390 | ||
1390 | if (current_title[0] == '.') | 1391 | if (current_title[0] == '.') |