From: "Kay Sievers" <kay.sievers@vrfy.org>
To: "Robert P. J. Day" <rpjday@crashcourse.ca>
Cc: "Alexey Dobriyan" <adobriyan@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: does /proc/sys/kernel/modprobe actually do anything?
Date: Thu, 29 Nov 2007 18:14:02 +0100 [thread overview]
Message-ID: <3ae72650711290914q162e81a8l9fbecf1a1196ba79@mail.gmail.com> (raw)
In-Reply-To: <alpine.LFD.0.9999.0711290756090.29674@localhost.localdomain>
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
next prev parent reply other threads:[~2007-11-29 17:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-29 9:41 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 [this message]
2007-11-29 17:21 ` Robert P. J. Day
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3ae72650711290914q162e81a8l9fbecf1a1196ba79@mail.gmail.com \
--to=kay.sievers@vrfy.org \
--cc=adobriyan@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rpjday@crashcourse.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®