From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753953AbeE1HKg (ORCPT ); Mon, 28 May 2018 03:10:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:44740 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753621AbeE1HKb (ORCPT ); Mon, 28 May 2018 03:10:31 -0400 From: Masami Hiramatsu To: Thomas Gleixner , Ingo Molnar Cc: x86@kernel.org, Masami Hiramatsu , Ingo Molnar , "H . Peter Anvin" , linux-kernel@vger.kernel.org, Ananth N Mavinakayanahalli , Andrew Morton , Steven Rostedt , Laura Abbott , Josef Bacik , Alexei Starovoitov , Ravi Bangoria , Vineet Gupta , Russell King , Arnd Bergmann , Catalin Marinas , Will Deacon , Tony Luck , Fenghua Yu , Ralf Baechle , James Hogan , Martin Schwidefsky , Heiko Carstens , Yoshinori Sato , Rich Felker , "David S . Miller" , linux-arch@vger.kernel.org Subject: [PATCH -tip v4 21/27] s390/kprobes: Don't call the ->break_handler() in s390 kprobes code Date: Mon, 28 May 2018 16:10:04 +0900 Message-Id: <152749140479.15132.14122696148962136409.stgit@devbox> X-Mailer: git-send-email 2.13.6 In-Reply-To: <152749074878.15132.16693721906742461289.stgit@devbox> References: <152749074878.15132.16693721906742461289.stgit@devbox> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Don't call the ->break_handler() from the s390 kprobes code, because it was only used by jprobes which got removed. Signed-off-by: Masami Hiramatsu --- arch/s390/kernel/kprobes.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c index 0967de19f53d..3e34018960b5 100644 --- a/arch/s390/kernel/kprobes.c +++ b/arch/s390/kernel/kprobes.c @@ -332,26 +332,6 @@ static int kprobe_handler(struct pt_regs *regs) } enable_singlestep(kcb, regs, (unsigned long) p->ainsn.insn); return 1; - } else if (kprobe_running()) { - p = __this_cpu_read(current_kprobe); - if (p->break_handler && p->break_handler(p, regs)) { - /* - * Continuation after the jprobe completed and - * caused the jprobe_return trap. The jprobe - * break_handler "returns" to the original - * function that still has the kprobe breakpoint - * installed. We continue with single stepping. - */ - kcb->kprobe_status = KPROBE_HIT_SS; - enable_singlestep(kcb, regs, - (unsigned long) p->ainsn.insn); - return 1; - } /* else: - * No kprobe at this address and the current kprobe - * has no break handler (no jprobe!). The kernel just - * exploded, let the standard trap handler pick up the - * pieces. - */ } /* else: * No kprobe at this address and no active kprobe. The trap has * not been caused by a kprobe breakpoint. The race of breakpoint From mboxrd@z Thu Jan 1 00:00:00 1970 From: Masami Hiramatsu Subject: [PATCH -tip v4 21/27] s390/kprobes: Don't call the ->break_handler() in s390 kprobes code Date: Mon, 28 May 2018 16:10:04 +0900 Message-ID: <152749140479.15132.14122696148962136409.stgit@devbox> References: <152749074878.15132.16693721906742461289.stgit@devbox> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <152749074878.15132.16693721906742461289.stgit@devbox> Sender: linux-kernel-owner@vger.kernel.org To: Thomas Gleixner , Ingo Molnar Cc: x86@kernel.org, Masami Hiramatsu , Ingo Molnar , "H . Peter Anvin" , linux-kernel@vger.kernel.org, Ananth N Mavinakayanahalli , Andrew Morton , Steven Rostedt , Laura Abbott , Josef Bacik , Alexei Starovoitov , Ravi Bangoria , Vineet Gupta , Russell King , Arnd Bergmann , Catalin Marinas , Will Deacon , Tony Luck , Fenghua Yu , Ralf Baechle , James Hogan List-Id: linux-arch.vger.kernel.org Don't call the ->break_handler() from the s390 kprobes code, because it was only used by jprobes which got removed. Signed-off-by: Masami Hiramatsu --- arch/s390/kernel/kprobes.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c index 0967de19f53d..3e34018960b5 100644 --- a/arch/s390/kernel/kprobes.c +++ b/arch/s390/kernel/kprobes.c @@ -332,26 +332,6 @@ static int kprobe_handler(struct pt_regs *regs) } enable_singlestep(kcb, regs, (unsigned long) p->ainsn.insn); return 1; - } else if (kprobe_running()) { - p = __this_cpu_read(current_kprobe); - if (p->break_handler && p->break_handler(p, regs)) { - /* - * Continuation after the jprobe completed and - * caused the jprobe_return trap. The jprobe - * break_handler "returns" to the original - * function that still has the kprobe breakpoint - * installed. We continue with single stepping. - */ - kcb->kprobe_status = KPROBE_HIT_SS; - enable_singlestep(kcb, regs, - (unsigned long) p->ainsn.insn); - return 1; - } /* else: - * No kprobe at this address and the current kprobe - * has no break handler (no jprobe!). The kernel just - * exploded, let the standard trap handler pick up the - * pieces. - */ } /* else: * No kprobe at this address and no active kprobe. The trap has * not been caused by a kprobe breakpoint. The race of breakpoint