On Sat, 1 May 2004 16:53:36 -0400
Marc Boucher <marc@xxxxxxxxxxxx> wrote:
Constructive comments/improvements welcome.
I think the following patch is more respectful of the Linux license.
It also explains to the user why their kernel is now tainted so they
won't be confused when they see "tainted" messages elsewhere.
Also it may encourage more open source drivers which you agree
are better Marc:
--- linux-2.6.6-rc3-bk3/kernel/module.c 2004-05-01 16:06:46.769778360 -0400
+++ linux-2.6.6-rc3-bk3-mb/kernel/module.c 2004-05-01 16:38:02.563614352 -0400
@@ -1125,15 +1125,19 @@
|| strcmp(license, "Dual MPL/GPL") == 0);
}
-static void set_license(struct module *mod, const char *license)
+static void set_license(struct module *mod, const char *license, const char *author)
{
if (!license)
license = "unspecified";
mod->license_gplok = license_is_gpl_compatible(license);
- if (!mod->license_gplok) {
- printk(KERN_WARNING "%s: module license '%s' taints kernel.\n",
- mod->name, license);
+ if (!mod->license_gplok && !(tainted & TAINT_PROPRIETARY_MODULE)) {
+ printk(KERN_INFO "%s: module has non-GPL license (%s).\n", mod->name, license);
+ printk(KERN_INFO "%s: Please consider supporting vendors that provide open source drivers\n", mod->name);
+ if(author)
+ printk(KERN_INFO "%s: kernel now tainted, for all support contact: %s\n", mod->name, author);
+ else
+ printk(KERN_INFO "%s: kernel now tainted, for all support contact author of this driver\n", mod->name);
tainted |= TAINT_PROPRIETARY_MODULE;
}
}
@@ -1470,7 +1473,9 @@
module_unload_init(mod);
/* Set up license info based on the info section */
- set_license(mod, get_modinfo(sechdrs, infoindex, "license"));
+ set_license(mod,
+ get_modinfo(sechdrs, infoindex, "license"),
+ get_modinfo(sechdrs, infoindex, "author"));
/* Fix up syms, so that st_value is a pointer to location. */
err = simplify_symbols(sechdrs, symindex, strtab, versindex, pcpuindex,