On Wed, 2008-01-30 at 05:07 +0000, Jon Masters wrote:I'd prefer a new taint. It's less likely to break. It provides more information in the stack dumps. It makes it clear the difference ndiswrapper and driverloader. Here's the patch: --- Introduce a new taint flag for ndiswrapper Although ndiswrapper loads proprietary code, it's under GPL itself. Introduce a different taint flag for this case, so that ndiswrapper retains access to GPL-only symbols. Add comments to show the difference between driverloader and ndiswrapper. Signed-off-by: Pavel Roskin <proski@gnu.org> --- include/linux/kernel.h | 1 + kernel/module.c | 5 ++++- kernel/panic.c | 2 ++ 3 files changed, 7 insertions(+), 1 deletions(-) diff --git a/include/linux/kernel.h b/include/linux/kernel.h index a7283c9..861a6ae 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -240,6 +240,7 @@ extern enum system_states { #define TAINT_BAD_PAGE (1<<5) #define TAINT_USER (1<<6) #define TAINT_DIE (1<<7) +#define TAINT_BLOB_WRAPPER (1<<8) extern void dump_stack(void) __cold; diff --git a/kernel/module.c b/kernel/module.c index f6a4e72..a64380c 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -1925,8 +1925,11 @@ static struct module *load_module(void __user *umod, /* Set up license info based on the info section */ set_license(mod, get_modinfo(sechdrs, infoindex, "license")); + /* GPL, but may load proprietary code */ if (strcmp(mod->name, "ndiswrapper") == 0) - add_taint_module(mod, TAINT_PROPRIETARY_MODULE); + add_taint_module(mod, TAINT_BLOB_WRAPPER); + + /* Wrongly claims to be under GPL */ if (strcmp(mod->name, "driverloader") == 0) add_taint_module(mod, TAINT_PROPRIETARY_MODULE); diff --git a/kernel/panic.c b/kernel/panic.c index da4d6ba..b040812 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -152,6 +152,7 @@ EXPORT_SYMBOL(panic); * 'M' - System experienced a machine check exception. * 'B' - System has hit bad_page. * 'U' - Userspace-defined naughtiness. + * 'W' - Wrapper for untrusted binary blobs has been loaded. * * The string is overwritten by the next call to print_taint(). */ @@ -162,6 +163,7 @@ const char *print_tainted(void) if (tainted) { snprintf(buf, sizeof(buf), "Tainted: %c%c%c%c%c%c%c%c", tainted & TAINT_PROPRIETARY_MODULE ? 'P' : 'G', + tainted & TAINT_BLOB_WRAPPER ? 'W' : ' ', tainted & TAINT_FORCED_MODULE ? 'F' : ' ', tainted & TAINT_UNSAFE_SMP ? 'S' : ' ', tainted & TAINT_FORCED_RMMOD ? 'R' : ' ', -- Regards, Pavel Roskin --
| Jeff Garzik | [PATCH 1/9] irq-remove: core |
| Jamie Lokier | Re: POHMELFS high performance network filesystem. Transactions, failover, performa... |
| Dave Young | Re: 2.6.24-rc3-mm1 |
| Willy Tarreau | Re: From 2.4 to 2.6 to 2.7? |
git: | |
| Dan Miner | Compilation speeds (was Re: No patchlevel 3.} |
| Ian Jackson | RFD: comp.os.linux split |
| X X | X11 GIf viewer somewhere? |
| root | Broken pipe when using reboot/halt, etc. |
| Natalie Protasevich | [BUG] New Kernel Bugs |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
