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

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.

--apb (Alan Barrett)

Home | Main Index | Thread Index | Old Index