From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13424 invoked by alias); 6 Dec 2013 02:34:54 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 13414 invoked by uid 89); 6 Dec 2013 02:34:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail7.hitachi.co.jp Received: from Unknown (HELO mail7.hitachi.co.jp) (133.145.228.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 06 Dec 2013 02:34:51 +0000 Received: from mlsv3.hitachi.co.jp (unknown [133.144.234.166]) by mail7.hitachi.co.jp (Postfix) with ESMTP id CDFAC37AC3; Fri, 6 Dec 2013 11:34:41 +0900 (JST) Received: from mfilter03.hitachi.co.jp by mlsv3.hitachi.co.jp (8.13.1/8.13.1) id rB62Yfaf019194; Fri, 6 Dec 2013 11:34:41 +0900 Received: from vshuts01.hitachi.co.jp (vshuts01.hitachi.co.jp [10.201.6.83]) by mfilter03.hitachi.co.jp (Switch-3.3.4/Switch-3.3.4) with ESMTP id rB62YeMQ004362; Fri, 6 Dec 2013 11:34:41 +0900 Received: from gxml20a.ad.clb.hitachi.co.jp (unknown [158.213.157.160]) by vshuts01.hitachi.co.jp (Postfix) with ESMTP id 2E8382F003C; Fri, 6 Dec 2013 11:34:40 +0900 (JST) Received: from [10.198.194.91] by gxml20a.ad.clb.hitachi.co.jp (Switch-3.1.10/Switch-3.1.9) id 5B621Y3NI00009538; Fri, 06 Dec 2013 11:34:39 +0900 Message-ID: <52A137B6.6030307@hitachi.com> Date: Fri, 06 Dec 2013 02:34:00 -0000 From: Masami Hiramatsu User-Agent: Mozilla/5.0 (Windows NT 5.2; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 MIME-Version: 1.0 To: Ingo Molnar Cc: Ananth N Mavinakayanahalli , Sandeepa Prabhu , x86@kernel.org, lkml , "Steven Rostedt (Red Hat)" , systemtap@sourceware.org, "David S. Miller" Subject: Re: [PATCH -tip v4 0/6] kprobes: introduce NOKPROBE_SYMBOL() and fixes crash bugs References: <20131204012841.22118.82992.stgit@kbuild-fedora.novalocal> <20131204084551.GA31772@gmail.com> <529FBA71.6070107@hitachi.com> <20131205102127.GA19923@gmail.com> In-Reply-To: <20131205102127.GA19923@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2013-q4/txt/msg00342.txt.bz2 (2013/12/05 19:21), Ingo Molnar wrote: > > * Masami Hiramatsu wrote: > >>> So we need both a maintainable and a sane/safe solution, and I'd >>> like to apply the whole thing at once and be at ease that the >>> solution is round. We should have done this years ago. >> >> For the safeness of kprobes, I have an idea; introduce a whitelist >> for dynamic events. AFAICS, the biggest unstable issue of kprobes >> comes from putting *many* probes on the functions called from >> tracers. > > If the number of 'noprobe' annotations is expected to explode then > maybe another approach should be considered. No, since this is a "quantitative" issue, the annotation helps us. > For example in perf we detect recursion. Could kprobes do that and > detect hitting a probe while running kprobes code, and ignore it [do > an early return]? Yes, the kprobe itself already has recursion detector and it rejects calling handler. > > That way most of the annotations could be removed and kprobes would > become inherently safe. Is there any complication I'm missing? That is actually what I'm doing with cleanup patches. :) Thank you, -- Masami HIRAMATSU IT Management Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: masami.hiramatsu.pt@hitachi.com