aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/kprobes-arm.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/kernel/kprobes-arm.c')
-rw-r--r--arch/arm/kernel/kprobes-arm.c37
1 files changed, 19 insertions, 18 deletions
diff --git a/arch/arm/kernel/kprobes-arm.c b/arch/arm/kernel/kprobes-arm.c
index 58faacc598bf..319e6feb0363 100644
--- a/arch/arm/kernel/kprobes-arm.c
+++ b/arch/arm/kernel/kprobes-arm.c
@@ -1415,23 +1415,24 @@ static const union decode_item arm_cccc_0111_____xxx1_table[] = {
1415 DECODE_END 1415 DECODE_END
1416}; 1416};
1417 1417
1418static enum kprobe_insn __kprobes 1418static const union decode_item arm_cccc_01xx_table[] = {
1419space_cccc_01xx(kprobe_opcode_t insn, struct arch_specific_insn *asi) 1419 /* Load/store word and unsigned byte */
1420{ 1420
1421 /* LDR : cccc 01xx x0x1 xxxx xxxx xxxx xxxx xxxx */ 1421 /* LDRB/STRB pc,[...] cccc 01xx x0xx xxxx xxxx xxxx xxxx xxxx */
1422 /* LDRB : cccc 01xx x1x1 xxxx xxxx xxxx xxxx xxxx */ 1422 DECODE_REJECT (0x0c40f000, 0x0440f000),
1423 /* LDRBT : cccc 01x0 x111 xxxx xxxx xxxx xxxx xxxx */ 1423
1424 /* LDRT : cccc 01x0 x011 xxxx xxxx xxxx xxxx xxxx */ 1424 /* LDR cccc 01xx x0x1 xxxx xxxx xxxx xxxx xxxx */
1425 /* STR : cccc 01xx x0x0 xxxx xxxx xxxx xxxx xxxx */ 1425 /* LDRB cccc 01xx x1x1 xxxx xxxx xxxx xxxx xxxx */
1426 /* STRB : cccc 01xx x1x0 xxxx xxxx xxxx xxxx xxxx */ 1426 /* LDRBT cccc 01x0 x111 xxxx xxxx xxxx xxxx xxxx */
1427 /* STRBT : cccc 01x0 x110 xxxx xxxx xxxx xxxx xxxx */ 1427 /* LDRT cccc 01x0 x011 xxxx xxxx xxxx xxxx xxxx */
1428 /* STRT : cccc 01x0 x010 xxxx xxxx xxxx xxxx xxxx */ 1428 /* STR cccc 01xx x0x0 xxxx xxxx xxxx xxxx xxxx */
1429 1429 /* STRB cccc 01xx x1x0 xxxx xxxx xxxx xxxx xxxx */
1430 if ((insn & 0x00500000) == 0x00500000 && is_r15(insn, 12)) 1430 /* STRBT cccc 01x0 x110 xxxx xxxx xxxx xxxx xxxx */
1431 return INSN_REJECTED; /* LDRB into PC */ 1431 /* STRT cccc 01x0 x010 xxxx xxxx xxxx xxxx xxxx */
1432 1432 DECODE_CUSTOM (0x0c000000, 0x04000000, prep_emulate_ldr_str),
1433 return prep_emulate_ldr_str(insn, asi); 1433
1434} 1434 DECODE_END
1435};
1435 1436
1436static enum kprobe_insn __kprobes 1437static enum kprobe_insn __kprobes
1437space_cccc_100x(kprobe_opcode_t insn, struct arch_specific_insn *asi) 1438space_cccc_100x(kprobe_opcode_t insn, struct arch_specific_insn *asi)
@@ -1526,7 +1527,7 @@ arm_kprobe_decode_insn(kprobe_opcode_t insn, struct arch_specific_insn *asi)
1526 1527
1527 else if ((insn & 0x0c000000) == 0x04000000) 1528 else if ((insn & 0x0c000000) == 0x04000000)
1528 1529
1529 return space_cccc_01xx(insn, asi); 1530 return kprobe_decode_insn(insn, asi, arm_cccc_01xx_table, false);
1530 1531
1531 else if ((insn & 0x0e000000) == 0x08000000) 1532 else if ((insn & 0x0e000000) == 0x08000000)
1532 1533