public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] module: log OOT_MODULE tainting
@ 2012-01-02 13:58 Jiri Kosina
  2012-01-02 22:50 ` Rusty Russell
  0 siblings, 1 reply; 4+ messages in thread
From: Jiri Kosina @ 2012-01-02 13:58 UTC (permalink / raw)
  To: Andrew Morton, Rusty Russell; +Cc: linux-kernel

Follow what we do with other taints and output a message into kernel ring 
buffer once tainting a kernel because out-of-tree module is being loaded.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>

diff --git a/kernel/module.c b/kernel/module.c
index b02d633..3f52b3e 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2478,8 +2478,11 @@ static int check_modinfo(struct module *mod, struct load_info *info)
 		return -ENOEXEC;
 	}
 
-	if (!get_modinfo(info, "intree"))
+	if (!get_modinfo(info, "intree")) {
 		add_taint_module(mod, TAINT_OOT_MODULE);
+		printk(KERN_WARNING "%s: out of tree module taints kernel\n",
+				mod->name);
+	}
 
 	if (get_modinfo(info, "staging")) {
 		add_taint_module(mod, TAINT_CRAP);

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-01-04  2:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-02 13:58 [PATCH] module: log OOT_MODULE tainting Jiri Kosina
2012-01-02 22:50 ` Rusty Russell
2012-01-03  8:47   ` Jiri Kosina
2012-01-04  1:52     ` Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox