--- zzzz-none-000/linux-2.6.28.10/kernel/module.c 2009-05-02 18:54:43.000000000 +0000 +++ puma5-6360-529/linux-2.6.28.10/kernel/module.c 2012-07-10 08:42:59.000000000 +0000 @@ -295,8 +295,11 @@ return false; if (!fsa->gplok) { - if (syms->licence == GPL_ONLY) + if (syms->licence == GPL_ONLY) { + printk(KERN_ERR "Symbol %s can not be used " + "by a non-GPL module\n", fsa->name); return false; + } if (syms->licence == WILL_BE_GPL_ONLY && fsa->warn) { printk(KERN_WARNING "Symbol %s is being used " "by a non-GPL module, which will not " @@ -995,9 +998,9 @@ goto bad_version; } - printk(KERN_WARNING "%s: no symbol version for %s\n", - mod->name, symname); - return 0; +/* Not in module's version table. OK, but that taints the kernel. */ + add_taint_module(mod, TAINT_FORCED_MODULE); + return 1; bad_version: printk("%s: disagrees about version of symbol %s\n", @@ -1559,8 +1562,9 @@ if (ELF_ST_BIND(sym[i].st_info) == STB_WEAK) break; - printk(KERN_WARNING "%s: Unknown symbol %s\n", - mod->name, strtab + sym[i].st_name); + printk(KERN_WARNING "%s: Unknown symbol %s (%ld)\n", + mod->name, strtab + sym[i].st_name, + (long)sym[i].st_value); ret = -ENOENT; break; @@ -1819,9 +1823,9 @@ #endif /* CONFIG_DYNAMIC_PRINTK_DEBUG */ } -static void *module_alloc_update_bounds(unsigned long size) +static void *module_alloc_update_bounds(unsigned long size, char *name, enum _module_alloc_type_ type) { - void *ret = module_alloc(size); + void *ret = module_alloc(size, name, type); if (ret) { /* Update module bounds. */ @@ -2010,7 +2014,7 @@ layout_sections(mod, hdr, sechdrs, secstrings); /* Do the allocs. */ - ptr = module_alloc_update_bounds(mod->core_size); + ptr = module_alloc_update_bounds(mod->core_size, mod->name, module_alloc_type_core); if (!ptr) { err = -ENOMEM; goto free_percpu; @@ -2018,7 +2022,7 @@ memset(ptr, 0, mod->core_size); mod->module_core = ptr; - ptr = module_alloc_update_bounds(mod->init_size); + ptr = module_alloc_update_bounds(mod->init_size, mod->name, module_alloc_type_init); if (!ptr && mod->init_size) { err = -ENOMEM; goto free_core;