Skip to contentSkip to conversation

Module alias and device table support.

PATCH Adam J. Richter 2 participants 2 messages Feb 4, 2003 – Feb 5, 2003

lore
Share & tools
lore
#0 lore raw

Rusty Russell responded to someone else (whom Rusty didn't name, and whom I didn't immediately find in the archives):

Quoted 3 lines

"insmod foo" will *always* get foo. The only exception is when "foo" doesn't exist, in which case modprobe looks for another module which explicitly says it can serve in the place of foo.

I think perhaps we should separate the name spaces so that the
kernel never modprobes for an actual module file name. In other words, there would only be three ways in which a module would "automatically" be loaded:

(1) it exports an alias like "fs-ext3", for the level helper that request_module calls (devfs could also use these aliases),
(2) it exports a device ID table for hotplug et al (probably should not be the same name space as module "aliases" because of device ID extensibility issues argued by David Brownell),
(3) it exports a symbol needed by some other module.

This would reduce the security attacks based on getting the
kernel to load arbitrary module names.

It would also be straightfoward to add a flaag to depmod to
ask it to detect any modules that export no aliases, device ID tables or symbols (perhaps they could have flag that says "yes, I really only want to be loaded manually").

Adam J. Richter     __     ______________   575 Oroville Road
[email protected]     \ /                  Milpitas, California 95035
+1 408 309-6081         | g g d r a s i l   United States of America

"Free Software For The Rest Of Us."

#1 lore raw

In message <[email protected]> you write:

Quoted 10 lines

Rusty Russell responded to someone else (whom Rusty didn't name, and whom I didn't immediately find in the archives):

Quoted 3 lines

"insmod foo" will *always* get foo. The only exception is when "foo" doesn't exist, in which case modprobe looks for another module which explicitly says it can serve in the place of foo.

I think perhaps we should separate the name spaces so that the
kernel never modprobes for an actual module file name. In other words, there would only be three ways in which a module would "automatically" be loaded:

This sounds like a good idea to me: the current approach is very ad-hoc. I think we're headed in the right direction, for example the alias patch introduces "pci:" and "usb:" prefixes for hotplug (and if you look very hard, there's already a "symbol:" prefix, unused, in the tree).

Thanks!
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.