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>
This commit is contained in:

zatwierdzone przez
Jon Medhurst

rodzic
832607e79d
commit
83803d97da
@@ -314,6 +314,14 @@ union decode_action {
|
||||
probes_custom_decode_t *decoder;
|
||||
};
|
||||
|
||||
typedef enum probes_insn (probes_check_t)(probes_opcode_t,
|
||||
struct arch_probes_insn *,
|
||||
const struct decode_header *);
|
||||
|
||||
struct decode_checker {
|
||||
probes_check_t *checker;
|
||||
};
|
||||
|
||||
#define DECODE_END \
|
||||
{.bits = DECODE_TYPE_END}
|
||||
|
||||
@@ -402,6 +410,7 @@ probes_insn_handler_t probes_emulate_none;
|
||||
int __kprobes
|
||||
probes_decode_insn(probes_opcode_t insn, struct arch_probes_insn *asi,
|
||||
const union decode_item *table, bool thumb, bool emulate,
|
||||
const union decode_action *actions);
|
||||
const union decode_action *actions,
|
||||
const struct decode_checker **checkers);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user