From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Rusty Russell <rusty@rustcorp.com.au>,
Frederic Weisbecker <fweisbec@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: [RFC][PATCH] tracing: Warn and notify if tracepoints are not loaded due to module taint
Date: Wed, 26 Feb 2014 00:39:01 +0000 (UTC) [thread overview]
Message-ID: <188130295.30493.1393375141631.JavaMail.zimbra@efficios.com> (raw)
In-Reply-To: <20140225191505.32b56105@gandalf.local.home>
----- Original Message -----
> From: "Steven Rostedt" <rostedt@goodmis.org>
> To: "LKML" <linux-kernel@vger.kernel.org>
> Cc: "Ingo Molnar" <mingo@kernel.org>, "Mathieu Desnoyers" <mathieu.desnoyers@efficios.com>, "Rusty Russell"
> <rusty@rustcorp.com.au>, "Frederic Weisbecker" <fweisbec@gmail.com>, "Andrew Morton" <akpm@linux-foundation.org>,
> "Peter Zijlstra" <peterz@infradead.org>
> Sent: Tuesday, February 25, 2014 7:15:05 PM
> Subject: [RFC][PATCH] tracing: Warn and notify if tracepoints are not loaded due to module taint
>
> [ Posting this as an RFC, but I plan on pushing it as soon as I finish
> testing it ]
>
> If a module is loaded that is tainted with anything but OOT or CRAP, then
> it will not create the traceoint infrastructure for the module. There should
traceoint -> tracepoint
> be a big warning when this happens instead of exiting silently.
>
> Fixes: 97e1c18e8d17 "tracing: Kernel Tracepoints"
> Cc: stable@vger.kernel.org
> Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
> ---
> kernel/tracepoint.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c
> index 29f2654..413bc06 100644
> --- a/kernel/tracepoint.c
> +++ b/kernel/tracepoint.c
> @@ -641,7 +641,8 @@ static int tracepoint_module_coming(struct module *mod)
> * module headers (for forced load), to make sure we don't cause a crash.
> * Staging and out-of-tree GPL modules are fine.
> */
> - 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"))
Perhaps ever clearer with:
"Module \"%s\" is tainted, disabling tracepoints", mod->name
?
Other than that, looks good to me!
Thanks,
Mathieu
> return 0;
> mutex_lock(&tracepoints_mutex);
> tp_mod = kmalloc(sizeof(struct tp_module), GFP_KERNEL);
> --
> 1.8.5.3
>
>
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
next prev parent reply other threads:[~2014-02-26 0:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-26 0:15 [RFC][PATCH] tracing: Warn and notify if tracepoints are not loaded due to module taint Steven Rostedt
2014-02-26 0:39 ` Mathieu Desnoyers [this message]
2014-02-26 0:49 ` Steven Rostedt
2014-02-26 8:59 ` Peter Zijlstra
2014-02-26 12:48 ` Mathieu Desnoyers
2014-02-26 16:15 ` Steven Rostedt
2014-02-26 17:24 ` Mathieu Desnoyers
2014-02-26 18:46 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=188130295.30493.1393375141631.JavaMail.zimbra@efficios.com \
--to=mathieu.desnoyers@efficios.com \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=rusty@rustcorp.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox