Re: [PATCH] drivers/net/pcmcia: use module_param() instead of MODULE_PARM()
From: Stelian Pop
Date: Wed Nov 10 2004 - 16:33:19 EST
On Wed, Nov 10, 2004 at 11:47:33AM -0800, Randy.Dunlap wrote:
> >In fact, I do think that all module parameter should be exposed in
> >/sys, and that a '0' in module_param() should really mean 0400.
> >It can be useful to know what parameters have been passed to a module,
> >and I cannot think of a single case where we want to hide this
> >information (and no, security doesn't really apply here. If you have
> >root rights than you can also look into the kernel memory and find
> >out the value by yourself).
> I don't have an argument with most of that, but I am concerned
> about how much memory each entry requires and how useful it really
> is. IOW, if I need to know the module parameters for a module,
> I can probably find that info somewhere else, like in
> /etc/modprobe.conf or a script etc., so why waste memory on it?
The problem is that the information you can get out of /etc/modprobe.conf
or some script is not necessarily consistent. Maybe the module was
hand-loaded using different parameters that the ones in the script.
This is the same issue as with the in-kernel .config. We have this
today because this way we're sure we are looking at the right one,
not an older copy which happen to be in /boot. Same thing for KKSYMOOPS.
Yes, this wastes a bit of memory (quite a lot actually for KKCONFIG
or KKSYMOOPS), but less and less people cares. And those who really
care (embedded people etc) can disable this with a config option.
If module parameters are a memory issue, maybe we should do the same
as above: put all of them into /sys unless chosen otherwise, and in
this case disable all of them, since we can go just fine without
any module parameter in /sys.
Stelian Pop <stelian@xxxxxxxxxx>
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/