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

* Re: [PATCH] module: log OOT_MODULE tainting
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Rusty Russell @ 2012-01-02 22:50 UTC (permalink / raw)
  To: Jiri Kosina, Andrew Morton; +Cc: linux-kernel

On Mon, 2 Jan 2012 14:58:51 +0100 (CET), Jiri Kosina <jkosina@suse.cz> wrote:
> 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>

I don't like this, actually.  There's a wish among some distributions to
know that OOT modules are in use in panic messages, but not by others.
Certainly, there's no reason to warn the user.

Thanks,
Rusty.

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

* Re: [PATCH] module: log OOT_MODULE tainting
  2012-01-02 22:50 ` Rusty Russell
@ 2012-01-03  8:47   ` Jiri Kosina
  2012-01-04  1:52     ` Rusty Russell
  0 siblings, 1 reply; 4+ messages in thread
From: Jiri Kosina @ 2012-01-03  8:47 UTC (permalink / raw)
  To: Rusty Russell; +Cc: Andrew Morton, linux-kernel

On Tue, 3 Jan 2012, Rusty Russell wrote:

> > 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>
> 
> I don't like this, actually.  There's a wish among some distributions to
> know that OOT modules are in use in panic messages, but not by others.
> Certainly, there's no reason to warn the user.

I do get your point, but it seems to me that we are at least not 
consistent here. Why would we then log messages in cases of 
TAINT_FORCED_MODULE for example? The user knows that he has forced the 
module load, right?

-- 
Jiri Kosina
SUSE Labs

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

* Re: [PATCH] module: log OOT_MODULE tainting
  2012-01-03  8:47   ` Jiri Kosina
@ 2012-01-04  1:52     ` Rusty Russell
  0 siblings, 0 replies; 4+ messages in thread
From: Rusty Russell @ 2012-01-04  1:52 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Andrew Morton, linux-kernel

On Tue, 3 Jan 2012 09:47:02 +0100 (CET), Jiri Kosina <jkosina@suse.cz> wrote:
> On Tue, 3 Jan 2012, Rusty Russell wrote:
> 
> > > 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>
> > 
> > I don't like this, actually.  There's a wish among some distributions to
> > know that OOT modules are in use in panic messages, but not by others.
> > Certainly, there's no reason to warn the user.
> 
> I do get your point, but it seems to me that we are at least not 
> consistent here. Why would we then log messages in cases of 
> TAINT_FORCED_MODULE for example? The user knows that he has forced the 
> module load, right?

Agreed, we're not consistent at all.  But a forcing a module is such a
weird and risky thing to do, the user can ignore a warning message.

Cheers,
Rusty.

^ permalink raw reply	[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