tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Don't load kernel modules from the current directory

Am 03.08.11 09:23, schrieb Alan Barrett:
> On Wed, 03 Aug 2011, Marc Balmer wrote:
>> modload looks for modules first in the current working directory, if
>> not found there the system module area is searched (/stand/...).
>> [...]
>> The proposed and attached patch changes this in two ways: The module
>> loader never looks in '.' by always constructing a path pointing to
>> the system module area and the function kobj_load_vfs() ensures the
>> path starts with a '/', thus it will only work with absolute paths.
> I agree with making the kernel not search "." by default, but it would
> be nice if modload(8) had a way for users to explictly request modules
> from a non-default location.
> Perhaps change modload(8)'s "module" argument to be either a module name
> or a file name, using the presence of "/" to distinguish the two cases. 
> Then users could pass "./testing.kmod" to load a module from the current
> directory.

The test in the loader can quite easily be changed to test for '/' or
'.' as the first character, and if so load the module from there,
otherwise only look in the system module area.

I will keep that in mind, but first I wait for more feedback.

Home | Main Index | Thread Index | Old Index