From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 586 invoked by alias); 7 Dec 2013 01:33:11 -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 575 invoked by uid 89); 7 Dec 2013 01:33:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 07 Dec 2013 01:33:09 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rB71WpFO025643 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 6 Dec 2013 20:32:51 -0500 Received: from fche.csb (vpn-59-242.rdu2.redhat.com [10.10.59.242]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id rB71Wp56023219; Fri, 6 Dec 2013 20:32:51 -0500 Received: by fche.csb (Postfix, from userid 2569) id EFC9058180; Fri, 6 Dec 2013 20:32:49 -0500 (EST) Date: Sat, 07 Dec 2013 01:33:00 -0000 From: "Frank Ch. Eigler" To: Masami Hiramatsu Cc: Ingo Molnar , 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: <20131207013249.GC3201@redhat.com> References: <20131204012841.22118.82992.stgit@kbuild-fedora.novalocal> <20131204084551.GA31772@gmail.com> <529FBA71.6070107@hitachi.com> <52A16AD7.6040500@hitachi.com> <20131206190753.GA3201@redhat.com> <52A25B71.3090108@hitachi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52A25B71.3090108@hitachi.com> User-Agent: Mutt/1.4.2.2i X-SW-Source: 2013-q4/txt/msg00352.txt.bz2 Hi - On Sat, Dec 07, 2013 at 08:19:13AM +0900, Masami Hiramatsu wrote: > [...] > > Would you plan to limit kprobes (or just the perf-probe frontend) to > > only function-entries also? > Exactly, yes :). Currently I have a patch for kprobe-tracer > implementation (not only for perf-probe, but doesn't limit kprobes > itself). Interesting option. It sounds like a restrictive expedient that could result in kprobes never being made sufficiently robust. > > If not, and if intra-function statement-granularity kprobes remain > > allowed within a function-granularity whitelist, then you might > > still have those "quantitative" problems. > Yes, but as far as I've tested, the performance overhead is not > high, especially as far as putting kprobes at the entry of those > functions because of ftrace-based optimization. (Would that also make CONFIG_KPROBE_EVENT require KPROBES_ON_FTRACE?) > > Even worse, kprobes robustness problems can bite even with a small > > whitelist, unless you can test the countless subset selections > > cartesian-product the aggrevating factors (like other tracing > > facilities being in use at the same time, limited memory, high irq > > rates, debugging sessions, architectures, whatever). > > And also, what script will run on each probe, right? :) In the perf-probe world, the closest analogue could be varying the contextual data that's being extracted (stack traces, parameters, ...). > >> [...] For the long term solution, I think we can introduce some > >> kind of performance gatekeeper as systemtap does. Counting the > >> miss-hit rate per second and if it go over a threshold, disable next > >> miss-hit (or most miss-hit) probe (as OOM killer does). > > > > That would make sense, but again it would not help deal with kprobes > > robustness (in the kernel-crashing rather than kernel-slowdown sense). > > Why would you think so? Is there any hidden path for calling kprobes > mechanism?? The kernel crash problem just comes from bugs, not the > quantitative issue. I don't think we're disagreeing. A performance-gatekeeper in perf-probe or nearby would be useful (and manage the kprobe-quantity problem). It would not be sufficient to prevent the kernel-crashing bugs. - FChE