diff options
| -rw-r--r-- | arch/arm/kernel/kprobes-arm.c | 4 | ||||
| -rw-r--r-- | arch/arm/kernel/kprobes-thumb.c | 7 | ||||
| -rw-r--r-- | arch/arm/kernel/kprobes.h | 8 |
3 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/kernel/kprobes-arm.c b/arch/arm/kernel/kprobes-arm.c index 79203ee1d039..9fe8910308af 100644 --- a/arch/arm/kernel/kprobes-arm.c +++ b/arch/arm/kernel/kprobes-arm.c | |||
| @@ -60,6 +60,7 @@ | |||
| 60 | 60 | ||
| 61 | #include <linux/kernel.h> | 61 | #include <linux/kernel.h> |
| 62 | #include <linux/kprobes.h> | 62 | #include <linux/kprobes.h> |
| 63 | #include <linux/module.h> | ||
| 63 | 64 | ||
| 64 | #include "kprobes.h" | 65 | #include "kprobes.h" |
| 65 | 66 | ||
| @@ -971,6 +972,9 @@ const union decode_item kprobe_decode_arm_table[] = { | |||
| 971 | 972 | ||
| 972 | DECODE_END | 973 | DECODE_END |
| 973 | }; | 974 | }; |
| 975 | #ifdef CONFIG_ARM_KPROBES_TEST_MODULE | ||
| 976 | EXPORT_SYMBOL_GPL(kprobe_decode_arm_table); | ||
| 977 | #endif | ||
| 974 | 978 | ||
| 975 | static void __kprobes arm_singlestep(struct kprobe *p, struct pt_regs *regs) | 979 | static void __kprobes arm_singlestep(struct kprobe *p, struct pt_regs *regs) |
| 976 | { | 980 | { |
diff --git a/arch/arm/kernel/kprobes-thumb.c b/arch/arm/kernel/kprobes-thumb.c index 902ca59e8b11..8f96ec778e8d 100644 --- a/arch/arm/kernel/kprobes-thumb.c +++ b/arch/arm/kernel/kprobes-thumb.c | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | 10 | ||
| 11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
| 12 | #include <linux/kprobes.h> | 12 | #include <linux/kprobes.h> |
| 13 | #include <linux/module.h> | ||
| 13 | 14 | ||
| 14 | #include "kprobes.h" | 15 | #include "kprobes.h" |
| 15 | 16 | ||
| @@ -943,6 +944,9 @@ const union decode_item kprobe_decode_thumb32_table[] = { | |||
| 943 | */ | 944 | */ |
| 944 | DECODE_END | 945 | DECODE_END |
| 945 | }; | 946 | }; |
| 947 | #ifdef CONFIG_ARM_KPROBES_TEST_MODULE | ||
| 948 | EXPORT_SYMBOL_GPL(kprobe_decode_thumb32_table); | ||
| 949 | #endif | ||
| 946 | 950 | ||
| 947 | static void __kprobes | 951 | static void __kprobes |
| 948 | t16_simulate_bxblx(struct kprobe *p, struct pt_regs *regs) | 952 | t16_simulate_bxblx(struct kprobe *p, struct pt_regs *regs) |
| @@ -1423,6 +1427,9 @@ const union decode_item kprobe_decode_thumb16_table[] = { | |||
| 1423 | 1427 | ||
| 1424 | DECODE_END | 1428 | DECODE_END |
| 1425 | }; | 1429 | }; |
| 1430 | #ifdef CONFIG_ARM_KPROBES_TEST_MODULE | ||
| 1431 | EXPORT_SYMBOL_GPL(kprobe_decode_thumb16_table); | ||
| 1432 | #endif | ||
| 1426 | 1433 | ||
| 1427 | static unsigned long __kprobes thumb_check_cc(unsigned long cpsr) | 1434 | static unsigned long __kprobes thumb_check_cc(unsigned long cpsr) |
| 1428 | { | 1435 | { |
diff --git a/arch/arm/kernel/kprobes.h b/arch/arm/kernel/kprobes.h index a6aeda0a6c7f..38945f78f9f1 100644 --- a/arch/arm/kernel/kprobes.h +++ b/arch/arm/kernel/kprobes.h | |||
| @@ -413,6 +413,14 @@ struct decode_reject { | |||
| 413 | DECODE_HEADER(DECODE_TYPE_REJECT, _mask, _value, 0) | 413 | DECODE_HEADER(DECODE_TYPE_REJECT, _mask, _value, 0) |
| 414 | 414 | ||
| 415 | 415 | ||
| 416 | #ifdef CONFIG_THUMB2_KERNEL | ||
| 417 | extern const union decode_item kprobe_decode_thumb16_table[]; | ||
| 418 | extern const union decode_item kprobe_decode_thumb32_table[]; | ||
| 419 | #else | ||
| 420 | extern const union decode_item kprobe_decode_arm_table[]; | ||
| 421 | #endif | ||
| 422 | |||
| 423 | |||
| 416 | int kprobe_decode_insn(kprobe_opcode_t insn, struct arch_specific_insn *asi, | 424 | int kprobe_decode_insn(kprobe_opcode_t insn, struct arch_specific_insn *asi, |
| 417 | const union decode_item *table, bool thumb16); | 425 | const union decode_item *table, bool thumb16); |
| 418 | 426 | ||
