lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 16 Jan 2012 11:38:19 -0500
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	LKML <linux-kernel@...r.kernel.org>, stable@...r.kernel.org,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	Ben Hutchings <ben@...adent.org.uk>,
	Dave Jones <davej@...hat.com>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	Rusty Russell <rusty@...tcorp.com.au>,
	Andrew Morton <akpm@...ux-foundation.org>,
	David Daney <david.daney@...ium.com>
Subject: [PATCH][GIT PULL v2][v3.3] tracepoints/module: Fix disabling
 tracepoints with taint CRAP or OOT

On Mon, 2012-01-16 at 08:24 +0100, Ingo Molnar wrote:
> * Steven Rostedt <rostedt@...dmis.org> wrote:
> 
> >  	/*
> >  	 * We skip modules that tain the kernel, especially those with different
> 
> While touching this commit we might as well fix the typo here?
> 
> >  	 * module header (for forced load), to make sure we don't cause a crash.
> 
> ... and the second typo as well?
> 
> > +	 * Staging and out-of-tree modules are fine.
> >  	 */
> 
> I'd phrase it as 'out-of-tree GPL modules'.

Thanks!

Updated:

Please pull the latest tip/perf/urgent-2 tree, which can be found at:

  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
tip/perf/urgent-2

Head SHA1: c10076c4304083af15a41f6bc5e657e781c1f9a6


Steven Rostedt (1):
      tracepoints/module: Fix disabling tracepoints with taint CRAP or OOT

----
 kernel/tracepoint.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---------------------------
commit c10076c4304083af15a41f6bc5e657e781c1f9a6
Author: Steven Rostedt <srostedt@...hat.com>
Date:   Fri Jan 13 21:40:59 2012 -0500

    tracepoints/module: Fix disabling tracepoints with taint CRAP or OOT
    
    Tracepoints are disabled for tainted modules, which is usually because the
    module is either proprietary or was forced, and we don't want either of them
    using kernel tracepoints.
    
    But, a module can also be tainted by being in the staging directory or
    compiled out of tree. Either is fine for use with tracepoints, no need
    to punish them.  I found this out when I noticed that my sample trace event
    module, when done out of tree, stopped working.
    
    Cc: stable@...r.kernel.org # 3.2
    Cc: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
    Cc: Ben Hutchings <ben@...adent.org.uk>
    Cc: Dave Jones <davej@...hat.com>
    Cc: Greg Kroah-Hartman <gregkh@...e.de>
    Cc: Rusty Russell <rusty@...tcorp.com.au>
    Signed-off-by: Steven Rostedt <rostedt@...dmis.org>

diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c
index db110b8..f1539de 100644
--- a/kernel/tracepoint.c
+++ b/kernel/tracepoint.c
@@ -634,10 +634,11 @@ static int tracepoint_module_coming(struct module *mod)
 	int ret = 0;
 
 	/*
-	 * We skip modules that tain the kernel, especially those with different
-	 * module header (for forced load), to make sure we don't cause a crash.
+	 * We skip modules that taint the kernel, especially those with different
+	 * 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)
+	if (mod->taints & ~((1 << TAINT_OOT_MODULE) | (1 << TAINT_CRAP)))
 		return 0;
 	mutex_lock(&tracepoints_mutex);
 	tp_mod = kmalloc(sizeof(struct tp_module), GFP_KERNEL);


Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ