2008-01-21 21:27:33

by Jon Masters

[permalink] [raw]
Subject: [PATCH] add module taint on ndiswrapper

The struct module taints member is supposed to store per-module taint
data. The kernel knows about certain specific external modules that will
taint the kernel, such as ndiswrapper. Use of ndiswrapper possibly
should set the per-module taint in addition to the global kernel
taint flag, unless we're arguing not because wrapper module itself
is not what actually causes the kernel to be tainted as such?

Signed-off-by: Jon Masters <[email protected]>

diff -urp linus_26/kernel/module.c jcm_26/kernel/module.c
--- linus_26/kernel/module.c 2008-01-21 13:16:39.000000000 -0500
+++ jcm_26/kernel/module.c 2008-01-21 15:25:41.000000000 -0500
@@ -1893,7 +1893,7 @@ static struct module *load_module(void _
set_license(mod, get_modinfo(sechdrs, infoindex, "license"));

if (strcmp(mod->name, "ndiswrapper") == 0)
- add_taint(TAINT_PROPRIETARY_MODULE);
+ add_taint_module(mod, TAINT_PROPRIETARY_MODULE);
if (strcmp(mod->name, "driverloader") == 0)
add_taint_module(mod, TAINT_PROPRIETARY_MODULE);


2008-01-21 23:24:45

by Rusty Russell

[permalink] [raw]
Subject: Re: [PATCH] add module taint on ndiswrapper

On Tuesday 22 January 2008 07:43:41 Jon Masters wrote:
> The struct module taints member is supposed to store per-module taint
> data. The kernel knows about certain specific external modules that will
> taint the kernel, such as ndiswrapper. Use of ndiswrapper possibly
> should set the per-module taint in addition to the global kernel
> taint flag, unless we're arguing not because wrapper module itself
> is not what actually causes the kernel to be tainted as such?
>
> Signed-off-by: Jon Masters <[email protected]>

Thanks, applied.

Rusty.