diff options
Diffstat (limited to 'kernel/module.c')
| -rw-r--r-- | kernel/module.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/kernel/module.c b/kernel/module.c index d24fcf29cb64..11869408f79b 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
| @@ -640,7 +640,7 @@ static int module_unload_init(struct module *mod) | |||
| 640 | INIT_LIST_HEAD(&mod->target_list); | 640 | INIT_LIST_HEAD(&mod->target_list); |
| 641 | 641 | ||
| 642 | /* Hold reference count during initialization. */ | 642 | /* Hold reference count during initialization. */ |
| 643 | __this_cpu_write(mod->refptr->incs, 1); | 643 | raw_cpu_write(mod->refptr->incs, 1); |
| 644 | 644 | ||
| 645 | return 0; | 645 | return 0; |
| 646 | } | 646 | } |
| @@ -1013,9 +1013,11 @@ 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_UNSAFE_SMP, TAINT_MACHINE_CHECK, TAINT_BAD_PAGE don't | 1020 | * TAINT_CPU_OUT_OF_SPEC, TAINT_MACHINE_CHECK, TAINT_BAD_PAGE don't |
| 1019 | * apply to modules. | 1021 | * apply to modules. |
| 1020 | */ | 1022 | */ |
| 1021 | return l; | 1023 | return l; |
| @@ -1948,6 +1950,10 @@ static int simplify_symbols(struct module *mod, const struct load_info *info) | |||
| 1948 | 1950 | ||
| 1949 | switch (sym[i].st_shndx) { | 1951 | switch (sym[i].st_shndx) { |
| 1950 | case SHN_COMMON: | 1952 | case SHN_COMMON: |
| 1953 | /* Ignore common symbols */ | ||
| 1954 | if (!strncmp(name, "__gnu_lto", 9)) | ||
| 1955 | break; | ||
| 1956 | |||
| 1951 | /* We compiled with -fno-common. These are not | 1957 | /* We compiled with -fno-common. These are not |
| 1952 | supposed to happen. */ | 1958 | supposed to happen. */ |
| 1953 | pr_debug("Common symbol: %s\n", name); | 1959 | pr_debug("Common symbol: %s\n", name); |
| @@ -3214,7 +3220,7 @@ static int load_module(struct load_info *info, const char __user *uargs, | |||
| 3214 | pr_notice_once("%s: module verification failed: signature " | 3220 | pr_notice_once("%s: module verification failed: signature " |
| 3215 | "and/or required key missing - tainting " | 3221 | "and/or required key missing - tainting " |
| 3216 | "kernel\n", mod->name); | 3222 | "kernel\n", mod->name); |
| 3217 | add_taint_module(mod, TAINT_FORCED_MODULE, LOCKDEP_STILL_OK); | 3223 | add_taint_module(mod, TAINT_UNSIGNED_MODULE, LOCKDEP_STILL_OK); |
| 3218 | } | 3224 | } |
| 3219 | #endif | 3225 | #endif |
| 3220 | 3226 | ||
| @@ -3809,12 +3815,12 @@ void print_modules(void) | |||
| 3809 | list_for_each_entry_rcu(mod, &modules, list) { | 3815 | list_for_each_entry_rcu(mod, &modules, list) { |
| 3810 | if (mod->state == MODULE_STATE_UNFORMED) | 3816 | if (mod->state == MODULE_STATE_UNFORMED) |
| 3811 | continue; | 3817 | continue; |
| 3812 | printk(" %s%s", mod->name, module_flags(mod, buf)); | 3818 | pr_cont(" %s%s", mod->name, module_flags(mod, buf)); |
| 3813 | } | 3819 | } |
| 3814 | preempt_enable(); | 3820 | preempt_enable(); |
| 3815 | if (last_unloaded_module[0]) | 3821 | if (last_unloaded_module[0]) |
| 3816 | printk(" [last unloaded: %s]", last_unloaded_module); | 3822 | pr_cont(" [last unloaded: %s]", last_unloaded_module); |
| 3817 | printk("\n"); | 3823 | pr_cont("\n"); |
| 3818 | } | 3824 | } |
| 3819 | 3825 | ||
| 3820 | #ifdef CONFIG_MODVERSIONS | 3826 | #ifdef CONFIG_MODVERSIONS |
