Fix: module signature vs tracepoints: add new TAINT_UNSIGNED_MODULE
[deliverable/linux.git] / kernel / tracepoint.c
index 29f26540e9c9550fd1c099512e7b20beb21ce234..3cdbed1fbdc79805aa5630687bde189fbde1d723 100644 (file)
@@ -631,6 +631,12 @@ void tracepoint_iter_reset(struct tracepoint_iter *iter)
 EXPORT_SYMBOL_GPL(tracepoint_iter_reset);
 
 #ifdef CONFIG_MODULES
+bool trace_module_has_bad_taint(struct module *mod)
+{
+       return mod->taints & ~((1 << TAINT_OOT_MODULE) | (1 << TAINT_CRAP) |
+                              (1 << TAINT_UNSIGNED_MODULE));
+}
+
 static int tracepoint_module_coming(struct module *mod)
 {
        struct tp_module *tp_mod, *iter;
@@ -639,9 +645,9 @@ static int tracepoint_module_coming(struct module *mod)
        /*
         * 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.
+        * Staging, out-of-tree, and unsigned GPL modules are fine.
         */
-       if (mod->taints & ~((1 << TAINT_OOT_MODULE) | (1 << TAINT_CRAP)))
+       if (trace_module_has_bad_taint(mod))
                return 0;
        mutex_lock(&tracepoints_mutex);
        tp_mod = kmalloc(sizeof(struct tp_module), GFP_KERNEL);
This page took 0.024461 seconds and 5 git commands to generate.