From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751665AbdJEI2n (ORCPT ); Thu, 5 Oct 2017 04:28:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:33960 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751388AbdJEI2l (ORCPT ); Thu, 5 Oct 2017 04:28:41 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1DDB521942 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=mhiramat@kernel.org Date: Thu, 5 Oct 2017 17:28:36 +0900 From: Masami Hiramatsu To: Ingo Molnar Cc: mingo@redhat.com, x86@kernel.org, Steven Rostedt , linux-kernel@vger.kernel.org, Peter Zijlstra , Ananth N Mavinakayanahalli , Thomas Gleixner , "H . Peter Anvin" , "Paul E . McKenney" , Alexei Starovoitov , Alexei Starovoitov , Linus Torvalds Subject: Re: [BUGFIX PATCH] kprobes/x86: Remove IRQ disabling from jprobe handlers Message-Id: <20171005172836.d084ef709be2e34037ccc0d6@kernel.org> In-Reply-To: <20171005075704.2wv3vcg35s4g5jhq@gmail.com> References: <20170930231251.emiuyrapdgzpcylp@inn> <150701508194.32266.14458959863314097305.stgit@devbox> <20171003093344.feh7gqa4aimsjwqv@gmail.com> <20171004002437.66c15c68ef662c0d9a458bef@kernel.org> <20171003171100.p535ul3wml4uhsow@gmail.com> <20171004151830.1e460cb7250b8741af0e2dbc@kernel.org> <20171004104101.nhtsotudcrh4d354@gmail.com> <20171004230804.9427341c928923a196c2a2b5@kernel.org> <20171005075704.2wv3vcg35s4g5jhq@gmail.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 5 Oct 2017 09:57:04 +0200 Ingo Molnar wrote: > > * Masami Hiramatsu wrote: > > > On Wed, 4 Oct 2017 12:41:01 +0200 > > Ingo Molnar wrote: > > > > > > > > * Masami Hiramatsu wrote: > > > > > > > Hmm, actually we can not disable jprobe, that has no separate Kconfig. > > > > So we need to introduce new kconfig for that. > > > > > > > > And, there are several network protocols using jprobe to trace events. > > > > (e.g. NET_DCCPPROBE and NET_TCPPROBE) > > > > I think they need to migrate to trace-event at first. > > > > > > > > So, how about below idea? > > > > > > > > 1. Introduce CONFIG_JPROBE_API which only separate jprobe general parts > > > > (no arch dependent code involves) and make it default n. > > > > 2. Mark break_handler and jprobe APIs deprecated so that no new user comes up. > > > > 3. migrate in-kernel jprobe user to trace-event or ftrace. > > > > (may take some time) > > > > > > So my suggestion would be to just return from register_jprobe() and don't register > > > anything. > > > > with CONFIG_JPROBE_API=n, is that right? > > No, unconditionally off with a WARN_ON_ONCE() warning in the registry function and > the deactivation of all in-kernel uses (such as self-tests). > > The point is to make people that _truly_ rely on it complain - not just make them > silently turn on a Kconfig option ... Hmm, but in that case, anyway we have to remove or rename the function like register_jprobe. Or would that "unconditionally" mean "#if 0"? > > > Yes, there are usecases of jprobes in the kernel, but they all look > > > pretty ancient and unused. > > > > Hmm, in that case, should we also remove those users? If we disable such way > > those features are just useless. > > My hypothesis is that those features are not used (hence useless), but we should > first test whether there's any reliance before we remove code. Agreed. Thank you, > > Thanks, > > Ingo -- Masami Hiramatsu