aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/module.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/kernel/module.c b/kernel/module.c
index acf6ed3ebe81..2c932760fd33 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -842,26 +842,6 @@ out:
842 return ret; 842 return ret;
843} 843}
844 844
845static size_t module_flags_taint(struct module *mod, char *buf)
846{
847 size_t l = 0;
848
849 if (mod->taints & (1 << TAINT_PROPRIETARY_MODULE))
850 buf[l++] = 'P';
851 if (mod->taints & (1 << TAINT_OOT_MODULE))
852 buf[l++] = 'O';
853 if (mod->taints & (1 << TAINT_FORCED_MODULE))
854 buf[l++] = 'F';
855 if (mod->taints & (1 << TAINT_CRAP))
856 buf[l++] = 'C';
857 /*
858 * TAINT_FORCED_RMMOD: could be added.
859 * TAINT_UNSAFE_SMP, TAINT_MACHINE_CHECK, TAINT_BAD_PAGE don't
860 * apply to modules.
861 */
862 return l;
863}
864
865static inline void print_unload_info(struct seq_file *m, struct module *mod) 845static inline void print_unload_info(struct seq_file *m, struct module *mod)
866{ 846{
867 struct module_use *use; 847 struct module_use *use;
@@ -962,6 +942,26 @@ static inline int module_unload_init(struct module *mod)
962} 942}
963#endif /* CONFIG_MODULE_UNLOAD */ 943#endif /* CONFIG_MODULE_UNLOAD */
964 944
945static size_t module_flags_taint(struct module *mod, char *buf)
946{
947 size_t l = 0;
948
949 if (mod->taints & (1 << TAINT_PROPRIETARY_MODULE))
950 buf[l++] = 'P';
951 if (mod->taints & (1 << TAINT_OOT_MODULE))
952 buf[l++] = 'O';
953 if (mod->taints & (1 << TAINT_FORCED_MODULE))
954 buf[l++] = 'F';
955 if (mod->taints & (1 << TAINT_CRAP))
956 buf[l++] = 'C';
957 /*
958 * TAINT_FORCED_RMMOD: could be added.
959 * TAINT_UNSAFE_SMP, TAINT_MACHINE_CHECK, TAINT_BAD_PAGE don't
960 * apply to modules.
961 */
962 return l;
963}
964
965static ssize_t show_initstate(struct module_attribute *mattr, 965static ssize_t show_initstate(struct module_attribute *mattr,
966 struct module_kobject *mk, char *buffer) 966 struct module_kobject *mk, char *buffer)
967{ 967{