From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752057AbaBZMsN (ORCPT ); Wed, 26 Feb 2014 07:48:13 -0500 Received: from mail.efficios.com ([78.47.125.74]:41456 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750814AbaBZMsM (ORCPT ); Wed, 26 Feb 2014 07:48:12 -0500 Date: Wed, 26 Feb 2014 12:48:12 +0000 (UTC) From: Mathieu Desnoyers To: Peter Zijlstra Cc: Steven Rostedt , LKML , Ingo Molnar , Rusty Russell , Frederic Weisbecker , Andrew Morton Message-ID: <192956891.30659.1393418892222.JavaMail.zimbra@efficios.com> In-Reply-To: <20140226085926.GF18404@twins.programming.kicks-ass.net> References: <20140225191505.32b56105@gandalf.local.home> <188130295.30493.1393375141631.JavaMail.zimbra@efficios.com> <20140225194926.4eac5872@gandalf.local.home> <20140226085926.GF18404@twins.programming.kicks-ass.net> Subject: Re: [RFC][PATCH] tracing: Warn and notify if tracepoints are not loaded due to module taint MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [206.248.138.119] X-Mailer: Zimbra 8.0.5_GA_5839 (ZimbraWebClient - FF27 (Linux)/8.0.5_GA_5839) Thread-Topic: tracing: Warn and notify if tracepoints are not loaded due to module taint Thread-Index: 7h/v+Xs0y9Aqtsxe5AJk1yG7bGjpPg== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- Original Message ----- > From: "Peter Zijlstra" > To: "Steven Rostedt" > Cc: "Mathieu Desnoyers" , "LKML" , "Ingo Molnar" > , "Rusty Russell" , "Frederic Weisbecker" , "Andrew > Morton" > Sent: Wednesday, February 26, 2014 3:59:26 AM > Subject: Re: [RFC][PATCH] tracing: Warn and notify if tracepoints are not loaded due to module taint > > On Tue, Feb 25, 2014 at 07:49:26PM -0500, Steven Rostedt wrote: > > > > - if (mod->taints & ~((1 << TAINT_OOT_MODULE) | (1 << TAINT_CRAP))) > > > > + if (WARN_ONCE(mod->taints & ~((1 << TAINT_OOT_MODULE) | (1 << > > > > TAINT_CRAP)), > > > > + "Module is tainted, disabling tracepoints")) > > > I originally had that with a simple WARN() instead of WARN_ONCE(), but > > if you have that config which makes all modules not have sigs correct, > > it spits out tens of these warnings and can cause more panic in users > > than it deserves. I then switched it to WARN_ONCE(), and then thought, > > that if it does it only once for the first module, it wont print the > > warning again for the other affected modules. That means it may confuse > > the user if they see a module had that warning, but the module they are > > trying to trace isn't working either. > > > > I then figured it would be good to remove the module name and just > > state a general "Module is tainted, disabling tracepoints" and if the > > user notices that the module isn't working, and then looks at their > > dmesg, they'll see this message and just assume it was the module that > > wasn't working. > > > > Make sense? > > How about instead of a WARN, you use a normal KERN_ERR printk(). There's > no point to the entire WARN state dump, that's needlessly verbose. > > When you have a normal error print you can have as many as are required > and put the mod name back in. The good old printk KERN_ERR is a very good idea. I agree that WARN() is too verbose for our needs here. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com