aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-06 12:38:07 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-06 12:38:07 -0400
commit6f4c98e1c22c28e00b8f050cce895a6b74db15d1 (patch)
treeb00da8b3367c6f3d0f74f44b8c4092a7b7cbbe18 /kernel
parent18a1a7a1d862ae0794a0179473d08a414dd49234 (diff)
parent22c9bcad859d5c969289b3b37084a96c621f8f2c (diff)
Merge tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux
Pull module updates from Rusty Russell: "Nothing major: the stricter permissions checking for sysfs broke a staging driver; fix included. Greg KH said he'd take the patch but hadn't as the merge window opened, so it's included here to avoid breaking build" * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: staging: fix up speakup kobject mode Use 'E' instead of 'X' for unsigned module taint flag. VERIFY_OCTAL_PERMISSIONS: stricter checking for sysfs perms. kallsyms: fix percpu vars on x86-64 with relocation. kallsyms: generalize address range checking module: LLVMLinux: Remove unused function warning from __param_check macro Fix: module signature vs tracepoints: add new TAINT_UNSIGNED_MODULE module: remove MODULE_GENERIC_TABLE module: allow multiple calls to MODULE_DEVICE_TABLE() per module module: use pr_cont
Diffstat (limited to 'kernel')
-rw-r--r--kernel/module.c10
-rw-r--r--kernel/panic.c2
-rw-r--r--kernel/tracepoint.c5
3 files changed, 11 insertions, 6 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 8dc7f5e80dd8..29f7790eaa14 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1013,6 +1013,8 @@ static size_t module_flags_taint(struct module *mod, char *buf)
1013 buf[l++] = 'F'; 1013 buf[l++] = 'F';
1014 if (mod->taints & (1 << TAINT_CRAP)) 1014 if (mod->taints & (1 << TAINT_CRAP))
1015 buf[l++] = 'C'; 1015 buf[l++] = 'C';
1016 if (mod->taints & (1 << TAINT_UNSIGNED_MODULE))
1017 buf[l++] = 'E';
1016 /* 1018 /*
1017 * TAINT_FORCED_RMMOD: could be added. 1019 * TAINT_FORCED_RMMOD: could be added.
1018 * TAINT_CPU_OUT_OF_SPEC, TAINT_MACHINE_CHECK, TAINT_BAD_PAGE don't 1020 * TAINT_CPU_OUT_OF_SPEC, TAINT_MACHINE_CHECK, TAINT_BAD_PAGE don't
@@ -3218,7 +3220,7 @@ static int load_module(struct load_info *info, const char __user *uargs,
3218 pr_notice_once("%s: module verification failed: signature " 3220 pr_notice_once("%s: module verification failed: signature "
3219 "and/or required key missing - tainting " 3221 "and/or required key missing - tainting "
3220 "kernel\n", mod->name); 3222 "kernel\n", mod->name);
3221 add_taint_module(mod, TAINT_FORCED_MODULE, LOCKDEP_STILL_OK); 3223 add_taint_module(mod, TAINT_UNSIGNED_MODULE, LOCKDEP_STILL_OK);
3222 } 3224 }
3223#endif 3225#endif
3224 3226
@@ -3813,12 +3815,12 @@ void print_modules(void)
3813 list_for_each_entry_rcu(mod, &modules, list) { 3815 list_for_each_entry_rcu(mod, &modules, list) {
3814 if (mod->state == MODULE_STATE_UNFORMED) 3816 if (mod->state == MODULE_STATE_UNFORMED)
3815 continue; 3817 continue;
3816 printk(" %s%s", mod->name, module_flags(mod, buf)); 3818 pr_cont(" %s%s", mod->name, module_flags(mod, buf));
3817 } 3819 }
3818 preempt_enable(); 3820 preempt_enable();
3819 if (last_unloaded_module[0]) 3821 if (last_unloaded_module[0])
3820 printk(" [last unloaded: %s]", last_unloaded_module); 3822 pr_cont(" [last unloaded: %s]", last_unloaded_module);
3821 printk("\n"); 3823 pr_cont("\n");
3822} 3824}
3823 3825
3824#ifdef CONFIG_MODVERSIONS 3826#ifdef CONFIG_MODVERSIONS
diff --git a/kernel/panic.c b/kernel/panic.c
index cca8a913ae7c..79fd820bb5e8 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -210,6 +210,7 @@ static const struct tnt tnts[] = {
210 { TAINT_CRAP, 'C', ' ' }, 210 { TAINT_CRAP, 'C', ' ' },
211 { TAINT_FIRMWARE_WORKAROUND, 'I', ' ' }, 211 { TAINT_FIRMWARE_WORKAROUND, 'I', ' ' },
212 { TAINT_OOT_MODULE, 'O', ' ' }, 212 { TAINT_OOT_MODULE, 'O', ' ' },
213 { TAINT_UNSIGNED_MODULE, 'E', ' ' },
213}; 214};
214 215
215/** 216/**
@@ -228,6 +229,7 @@ static const struct tnt tnts[] = {
228 * 'C' - modules from drivers/staging are loaded. 229 * 'C' - modules from drivers/staging are loaded.
229 * 'I' - Working around severe firmware bug. 230 * 'I' - Working around severe firmware bug.
230 * 'O' - Out-of-tree module has been loaded. 231 * 'O' - Out-of-tree module has been loaded.
232 * 'E' - Unsigned module has been loaded.
231 * 233 *
232 * The string is overwritten by the next call to print_tainted(). 234 * The string is overwritten by the next call to print_tainted().
233 */ 235 */
diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c
index 50f8329c2042..fb0a38a26555 100644
--- a/kernel/tracepoint.c
+++ b/kernel/tracepoint.c
@@ -460,7 +460,8 @@ EXPORT_SYMBOL_GPL(tracepoint_probe_unregister);
460#ifdef CONFIG_MODULES 460#ifdef CONFIG_MODULES
461bool trace_module_has_bad_taint(struct module *mod) 461bool trace_module_has_bad_taint(struct module *mod)
462{ 462{
463 return mod->taints & ~((1 << TAINT_OOT_MODULE) | (1 << TAINT_CRAP)); 463 return mod->taints & ~((1 << TAINT_OOT_MODULE) | (1 << TAINT_CRAP) |
464 (1 << TAINT_UNSIGNED_MODULE));
464} 465}
465 466
466static int tracepoint_module_coming(struct module *mod) 467static int tracepoint_module_coming(struct module *mod)
@@ -474,7 +475,7 @@ static int tracepoint_module_coming(struct module *mod)
474 /* 475 /*
475 * We skip modules that taint the kernel, especially those with different 476 * We skip modules that taint the kernel, especially those with different
476 * module headers (for forced load), to make sure we don't cause a crash. 477 * module headers (for forced load), to make sure we don't cause a crash.
477 * Staging and out-of-tree GPL modules are fine. 478 * Staging, out-of-tree, and unsigned GPL modules are fine.
478 */ 479 */
479 if (trace_module_has_bad_taint(mod)) 480 if (trace_module_has_bad_taint(mod))
480 return 0; 481 return 0;