From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28570 invoked by alias); 10 Dec 2013 15:28:24 -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 28408 invoked by uid 89); 10 Dec 2013 15:28:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,FSL_HELO_FAKE,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-ee0-f43.google.com Received: from Unknown (HELO mail-ee0-f43.google.com) (74.125.83.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 10 Dec 2013 15:28:23 +0000 Received: by mail-ee0-f43.google.com with SMTP id c13so2288316eek.16 for ; Tue, 10 Dec 2013 07:28:13 -0800 (PST) X-Received: by 10.14.204.70 with SMTP id g46mr12685561eeo.84.1386689293661; Tue, 10 Dec 2013 07:28:13 -0800 (PST) Received: from gmail.com (BC24D856.catv.pool.telekom.hu. [188.36.216.86]) by mx.google.com with ESMTPSA id e43sm42410354eep.7.2013.12.10.07.28.12 for (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 Dec 2013 07:28:13 -0800 (PST) Date: Tue, 10 Dec 2013 15:28:00 -0000 From: Ingo Molnar To: Masami Hiramatsu 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 Message-ID: <20131210152811.GA1195@gmail.com> References: <20131204012841.22118.82992.stgit@kbuild-fedora.novalocal> <20131204084551.GA31772@gmail.com> <529FBA71.6070107@hitachi.com> <20131205102127.GA19923@gmail.com> <52A137B6.6030307@hitachi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52A137B6.6030307@hitachi.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2013-q4/txt/msg00380.txt.bz2 * Masami Hiramatsu wrote: > (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. So why are annotations needed at all? What can happen if an annotation is missing and a piece of code is probed which is also used by the kprobes code internally - do we crash, lock up, misbehave or handle it safely? Thanks, Ingo