diff options
author | Jon Medhurst <tixy@yxit.co.uk> | 2011-06-09 04:12:58 -0400 |
---|---|---|
committer | Tixy <tixy@medhuaa1.miniserver.com> | 2011-07-13 13:32:49 -0400 |
commit | 56d8fbddc2a2be7aa81d65e5a6f0f6093ee70c48 (patch) | |
tree | e16e1ce108d3d5c2568829146836f910b45febfe /arch/arm/kernel/kprobes-arm.c | |
parent | ad2e81a78d016176b9f194414495a4ce166399e1 (diff) |
ARM: kprobes: Migrate ARM space_cccc_01xx to decoding tables
Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Diffstat (limited to 'arch/arm/kernel/kprobes-arm.c')
-rw-r--r-- | arch/arm/kernel/kprobes-arm.c | 37 |
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 | ||
1418 | static enum kprobe_insn __kprobes | 1418 | static const union decode_item arm_cccc_01xx_table[] = { |
1419 | space_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 | ||
1436 | static enum kprobe_insn __kprobes | 1437 | static enum kprobe_insn __kprobes |
1437 | space_cccc_100x(kprobe_opcode_t insn, struct arch_specific_insn *asi) | 1438 | space_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 | ||