* does /proc/sys/kernel/modprobe actually do anything?
@ 2007-11-29 9:41 Robert P. J. Day
2007-11-29 10:07 ` Alexey Dobriyan
0 siblings, 1 reply; 6+ messages in thread
From: Robert P. J. Day @ 2007-11-29 9:41 UTC (permalink / raw)
To: Linux Kernel Mailing List
(i asked about this earlier on the newbies list, but after poking
around a bit more, i thought i'd ask here.)
according to Documentation/debugging-modules.txt:
The correct way of debugging module problems is something like this:
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. i even downloaded the source to
the module-init-tools package and scanned the source and ... nothing.
so what's up with that?
rday
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://crashcourse.ca
========================================================================
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: does /proc/sys/kernel/modprobe actually do anything?
2007-11-29 9:41 does /proc/sys/kernel/modprobe actually do anything? Robert P. J. Day
@ 2007-11-29 10:07 ` Alexey Dobriyan
2007-11-29 10:19 ` Robert P. J. Day
2007-11-29 12:58 ` Robert P. J. Day
0 siblings, 2 replies; 6+ messages in thread
From: Alexey Dobriyan @ 2007-11-29 10:07 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: linux-kernel
On 11/29/07, Robert P. J. Day <rpjday@crashcourse.ca> 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 .
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: does /proc/sys/kernel/modprobe actually do anything?
2007-11-29 10:07 ` Alexey Dobriyan
@ 2007-11-29 10:19 ` Robert P. J. Day
2007-11-29 12:58 ` Robert P. J. Day
1 sibling, 0 replies; 6+ messages in thread
From: Robert P. J. Day @ 2007-11-29 10:19 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: linux-kernel
On Thu, 29 Nov 2007, Alexey Dobriyan wrote:
> On 11/29/07, Robert P. J. Day <rpjday@crashcourse.ca> 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 .
can you point me to where it does that? thanks.
rday
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://crashcourse.ca
========================================================================
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: does /proc/sys/kernel/modprobe actually do anything?
2007-11-29 10:07 ` Alexey Dobriyan
2007-11-29 10:19 ` Robert P. J. Day
@ 2007-11-29 12:58 ` Robert P. J. Day
2007-11-29 17:14 ` Kay Sievers
1 sibling, 1 reply; 6+ messages in thread
From: Robert P. J. Day @ 2007-11-29 12:58 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: linux-kernel
On Thu, 29 Nov 2007, Alexey Dobriyan wrote:
> On 11/29/07, Robert P. J. Day <rpjday@crashcourse.ca> 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.
rday
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://crashcourse.ca
========================================================================
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: does /proc/sys/kernel/modprobe actually do anything?
2007-11-29 12:58 ` Robert P. J. Day
@ 2007-11-29 17:14 ` Kay Sievers
2007-11-29 17:21 ` Robert P. J. Day
0 siblings, 1 reply; 6+ messages in thread
From: Kay Sievers @ 2007-11-29 17:14 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: Alexey Dobriyan, linux-kernel
On Nov 29, 2007 1:58 PM, Robert P. J. Day <rpjday@crashcourse.ca> wrote:
> On Thu, 29 Nov 2007, Alexey Dobriyan wrote:
>
> > On 11/29/07, Robert P. J. Day <rpjday@crashcourse.ca> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: does /proc/sys/kernel/modprobe actually do anything?
2007-11-29 17:14 ` Kay Sievers
@ 2007-11-29 17:21 ` Robert P. J. Day
0 siblings, 0 replies; 6+ messages in thread
From: Robert P. J. Day @ 2007-11-29 17:21 UTC (permalink / raw)
To: Kay Sievers; +Cc: Alexey Dobriyan, linux-kernel
On Thu, 29 Nov 2007, Kay Sievers wrote:
> On Nov 29, 2007 1:58 PM, Robert P. J. Day <rpjday@crashcourse.ca> wrote:
> > On Thu, 29 Nov 2007, Alexey Dobriyan wrote:
> >
> > > On 11/29/07, Robert P. J. Day <rpjday@crashcourse.ca> 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.
i'd eventually come to a conclusion sort of like that. so that
suggests that what's in Documentation/debugging-modules.txt should
really be updated to reflect that; otherwise, other folks might trip
across it like i did and wonder why it's just not working for them.
rday
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://crashcourse.ca
========================================================================
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-11-29 17:21 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-29 9:41 does /proc/sys/kernel/modprobe actually do anything? Robert P. J. Day
2007-11-29 10:07 ` Alexey Dobriyan
2007-11-29 10:19 ` Robert P. J. Day
2007-11-29 12:58 ` Robert P. J. Day
2007-11-29 17:14 ` Kay Sievers
2007-11-29 17:21 ` Robert P. J. Day
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®