Re: modules registering as sysctl handlers

viro
2004-03-03T10:43:35Z

On Wed, Mar 03, 2004 at 11:22:39AM +0200, Muli Ben-Yehuda wrote:
> > However, an owner field and standard module_get() would solve the case
> > of statically declared ctl_table.
>
> That's what I had in mind.
>
> > I don't know that there's a current user who requires it though?
>
> Yes, there are. Using the attached scriptlet on a 2.6.1 tree I had
> lying around:
>
> [root@hydra kernel]# /tmp/find-register-sysctl
> /lib/modules/2.6.1/kernel/drivers/cdrom/cdrom.ko uses register_sysctl
> /lib/modules/2.6.1/kernel/drivers/parport/parport.ko uses register_sysctl
> /lib/modules/2.6.1/kernel/net/appletalk/appletalk.ko uses register_sysctl
> /lib/modules/2.6.1/kernel/net/ipx/ipx.ko uses register_sysctl
> /lib/modules/2.6.1/kernel/net/irda/irda.ko uses register_sysctl
> /lib/modules/2.6.1/kernel/net/sctp/sctp.ko uses register_sysctl

At least parport has both module-wide and per-port sysctls. The
latter are dynamic even if module support is turned off. I seriously
suspect that other examples are similar.