tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Proposal, again: Disable autoload of compat_xyz modules
On Sep 30, 7:10am, Michael van Elst wrote:
} christos%astron.com@localhost (Christos Zoulas) writes:
} >In article <20190929090053.GA98%homeworld.netbsd.org@localhost>,
} > <maya%NetBSD.org@localhost> wrote:
} >>On Sat, Sep 28, 2019 at 01:29:39AM -0000, Christos Zoulas wrote:
} >>> + "compat_linux",
} >>> + "compat_linux32",
} >>
} >>As for the actual change, I'd like to see it integrated through
} >>modules.conf, not via settings of default sysctl values. I think it's
} >>bad user experience.
}
} >modules.conf contains module names and their arguments. It is a configuration
} >file for each module. There are already sysctls in the kern.module. tree all
} >related to autoloading.
}
} Everything currently in modules.conf is loaded permanently. One argument
} for adding autoload support would be that it allows to configure module
} parameters in a common place, as autoloaded modules cannot get parameters
} yet. It could also be used to configure policies (e.g. blacklists).
Uh, that's not true. If you store <module>.plist in the same
directory with the module, it will be loaded and passed to the
module to provide parameters. You can use "modload -p" to create
the file (see module(7)). Also, if you put a special flag in the
.plist the module won't be autoloaded, see this from module(9):
The directory from which the module is loaded will be searched for
a file with the same name as the module file, but with the suffix
``.plist''. If this file is found, the prop_dictionary it contains
will be loaded and passed to the module's modcmd() routine. If
this prop_dictionary contains a ``noautoload'' property which is
set to ``true'' then the system will refuse to load the module.
BTW, modules.conf isn't read by the kernel, it's read by
/etc/rc.d/modules. Putting anything in there that would have a
lasting effect (i.e. parameters for autoloaded modules) would
require quite a bit of work. Although it could be made to specify
modules not to autoload by having it use christos' kern.module.noautoload
sysctl.
}-- End of excerpt from Michael van Elst
Home |
Main Index |
Thread Index |
Old Index