diff options
author | Jon Medhurst <tixy@yxit.co.uk> | 2011-04-18 03:53:58 -0400 |
---|---|---|
committer | Nicolas Pitre <nicolas.pitre@linaro.org> | 2011-04-28 23:40:59 -0400 |
commit | 72c2bab2be734d63dee4342e67b1754c54fded70 (patch) | |
tree | ea4877ab3615b569c81cc9b7991c43dcd9aef192 /arch/arm | |
parent | 41713d1396312a027ec02abc4767041627c178ef (diff) |
ARM: kprobes: Remove redundant code in space_1111
The tests to explicitly reject probing CPS, RFE and SRS instructions
are redundant as the default case is now to reject undecoded patterns.
Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/kernel/kprobes-decode.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/arch/arm/kernel/kprobes-decode.c b/arch/arm/kernel/kprobes-decode.c index bddf8d0f3dc1..dc315c12d5f3 100644 --- a/arch/arm/kernel/kprobes-decode.c +++ b/arch/arm/kernel/kprobes-decode.c | |||
@@ -927,14 +927,6 @@ prep_emulate_rdhi16rdlo12rs8rm0_wflags(kprobe_opcode_t insn, | |||
927 | static enum kprobe_insn __kprobes | 927 | static enum kprobe_insn __kprobes |
928 | space_1111(kprobe_opcode_t insn, struct arch_specific_insn *asi) | 928 | space_1111(kprobe_opcode_t insn, struct arch_specific_insn *asi) |
929 | { | 929 | { |
930 | /* CPS mmod == 1 : 1111 0001 0000 xx10 xxxx xxxx xx0x xxxx */ | ||
931 | /* RFE : 1111 100x x0x1 xxxx xxxx 1010 xxxx xxxx */ | ||
932 | /* SRS : 1111 100x x1x0 1101 xxxx 0101 xxxx xxxx */ | ||
933 | if ((insn & 0xfff30020) == 0xf1020000 || | ||
934 | (insn & 0xfe500f00) == 0xf8100a00 || | ||
935 | (insn & 0xfe5f0f00) == 0xf84d0500) | ||
936 | return INSN_REJECTED; | ||
937 | |||
938 | /* memory hint : 1111 0100 x001 xxxx xxxx xxxx xxxx xxxx : */ | 930 | /* memory hint : 1111 0100 x001 xxxx xxxx xxxx xxxx xxxx : */ |
939 | /* PLDI : 1111 0100 x101 xxxx xxxx xxxx xxxx xxxx : */ | 931 | /* PLDI : 1111 0100 x101 xxxx xxxx xxxx xxxx xxxx : */ |
940 | /* PLDW : 1111 0101 x001 xxxx xxxx xxxx xxxx xxxx : */ | 932 | /* PLDW : 1111 0101 x001 xxxx xxxx xxxx xxxx xxxx : */ |
@@ -950,7 +942,11 @@ space_1111(kprobe_opcode_t insn, struct arch_specific_insn *asi) | |||
950 | return INSN_GOOD_NO_SLOT; | 942 | return INSN_GOOD_NO_SLOT; |
951 | } | 943 | } |
952 | 944 | ||
953 | /* SETEND : 1111 0001 0000 0001 xxxx xxxx 0000 xxxx */ | 945 | /* CPS : 1111 0001 0000 xxx0 xxxx xxxx xx0x xxxx */ |
946 | /* SETEND: 1111 0001 0000 0001 xxxx xxxx 0000 xxxx */ | ||
947 | |||
948 | /* SRS : 1111 100x x1x0 xxxx xxxx xxxx xxxx xxxx */ | ||
949 | /* RFE : 1111 100x x0x1 xxxx xxxx xxxx xxxx xxxx */ | ||
954 | 950 | ||
955 | /* Coprocessor instructions... */ | 951 | /* Coprocessor instructions... */ |
956 | /* MCRR2 : 1111 1100 0100 xxxx xxxx xxxx xxxx xxxx : (Rd != Rn) */ | 952 | /* MCRR2 : 1111 1100 0100 xxxx xxxx xxxx xxxx xxxx : (Rd != Rn) */ |