Re: does /proc/sys/kernel/modprobe actually do anything?

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

 



On Nov 29, 2007 1:58 PM, Robert P. J. Day <[email protected]> wrote:
> On Thu, 29 Nov 2007, Alexey Dobriyan wrote:
>
> > On 11/29/07, Robert P. J. Day <[email protected]> wrote:
> > > echo '#! /bin/sh' > /tmp/modprobe
> > > echo 'echo "$@" >> /tmp/modprobe.log' >> /tmp/modprobe
> > > echo 'exec /sbin/modprobe "$@"' >> /tmp/modprobe
> > > chmod a+x /tmp/modprobe
> > > echo /tmp/modprobe > /proc/sys/kernel/modprobe
> > >
> > >   i've tried that and i don't see that it does anything whatsoever.  i
> > > ran modprobe under "strace" and it doesn't appear to make any effort
> > > to check /proc/sys/kernel/modprobe.
> >
> > Kernel, not modprobe, checks /proc/sys/kernel/modprobe .
>
> actually, ignore that earlier query of mine, i've found the relevant
> code under kernel/ in sysctl.c and sysctl_check.c and kmod.c.  but
> it's still not clear why what is described in
> Documentation/debugging-modules.txt (and shown above) doesn't work, so
> i'm still open to suggestions.  thanks.

Kernel code can request a module to be loaded by calling request_module().
The /proc/sys/kernel/modprobe value is the path to the binary which the kernel
executes when this function is called. It is used by some modules, or if you
open an existing device node which has no actual driver loaded.

Most modules are loaded by device id's (modalias) of  a device.
The module is loaded by pure userspace tools and not by the kernel and
therefore /proc/sys/kernel/modprobe is not involved at all in most module
loading.

The text in Documentation/debugging-modules.txt is purely about kernel
module loading requests, and not helpful for the common module loading
case.

Kay
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux