From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1310 invoked by alias); 5 Dec 2013 10:21:42 -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 1293 invoked by uid 89); 5 Dec 2013 10:21:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.1 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-f41.google.com Received: from Unknown (HELO mail-ee0-f41.google.com) (74.125.83.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 05 Dec 2013 10:21:40 +0000 Received: by mail-ee0-f41.google.com with SMTP id t10so3206531eei.28 for ; Thu, 05 Dec 2013 02:21:31 -0800 (PST) X-Received: by 10.14.202.137 with SMTP id d9mr52304121eeo.23.1386238891292; Thu, 05 Dec 2013 02:21:31 -0800 (PST) Received: from gmail.com (BC24D856.catv.pool.telekom.hu. [188.36.216.86]) by mx.google.com with ESMTPSA id v1sm25658381eef.9.2013.12.05.02.21.29 for (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 05 Dec 2013 02:21:30 -0800 (PST) Date: Thu, 05 Dec 2013 10:21: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: <20131205102127.GA19923@gmail.com> References: <20131204012841.22118.82992.stgit@kbuild-fedora.novalocal> <20131204084551.GA31772@gmail.com> <529FBA71.6070107@hitachi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <529FBA71.6070107@hitachi.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2013-q4/txt/msg00334.txt.bz2 * 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. 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]? That way most of the annotations could be removed and kprobes would become inherently safe. Is there any complication I'm missing? Thanks, Ingo