diff options
author | Masami Hiramatsu <mhiramat@kernel.org> | 2018-06-19 12:13:20 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-06-21 06:33:16 -0400 |
commit | cf3bb032fd753424e48d1bc580634768fc54aabe (patch) | |
tree | ae7e50d248dabf7f2a79d544cb6736b34182ebea | |
parent | 6e5fd3a298e9ff74e5bf60f161e31cdb72f2e6bd (diff) |
ia64/kprobes: Don't call the ->break_handler() in ia64 kprobes code
Don't call the ->break_handler() from the ia64 kprobes code,
because it was only used by jprobes which got removed.
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: linux-arch@vger.kernel.org
Cc: linux-ia64@vger.kernel.org
Link: https://lore.kernel.org/lkml/152942480045.15209.10715901482832337704.stgit@devbox
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | arch/ia64/include/uapi/asm/break.h | 1 | ||||
-rw-r--r-- | arch/ia64/kernel/kprobes.c | 10 |
2 files changed, 0 insertions, 11 deletions
diff --git a/arch/ia64/include/uapi/asm/break.h b/arch/ia64/include/uapi/asm/break.h index 5d742bcb0018..4ca110f0a94b 100644 --- a/arch/ia64/include/uapi/asm/break.h +++ b/arch/ia64/include/uapi/asm/break.h | |||
@@ -14,7 +14,6 @@ | |||
14 | */ | 14 | */ |
15 | #define __IA64_BREAK_KDB 0x80100 | 15 | #define __IA64_BREAK_KDB 0x80100 |
16 | #define __IA64_BREAK_KPROBE 0x81000 /* .. 0x81fff */ | 16 | #define __IA64_BREAK_KPROBE 0x81000 /* .. 0x81fff */ |
17 | #define __IA64_BREAK_JPROBE 0x82000 | ||
18 | 17 | ||
19 | /* | 18 | /* |
20 | * OS-specific break numbers: | 19 | * OS-specific break numbers: |
diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c index 823e4bd03a18..74c8524e6309 100644 --- a/arch/ia64/kernel/kprobes.c +++ b/arch/ia64/kernel/kprobes.c | |||
@@ -817,14 +817,6 @@ static int __kprobes pre_kprobes_handler(struct die_args *args) | |||
817 | prepare_ss(p, regs); | 817 | prepare_ss(p, regs); |
818 | kcb->kprobe_status = KPROBE_REENTER; | 818 | kcb->kprobe_status = KPROBE_REENTER; |
819 | return 1; | 819 | return 1; |
820 | } else if (args->err == __IA64_BREAK_JPROBE) { | ||
821 | /* | ||
822 | * jprobe instrumented function just completed | ||
823 | */ | ||
824 | p = __this_cpu_read(current_kprobe); | ||
825 | if (p->break_handler && p->break_handler(p, regs)) { | ||
826 | goto ss_probe; | ||
827 | } | ||
828 | } else if (!is_ia64_break_inst(regs)) { | 820 | } else if (!is_ia64_break_inst(regs)) { |
829 | /* The breakpoint instruction was removed by | 821 | /* The breakpoint instruction was removed by |
830 | * another cpu right after we hit, no further | 822 | * another cpu right after we hit, no further |
@@ -867,7 +859,6 @@ static int __kprobes pre_kprobes_handler(struct die_args *args) | |||
867 | */ | 859 | */ |
868 | return 1; | 860 | return 1; |
869 | 861 | ||
870 | ss_probe: | ||
871 | #if !defined(CONFIG_PREEMPT) | 862 | #if !defined(CONFIG_PREEMPT) |
872 | if (p->ainsn.inst_flag == INST_FLAG_BOOSTABLE && !p->post_handler) { | 863 | if (p->ainsn.inst_flag == INST_FLAG_BOOSTABLE && !p->post_handler) { |
873 | /* Boost up -- we can execute copied instructions directly */ | 864 | /* Boost up -- we can execute copied instructions directly */ |
@@ -990,7 +981,6 @@ int __kprobes kprobe_exceptions_notify(struct notifier_block *self, | |||
990 | case DIE_BREAK: | 981 | case DIE_BREAK: |
991 | /* err is break number from ia64_bad_break() */ | 982 | /* err is break number from ia64_bad_break() */ |
992 | if ((args->err >> 12) == (__IA64_BREAK_KPROBE >> 12) | 983 | if ((args->err >> 12) == (__IA64_BREAK_KPROBE >> 12) |
993 | || args->err == __IA64_BREAK_JPROBE | ||
994 | || args->err == 0) | 984 | || args->err == 0) |
995 | if (pre_kprobes_handler(args)) | 985 | if (pre_kprobes_handler(args)) |
996 | ret = NOTIFY_STOP; | 986 | ret = NOTIFY_STOP; |