1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* Helpers for initial module or kernel cmdline parsing
3 Copyright (C) 2001 Rusty Russell.
6 #include <linux/kernel.h>
7 #include <linux/kstrtox.h>
8 #include <linux/string.h>
9 #include <linux/errno.h>
10 #include <linux/module.h>
11 #include <linux/moduleparam.h>
12 #include <linux/device.h>
13 #include <linux/err.h>
14 #include <linux/slab.h>
15 #include <linux/ctype.h>
16 #include <linux/security.h>
19 /* Protects all built-in parameters, modules use their own param_lock */
20 static DEFINE_MUTEX(param_lock);
22 /* Use the module's mutex, or if built-in use the built-in mutex */
24 #define KPARAM_MUTEX(mod) ((mod) ? &(mod)->param_lock : ¶m_lock)
26 #define KPARAM_MUTEX(mod) (¶m_lock)
29 static inline void check_kparam_locked(struct module *mod)
31 BUG_ON(!mutex_is_locked(KPARAM_MUTEX(mod)));
34 static inline void check_kparam_locked(struct module *mod)
37 #endif /* !CONFIG_SYSFS */
39 /* This just allows us to keep track of which parameters are kmalloced. */
40 struct kmalloced_param {
41 struct list_head list;
44 static LIST_HEAD(kmalloced_params);
45 static DEFINE_SPINLOCK(kmalloced_params_lock);
47 static void *kmalloc_parameter(unsigned int size)
49 struct kmalloced_param *p;
51 p = kmalloc(sizeof(*p) + size, GFP_KERNEL);
55 spin_lock(&kmalloced_params_lock);
56 list_add(&p->list, &kmalloced_params);
57 spin_unlock(&kmalloced_params_lock);
62 /* Does nothing if parameter wasn't kmalloced above. */
63 static void maybe_kfree_parameter(void *param)
65 struct kmalloced_param *p;
67 spin_lock(&kmalloced_params_lock);
68 list_for_each_entry(p, &kmalloced_params, list) {
69 if (p->val == param) {
75 spin_unlock(&kmalloced_params_lock);
78 static char dash2underscore(char c)
85 bool parameqn(const char *a, const char *b, size_t n)
89 for (i = 0; i < n; i++) {
90 if (dash2underscore(a[i]) != dash2underscore(b[i]))
96 bool parameq(const char *a, const char *b)
98 return parameqn(a, b, strlen(a)+1);
101 static bool param_check_unsafe(const struct kernel_param *kp)
103 if (kp->flags & KERNEL_PARAM_FL_HWPARAM &&
104 security_locked_down(LOCKDOWN_MODULE_PARAMETERS))
107 if (kp->flags & KERNEL_PARAM_FL_UNSAFE) {
108 pr_notice("Setting dangerous option %s - tainting kernel\n",
110 add_taint(TAINT_USER, LOCKDEP_STILL_OK);
116 static int parse_one(char *param,
119 const struct kernel_param *params,
124 int (*handle_unknown)(char *param, char *val,
125 const char *doing, void *arg))
131 for (i = 0; i < num_params; i++) {
132 if (parameq(param, params[i].name)) {
133 if (params[i].level < min_level
134 || params[i].level > max_level)
136 /* No one handled NULL, so do it here. */
138 !(params[i].ops->flags & KERNEL_PARAM_OPS_FL_NOARG))
140 pr_debug("handling %s with %p\n", param,
142 kernel_param_lock(params[i].mod);
143 if (param_check_unsafe(¶ms[i]))
144 err = params[i].ops->set(val, ¶ms[i]);
147 kernel_param_unlock(params[i].mod);
152 if (handle_unknown) {
153 pr_debug("doing %s: %s='%s'\n", doing, param, val);
154 return handle_unknown(param, val, doing, arg);
157 pr_debug("Unknown argument '%s'\n", param);
161 /* Args looks like "foo=bar,bar2 baz=fuz wiz". */
162 char *parse_args(const char *doing,
164 const struct kernel_param *params,
169 int (*unknown)(char *param, char *val,
170 const char *doing, void *arg))
172 char *param, *val, *err = NULL;
174 /* Chew leading spaces */
175 args = skip_spaces(args);
178 pr_debug("doing %s, parsing ARGS: '%s'\n", doing, args);
182 int irq_was_disabled;
184 args = next_arg(args, ¶m, &val);
186 if (!val && strcmp(param, "--") == 0)
188 irq_was_disabled = irqs_disabled();
189 ret = parse_one(param, val, doing, params, num,
190 min_level, max_level, arg, unknown);
191 if (irq_was_disabled && !irqs_disabled())
192 pr_warn("%s: option '%s' enabled irq's!\n",
199 pr_err("%s: Unknown parameter `%s'\n", doing, param);
202 pr_err("%s: `%s' too large for parameter `%s'\n",
203 doing, val ?: "", param);
206 pr_err("%s: `%s' invalid for parameter `%s'\n",
207 doing, val ?: "", param);
217 /* Lazy bastard, eh? */
218 #define STANDARD_PARAM_DEF(name, type, format, strtolfn) \
219 int param_set_##name(const char *val, const struct kernel_param *kp) \
221 return strtolfn(val, 0, (type *)kp->arg); \
223 int param_get_##name(char *buffer, const struct kernel_param *kp) \
225 return scnprintf(buffer, PAGE_SIZE, format "\n", \
226 *((type *)kp->arg)); \
228 const struct kernel_param_ops param_ops_##name = { \
229 .set = param_set_##name, \
230 .get = param_get_##name, \
232 EXPORT_SYMBOL(param_set_##name); \
233 EXPORT_SYMBOL(param_get_##name); \
234 EXPORT_SYMBOL(param_ops_##name)
237 STANDARD_PARAM_DEF(byte, unsigned char, "%hhu", kstrtou8);
238 STANDARD_PARAM_DEF(short, short, "%hi", kstrtos16);
239 STANDARD_PARAM_DEF(ushort, unsigned short, "%hu", kstrtou16);
240 STANDARD_PARAM_DEF(int, int, "%i", kstrtoint);
241 STANDARD_PARAM_DEF(uint, unsigned int, "%u", kstrtouint);
242 STANDARD_PARAM_DEF(long, long, "%li", kstrtol);
243 STANDARD_PARAM_DEF(ulong, unsigned long, "%lu", kstrtoul);
244 STANDARD_PARAM_DEF(ullong, unsigned long long, "%llu", kstrtoull);
245 STANDARD_PARAM_DEF(hexint, unsigned int, "%#08x", kstrtouint);
247 int param_set_uint_minmax(const char *val, const struct kernel_param *kp,
248 unsigned int min, unsigned int max)
255 ret = kstrtouint(val, 0, &num);
258 if (num < min || num > max)
260 *((unsigned int *)kp->arg) = num;
263 EXPORT_SYMBOL_GPL(param_set_uint_minmax);
265 int param_set_charp(const char *val, const struct kernel_param *kp)
267 if (strlen(val) > 1024) {
268 pr_err("%s: string parameter too long\n", kp->name);
272 maybe_kfree_parameter(*(char **)kp->arg);
274 /* This is a hack. We can't kmalloc in early boot, and we
275 * don't need to; this mangled commandline is preserved. */
276 if (slab_is_available()) {
277 *(char **)kp->arg = kmalloc_parameter(strlen(val)+1);
278 if (!*(char **)kp->arg)
280 strcpy(*(char **)kp->arg, val);
282 *(const char **)kp->arg = val;
286 EXPORT_SYMBOL(param_set_charp);
288 int param_get_charp(char *buffer, const struct kernel_param *kp)
290 return scnprintf(buffer, PAGE_SIZE, "%s\n", *((char **)kp->arg));
292 EXPORT_SYMBOL(param_get_charp);
294 void param_free_charp(void *arg)
296 maybe_kfree_parameter(*((char **)arg));
298 EXPORT_SYMBOL(param_free_charp);
300 const struct kernel_param_ops param_ops_charp = {
301 .set = param_set_charp,
302 .get = param_get_charp,
303 .free = param_free_charp,
305 EXPORT_SYMBOL(param_ops_charp);
307 /* Actually could be a bool or an int, for historical reasons. */
308 int param_set_bool(const char *val, const struct kernel_param *kp)
310 /* No equals means "set"... */
313 /* One of =[yYnN01] */
314 return kstrtobool(val, kp->arg);
316 EXPORT_SYMBOL(param_set_bool);
318 int param_get_bool(char *buffer, const struct kernel_param *kp)
320 /* Y and N chosen as being relatively non-coder friendly */
321 return sprintf(buffer, "%c\n", *(bool *)kp->arg ? 'Y' : 'N');
323 EXPORT_SYMBOL(param_get_bool);
325 const struct kernel_param_ops param_ops_bool = {
326 .flags = KERNEL_PARAM_OPS_FL_NOARG,
327 .set = param_set_bool,
328 .get = param_get_bool,
330 EXPORT_SYMBOL(param_ops_bool);
332 int param_set_bool_enable_only(const char *val, const struct kernel_param *kp)
336 bool orig_value = *(bool *)kp->arg;
337 struct kernel_param dummy_kp = *kp;
339 dummy_kp.arg = &new_value;
341 err = param_set_bool(val, &dummy_kp);
345 /* Don't let them unset it once it's set! */
346 if (!new_value && orig_value)
350 err = param_set_bool(val, kp);
354 EXPORT_SYMBOL_GPL(param_set_bool_enable_only);
356 const struct kernel_param_ops param_ops_bool_enable_only = {
357 .flags = KERNEL_PARAM_OPS_FL_NOARG,
358 .set = param_set_bool_enable_only,
359 .get = param_get_bool,
361 EXPORT_SYMBOL_GPL(param_ops_bool_enable_only);
363 /* This one must be bool. */
364 int param_set_invbool(const char *val, const struct kernel_param *kp)
368 struct kernel_param dummy;
370 dummy.arg = &boolval;
371 ret = param_set_bool(val, &dummy);
373 *(bool *)kp->arg = !boolval;
376 EXPORT_SYMBOL(param_set_invbool);
378 int param_get_invbool(char *buffer, const struct kernel_param *kp)
380 return sprintf(buffer, "%c\n", (*(bool *)kp->arg) ? 'N' : 'Y');
382 EXPORT_SYMBOL(param_get_invbool);
384 const struct kernel_param_ops param_ops_invbool = {
385 .set = param_set_invbool,
386 .get = param_get_invbool,
388 EXPORT_SYMBOL(param_ops_invbool);
390 int param_set_bint(const char *val, const struct kernel_param *kp)
392 /* Match bool exactly, by re-using it. */
393 struct kernel_param boolkp = *kp;
399 ret = param_set_bool(val, &boolkp);
404 EXPORT_SYMBOL(param_set_bint);
406 const struct kernel_param_ops param_ops_bint = {
407 .flags = KERNEL_PARAM_OPS_FL_NOARG,
408 .set = param_set_bint,
409 .get = param_get_int,
411 EXPORT_SYMBOL(param_ops_bint);
413 /* We break the rule and mangle the string. */
414 static int param_array(struct module *mod,
417 unsigned int min, unsigned int max,
418 void *elem, int elemsize,
419 int (*set)(const char *, const struct kernel_param *kp),
424 struct kernel_param kp;
427 /* Get the name right for errors. */
433 /* We expect a comma-separated list of values. */
438 pr_err("%s: can only take %i arguments\n", name, max);
441 len = strcspn(val, ",");
443 /* nul-terminate and parse */
445 ((char *)val)[len] = '\0';
446 check_kparam_locked(mod);
454 } while (save == ',');
457 pr_err("%s: needs at least %i arguments\n", name, min);
463 static int param_array_set(const char *val, const struct kernel_param *kp)
465 const struct kparam_array *arr = kp->arr;
466 unsigned int temp_num;
468 return param_array(kp->mod, kp->name, val, 1, arr->max, arr->elem,
469 arr->elemsize, arr->ops->set, kp->level,
470 arr->num ?: &temp_num);
473 static int param_array_get(char *buffer, const struct kernel_param *kp)
476 const struct kparam_array *arr = kp->arr;
477 struct kernel_param p = *kp;
479 for (i = off = 0; i < (arr->num ? *arr->num : arr->max); i++) {
480 /* Replace \n with comma */
482 buffer[off - 1] = ',';
483 p.arg = arr->elem + arr->elemsize * i;
484 check_kparam_locked(p.mod);
485 ret = arr->ops->get(buffer + off, &p);
494 static void param_array_free(void *arg)
497 const struct kparam_array *arr = arg;
500 for (i = 0; i < (arr->num ? *arr->num : arr->max); i++)
501 arr->ops->free(arr->elem + arr->elemsize * i);
504 const struct kernel_param_ops param_array_ops = {
505 .set = param_array_set,
506 .get = param_array_get,
507 .free = param_array_free,
509 EXPORT_SYMBOL(param_array_ops);
511 int param_set_copystring(const char *val, const struct kernel_param *kp)
513 const struct kparam_string *kps = kp->str;
515 if (strlen(val)+1 > kps->maxlen) {
516 pr_err("%s: string doesn't fit in %u chars.\n",
517 kp->name, kps->maxlen-1);
520 strcpy(kps->string, val);
523 EXPORT_SYMBOL(param_set_copystring);
525 int param_get_string(char *buffer, const struct kernel_param *kp)
527 const struct kparam_string *kps = kp->str;
528 return scnprintf(buffer, PAGE_SIZE, "%s\n", kps->string);
530 EXPORT_SYMBOL(param_get_string);
532 const struct kernel_param_ops param_ops_string = {
533 .set = param_set_copystring,
534 .get = param_get_string,
536 EXPORT_SYMBOL(param_ops_string);
538 /* sysfs output in /sys/modules/XYZ/parameters/ */
539 #define to_module_attr(n) container_of(n, struct module_attribute, attr)
540 #define to_module_kobject(n) container_of(n, struct module_kobject, kobj)
542 struct param_attribute
544 struct module_attribute mattr;
545 const struct kernel_param *param;
548 struct module_param_attrs
551 struct attribute_group grp;
552 struct param_attribute attrs[];
556 #define to_param_attr(n) container_of(n, struct param_attribute, mattr)
558 static ssize_t param_attr_show(struct module_attribute *mattr,
559 struct module_kobject *mk, char *buf)
562 struct param_attribute *attribute = to_param_attr(mattr);
564 if (!attribute->param->ops->get)
567 kernel_param_lock(mk->mod);
568 count = attribute->param->ops->get(buf, attribute->param);
569 kernel_param_unlock(mk->mod);
573 /* sysfs always hands a nul-terminated string in buf. We rely on that. */
574 static ssize_t param_attr_store(struct module_attribute *mattr,
575 struct module_kobject *mk,
576 const char *buf, size_t len)
579 struct param_attribute *attribute = to_param_attr(mattr);
581 if (!attribute->param->ops->set)
584 kernel_param_lock(mk->mod);
585 if (param_check_unsafe(attribute->param))
586 err = attribute->param->ops->set(buf, attribute->param);
589 kernel_param_unlock(mk->mod);
596 #ifdef CONFIG_MODULES
599 #define __modinit __init
603 void kernel_param_lock(struct module *mod)
605 mutex_lock(KPARAM_MUTEX(mod));
608 void kernel_param_unlock(struct module *mod)
610 mutex_unlock(KPARAM_MUTEX(mod));
613 EXPORT_SYMBOL(kernel_param_lock);
614 EXPORT_SYMBOL(kernel_param_unlock);
617 * add_sysfs_param - add a parameter to sysfs
618 * @mk: struct module_kobject
619 * @kp: the actual parameter definition to add to sysfs
620 * @name: name of parameter
622 * Create a kobject if for a (per-module) parameter if mp NULL, and
623 * create file in sysfs. Returns an error on out of memory. Always cleans up
624 * if there's an error.
626 static __modinit int add_sysfs_param(struct module_kobject *mk,
627 const struct kernel_param *kp,
630 struct module_param_attrs *new_mp;
631 struct attribute **new_attrs;
634 /* We don't bother calling this with invisible parameters. */
638 /* First allocation. */
639 mk->mp = kzalloc(sizeof(*mk->mp), GFP_KERNEL);
642 mk->mp->grp.name = "parameters";
643 /* NULL-terminated attribute array. */
644 mk->mp->grp.attrs = kzalloc(sizeof(mk->mp->grp.attrs[0]),
646 /* Caller will cleanup via free_module_param_attrs */
647 if (!mk->mp->grp.attrs)
651 /* Enlarge allocations. */
652 new_mp = krealloc(mk->mp,
654 sizeof(mk->mp->attrs[0]) * (mk->mp->num + 1),
660 /* Extra pointer for NULL terminator */
661 new_attrs = krealloc(mk->mp->grp.attrs,
662 sizeof(mk->mp->grp.attrs[0]) * (mk->mp->num + 2),
666 mk->mp->grp.attrs = new_attrs;
668 /* Tack new one on the end. */
669 memset(&mk->mp->attrs[mk->mp->num], 0, sizeof(mk->mp->attrs[0]));
670 sysfs_attr_init(&mk->mp->attrs[mk->mp->num].mattr.attr);
671 mk->mp->attrs[mk->mp->num].param = kp;
672 mk->mp->attrs[mk->mp->num].mattr.show = param_attr_show;
673 /* Do not allow runtime DAC changes to make param writable. */
674 if ((kp->perm & (S_IWUSR | S_IWGRP | S_IWOTH)) != 0)
675 mk->mp->attrs[mk->mp->num].mattr.store = param_attr_store;
677 mk->mp->attrs[mk->mp->num].mattr.store = NULL;
678 mk->mp->attrs[mk->mp->num].mattr.attr.name = (char *)name;
679 mk->mp->attrs[mk->mp->num].mattr.attr.mode = kp->perm;
682 /* Fix up all the pointers, since krealloc can move us */
683 for (i = 0; i < mk->mp->num; i++)
684 mk->mp->grp.attrs[i] = &mk->mp->attrs[i].mattr.attr;
685 mk->mp->grp.attrs[mk->mp->num] = NULL;
689 #ifdef CONFIG_MODULES
690 static void free_module_param_attrs(struct module_kobject *mk)
693 kfree(mk->mp->grp.attrs);
699 * module_param_sysfs_setup - setup sysfs support for one module
701 * @kparam: module parameters (array)
702 * @num_params: number of module parameters
704 * Adds sysfs entries for module parameters under
705 * /sys/module/[mod->name]/parameters/
707 int module_param_sysfs_setup(struct module *mod,
708 const struct kernel_param *kparam,
709 unsigned int num_params)
714 for (i = 0; i < num_params; i++) {
715 if (kparam[i].perm == 0)
717 err = add_sysfs_param(&mod->mkobj, &kparam[i], kparam[i].name);
719 free_module_param_attrs(&mod->mkobj);
728 /* Create the param group. */
729 err = sysfs_create_group(&mod->mkobj.kobj, &mod->mkobj.mp->grp);
731 free_module_param_attrs(&mod->mkobj);
736 * module_param_sysfs_remove - remove sysfs support for one module
739 * Remove sysfs entries for module parameters and the corresponding
742 void module_param_sysfs_remove(struct module *mod)
745 sysfs_remove_group(&mod->mkobj.kobj, &mod->mkobj.mp->grp);
746 /* We are positive that no one is using any param
747 * attrs at this point. Deallocate immediately. */
748 free_module_param_attrs(&mod->mkobj);
753 void destroy_params(const struct kernel_param *params, unsigned num)
757 for (i = 0; i < num; i++)
758 if (params[i].ops->free)
759 params[i].ops->free(params[i].arg);
762 static struct module_kobject * __init locate_module_kobject(const char *name)
764 struct module_kobject *mk;
765 struct kobject *kobj;
768 kobj = kset_find_obj(module_kset, name);
770 mk = to_module_kobject(kobj);
772 mk = kzalloc(sizeof(struct module_kobject), GFP_KERNEL);
775 mk->mod = THIS_MODULE;
776 mk->kobj.kset = module_kset;
777 err = kobject_init_and_add(&mk->kobj, &module_ktype, NULL,
779 #ifdef CONFIG_MODULES
781 err = sysfs_create_file(&mk->kobj, &module_uevent.attr);
784 kobject_put(&mk->kobj);
785 pr_crit("Adding module '%s' to sysfs failed (%d), the system may be unstable.\n",
790 /* So that we hold reference in both cases. */
791 kobject_get(&mk->kobj);
797 static void __init kernel_add_sysfs_param(const char *name,
798 const struct kernel_param *kparam,
799 unsigned int name_skip)
801 struct module_kobject *mk;
804 mk = locate_module_kobject(name);
808 /* We need to remove old parameters before adding more. */
810 sysfs_remove_group(&mk->kobj, &mk->mp->grp);
812 /* These should not fail at boot. */
813 err = add_sysfs_param(mk, kparam, kparam->name + name_skip);
815 err = sysfs_create_group(&mk->kobj, &mk->mp->grp);
817 kobject_uevent(&mk->kobj, KOBJ_ADD);
818 kobject_put(&mk->kobj);
822 * param_sysfs_builtin - add sysfs parameters for built-in modules
824 * Add module_parameters to sysfs for "modules" built into the kernel.
826 * The "module" name (KBUILD_MODNAME) is stored before a dot, the
827 * "parameter" name is stored behind a dot in kernel_param->name. So,
828 * extract the "module" name for all built-in kernel_param-eters,
829 * and for all who have the same, call kernel_add_sysfs_param.
831 static void __init param_sysfs_builtin(void)
833 const struct kernel_param *kp;
834 unsigned int name_len;
835 char modname[MODULE_NAME_LEN];
837 for (kp = __start___param; kp < __stop___param; kp++) {
843 dot = strchr(kp->name, '.');
845 /* This happens for core_param() */
846 strcpy(modname, "kernel");
849 name_len = dot - kp->name + 1;
850 strlcpy(modname, kp->name, name_len);
852 kernel_add_sysfs_param(modname, kp, name_len);
856 ssize_t __modver_version_show(struct module_attribute *mattr,
857 struct module_kobject *mk, char *buf)
859 struct module_version_attribute *vattr =
860 container_of(mattr, struct module_version_attribute, mattr);
862 return scnprintf(buf, PAGE_SIZE, "%s\n", vattr->version);
865 extern const struct module_version_attribute __start___modver[];
866 extern const struct module_version_attribute __stop___modver[];
868 static void __init version_sysfs_builtin(void)
870 const struct module_version_attribute *vattr;
871 struct module_kobject *mk;
874 for (vattr = __start___modver; vattr < __stop___modver; vattr++) {
875 mk = locate_module_kobject(vattr->module_name);
877 err = sysfs_create_file(&mk->kobj, &vattr->mattr.attr);
879 kobject_uevent(&mk->kobj, KOBJ_ADD);
880 kobject_put(&mk->kobj);
885 /* module-related sysfs stuff */
887 static ssize_t module_attr_show(struct kobject *kobj,
888 struct attribute *attr,
891 struct module_attribute *attribute;
892 struct module_kobject *mk;
895 attribute = to_module_attr(attr);
896 mk = to_module_kobject(kobj);
898 if (!attribute->show)
901 ret = attribute->show(attribute, mk, buf);
906 static ssize_t module_attr_store(struct kobject *kobj,
907 struct attribute *attr,
908 const char *buf, size_t len)
910 struct module_attribute *attribute;
911 struct module_kobject *mk;
914 attribute = to_module_attr(attr);
915 mk = to_module_kobject(kobj);
917 if (!attribute->store)
920 ret = attribute->store(attribute, mk, buf, len);
925 static const struct sysfs_ops module_sysfs_ops = {
926 .show = module_attr_show,
927 .store = module_attr_store,
930 static int uevent_filter(const struct kobject *kobj)
932 const struct kobj_type *ktype = get_ktype(kobj);
934 if (ktype == &module_ktype)
939 static const struct kset_uevent_ops module_uevent_ops = {
940 .filter = uevent_filter,
943 struct kset *module_kset;
945 static void module_kobj_release(struct kobject *kobj)
947 struct module_kobject *mk = to_module_kobject(kobj);
948 complete(mk->kobj_completion);
951 const struct kobj_type module_ktype = {
952 .release = module_kobj_release,
953 .sysfs_ops = &module_sysfs_ops,
957 * param_sysfs_init - create "module" kset
959 * This must be done before the initramfs is unpacked and
960 * request_module() thus becomes possible, because otherwise the
961 * module load would fail in mod_sysfs_init.
963 static int __init param_sysfs_init(void)
965 module_kset = kset_create_and_add("module", &module_uevent_ops, NULL);
967 printk(KERN_WARNING "%s (%d): error creating kset\n",
974 subsys_initcall(param_sysfs_init);
977 * param_sysfs_builtin_init - add sysfs version and parameter
978 * attributes for built-in modules
980 static int __init param_sysfs_builtin_init(void)
985 version_sysfs_builtin();
986 param_sysfs_builtin();
990 late_initcall(param_sysfs_builtin_init);
992 #endif /* CONFIG_SYSFS */