diff options
author | Wang Nan <wangnan0@huawei.com> | 2015-01-05 19:29:18 +0800 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2015-01-09 09:36:51 +0000 |
commit | 83803d97dae1eaf6850a45ef8ee179cc66e147dc (patch) | |
tree | e2b1124f1c7896dcadb2af471a0570b019dad551 /arch/arm/probes/decode-arm.c | |
parent | 832607e79d7423c67ef8a3de8dfa3d25b5b0bf86 (diff) | |
download | blackbird-op-linux-83803d97dae1eaf6850a45ef8ee179cc66e147dc.tar.gz blackbird-op-linux-83803d97dae1eaf6850a45ef8ee179cc66e147dc.zip |
ARM: kprobes: introduces checker
This patch introdces 'checker' to decoding phase, and calls checkers
when instruction decoding. This allows further decoding for specific
instructions. This patch introduces a stub call of checkers in kprobe
arch_prepare_kprobe() as an example and for further expansion.
Signed-off-by: Wang Nan <wangnan0@huawei.com>
Reviewed-by: Jon Medhurst <tixy@linaro.org>
Reviewed-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Diffstat (limited to 'arch/arm/probes/decode-arm.c')
-rw-r--r-- | arch/arm/probes/decode-arm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/probes/decode-arm.c b/arch/arm/probes/decode-arm.c index 04114f74a2d2..f72c33a2dcfb 100644 --- a/arch/arm/probes/decode-arm.c +++ b/arch/arm/probes/decode-arm.c @@ -726,10 +726,11 @@ static void __kprobes arm_singlestep(probes_opcode_t insn, */ enum probes_insn __kprobes arm_probes_decode_insn(probes_opcode_t insn, struct arch_probes_insn *asi, - bool emulate, const union decode_action *actions) + bool emulate, const union decode_action *actions, + const struct decode_checker *checkers[]) { asi->insn_singlestep = arm_singlestep; asi->insn_check_cc = probes_condition_checks[insn>>28]; return probes_decode_insn(insn, asi, probes_decode_arm_table, false, - emulate, actions); + emulate, actions, checkers); } |