Let's look carefully at the module_param() macro usage in our preceding modparams1.c source file again:
module_param(mp_debug_level, int, 0660);
Notice the third parameter, the permissions (or mode): it's 0660 (which, of course, is an octal number, implying read-write access for the owner and group and no access for others). It's a bit confusing until you realize that if the permissions parameter is specified as non-zero, pseudo-file(s) get created under the sysfs filesystem, representing the kernel module parameter(s), here: /sys/module/<module-name>/parameters/:
sysfs is usually mounted under /sys. Also, by default, all pseudo-files will have the owner and group as root.
- So, for our modparams1 kernel module (assuming it's loaded into kernel memory), let's look them up:
$ ls /sys/module/modparams1/
coresize holders...