[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Enabling built-in modules earlier in init
On Tue Jun 15 2010 at 17:10:55 -0700, Paul Goyette wrote:
> Currently, built-in kernel modules are not enabled until very late in
> the system initialization process, right after we create process #1 for
> init(8). (As an exception to this, secmodel modules are enabled much
> Unfortunately, this means that built-in modules are not available for
> use during much of the initialization process, and in particular they
> are not available during auto-configuration. This means that my recent
> changes to convert PCIVERBOSE, etc. into kernel modules does not work
> when the modules are built-in to the kernel!
> I would like to enable the built-in modules much earlier, at least early
> enough to have them available during auto-configuration. The attached
> patch accomplishes this. I have briefly tested the patch, and it seems
> not to have any unwanted side-effects, but I would appreciate feedback
> from others who may be more familiar with the init sequence.
> An alternative, but less desirable approach, would be to create a new
> class of modules for PCIVERBOSE and friends, and call module_class_int()
> early on to enable only these few modules.
Actually reading the first email in the thread also ...
I have to admit I haven't been following your work too closely, but
builtin modules are initialized either when all of them are initialized
per class or when their initialization is explicitly requested. So if
whatever uses PCIVERBOSE requests the load of the PCIVERBOSE module,
it should be initialized and you should be fine (see module_do_load()).
The only "but" is that explicit loads must be accompanied by
MODCTL_LOAD_FORCE. I wrote it that way because of the security use case:
if you disable a builtin module due to a security hole, you don't want
it to get autoloaded later. For file system modules you can always use
rm, but for builtins you don't have that luxury. So if that is actually
what you're chocking on, I suggest adding some flag to determine if the
module has ever been loaded and ignore the need for -F if it hasn't.
Main Index |
Thread Index |