diff options
Diffstat (limited to 'arch/arm/probes/kprobes/core.c')
-rw-r--r-- | arch/arm/probes/kprobes/core.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm/probes/kprobes/core.c b/arch/arm/probes/kprobes/core.c index 701f49d74c35..74f3dc3ac212 100644 --- a/arch/arm/probes/kprobes/core.c +++ b/arch/arm/probes/kprobes/core.c | |||
@@ -61,6 +61,7 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p) | |||
61 | kprobe_decode_insn_t *decode_insn; | 61 | kprobe_decode_insn_t *decode_insn; |
62 | const union decode_action *actions; | 62 | const union decode_action *actions; |
63 | int is; | 63 | int is; |
64 | const struct decode_checker **checkers; | ||
64 | 65 | ||
65 | if (in_exception_text(addr)) | 66 | if (in_exception_text(addr)) |
66 | return -EINVAL; | 67 | return -EINVAL; |
@@ -74,9 +75,11 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p) | |||
74 | insn = __opcode_thumb32_compose(insn, inst2); | 75 | insn = __opcode_thumb32_compose(insn, inst2); |
75 | decode_insn = thumb32_probes_decode_insn; | 76 | decode_insn = thumb32_probes_decode_insn; |
76 | actions = kprobes_t32_actions; | 77 | actions = kprobes_t32_actions; |
78 | checkers = kprobes_t32_checkers; | ||
77 | } else { | 79 | } else { |
78 | decode_insn = thumb16_probes_decode_insn; | 80 | decode_insn = thumb16_probes_decode_insn; |
79 | actions = kprobes_t16_actions; | 81 | actions = kprobes_t16_actions; |
82 | checkers = kprobes_t16_checkers; | ||
80 | } | 83 | } |
81 | #else /* !CONFIG_THUMB2_KERNEL */ | 84 | #else /* !CONFIG_THUMB2_KERNEL */ |
82 | thumb = false; | 85 | thumb = false; |
@@ -85,12 +88,13 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p) | |||
85 | insn = __mem_to_opcode_arm(*p->addr); | 88 | insn = __mem_to_opcode_arm(*p->addr); |
86 | decode_insn = arm_probes_decode_insn; | 89 | decode_insn = arm_probes_decode_insn; |
87 | actions = kprobes_arm_actions; | 90 | actions = kprobes_arm_actions; |
91 | checkers = kprobes_arm_checkers; | ||
88 | #endif | 92 | #endif |
89 | 93 | ||
90 | p->opcode = insn; | 94 | p->opcode = insn; |
91 | p->ainsn.insn = tmp_insn; | 95 | p->ainsn.insn = tmp_insn; |
92 | 96 | ||
93 | switch ((*decode_insn)(insn, &p->ainsn, true, actions)) { | 97 | switch ((*decode_insn)(insn, &p->ainsn, true, actions, checkers)) { |
94 | case INSN_REJECTED: /* not supported */ | 98 | case INSN_REJECTED: /* not supported */ |
95 | return -EINVAL; | 99 | return -EINVAL; |
96 | 100 | ||