diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2009-03-31 15:05:33 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2009-03-30 22:35:33 -0400 |
commit | c6e665c8f0c18ab3686117905765b5139efd6ebd (patch) | |
tree | 0e478ff0a38a52b2c3ff00024f081c94260fdd61 /kernel/module.c | |
parent | c6b37801911d7f4663c99cad8aa230bc934cea82 (diff) |
module: clarify the force-loading taint message.
Impact: Message cleanup
Two of three callers of try_to_force_load() are not because of a
missing version, so change the messages:
Old:
<modname>: no version for "magic" found: kernel tainted.
New:
<modname>: bad vermagic: kernel tainted.
Old:
<modname>: no version for "nocrc" found: kernel tainted.
New:
<modname>: no versions for exported symbols: kernel tainted.
Old:
<modname>: no version for "<symname>" found: kernel tainted.
New:
<modname>: <symname>: kernel tainted.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'kernel/module.c')
-rw-r--r-- | kernel/module.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/module.c b/kernel/module.c index 5fd00766a4dc..599fc85bd2cc 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -990,12 +990,12 @@ static struct module_attribute *modinfo_attrs[] = { | |||
990 | 990 | ||
991 | static const char vermagic[] = VERMAGIC_STRING; | 991 | static const char vermagic[] = VERMAGIC_STRING; |
992 | 992 | ||
993 | static int try_to_force_load(struct module *mod, const char *symname) | 993 | static int try_to_force_load(struct module *mod, const char *reason) |
994 | { | 994 | { |
995 | #ifdef CONFIG_MODULE_FORCE_LOAD | 995 | #ifdef CONFIG_MODULE_FORCE_LOAD |
996 | if (!test_taint(TAINT_FORCED_MODULE)) | 996 | if (!test_taint(TAINT_FORCED_MODULE)) |
997 | printk("%s: no version for \"%s\" found: kernel tainted.\n", | 997 | printk(KERN_WARNING "%s: %s: kernel tainted.\n", |
998 | mod->name, symname); | 998 | mod->name, reason); |
999 | add_taint_module(mod, TAINT_FORCED_MODULE); | 999 | add_taint_module(mod, TAINT_FORCED_MODULE); |
1000 | return 0; | 1000 | return 0; |
1001 | #else | 1001 | #else |
@@ -2002,7 +2002,7 @@ static noinline struct module *load_module(void __user *umod, | |||
2002 | modmagic = get_modinfo(sechdrs, infoindex, "vermagic"); | 2002 | modmagic = get_modinfo(sechdrs, infoindex, "vermagic"); |
2003 | /* This is allowed: modprobe --force will invalidate it. */ | 2003 | /* This is allowed: modprobe --force will invalidate it. */ |
2004 | if (!modmagic) { | 2004 | if (!modmagic) { |
2005 | err = try_to_force_load(mod, "magic"); | 2005 | err = try_to_force_load(mod, "bad vermagic"); |
2006 | if (err) | 2006 | if (err) |
2007 | goto free_hdr; | 2007 | goto free_hdr; |
2008 | } else if (!same_magic(modmagic, vermagic, versindex)) { | 2008 | } else if (!same_magic(modmagic, vermagic, versindex)) { |
@@ -2191,8 +2191,8 @@ static noinline struct module *load_module(void __user *umod, | |||
2191 | || (mod->num_unused_gpl_syms && !mod->unused_gpl_crcs) | 2191 | || (mod->num_unused_gpl_syms && !mod->unused_gpl_crcs) |
2192 | #endif | 2192 | #endif |
2193 | ) { | 2193 | ) { |
2194 | printk(KERN_WARNING "%s: No versions for exported symbols.\n", mod->name); | 2194 | err = try_to_force_load(mod, |
2195 | err = try_to_force_load(mod, "nocrc"); | 2195 | "no versions for exported symbols"); |
2196 | if (err) | 2196 | if (err) |
2197 | goto cleanup; | 2197 | goto cleanup; |
2198 | } | 2198 | } |