From: Eric Biggers <ebiggers@kernel.org>
To: Luis Chamberlain <mcgrof@kernel.org>
Cc: NeilBrown <neilb@suse.de>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Alexei Starovoitov <ast@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jeff Vander Stoep <jeffv@google.com>,
Jessica Yu <jeyu@kernel.org>, Kees Cook <keescook@chromium.org>,
NeilBrown <neilb@suse.com>
Subject: Re: [PATCH v2 3/4] docs: admin-guide: document the kernel.modprobe sysctl
Date: Fri, 13 Mar 2020 12:05:29 -0700 [thread overview]
Message-ID: <20200313190529.GB55327@gmail.com> (raw)
In-Reply-To: <20200313010727.GT11244@42.do-not-panic.com>
On Fri, Mar 13, 2020 at 01:07:27AM +0000, Luis Chamberlain wrote:
> > > +modprobe:
> > > +=========
> > > +
> > > +The path to the usermode helper for autoloading kernel modules, by
> > > +default "/sbin/modprobe". This binary is executed when the kernel
> > > +requests a module. For example, if userspace passes an unknown
> > > +filesystem type "foo" to mount(), then the kernel will automatically
> > > +request the module "fs-foo.ko" by executing this usermode helper.
> >
> > I don't think it is right to add the ".ko" there. The string "fs-foo"
> > is what is passed to the named executable, and it make well end up
> > loading "bar.ko", depending what aliases are set up.
> > I would probably write '... request the module named 'fs-foo" by executing..'
>
> And that is just because filesystems, in this case a mount call, will
> use the fs- prefix for aliases. This is tribal knowledge in the context
> above, and so someone not familiar with this won't easily grasp this.
>
> Is there an easier autoloading example other than filesystems we can use that
> doesn't require you to explain the aliasing thing?
>
> What is module autoloading? Where is this documented ? If that
> can be slightly clarified this would be even easier to understand as
> well.
>
I think we're getting too down into the weeds here. The purpose of this patch
is just to document the modprobe sysctl, not to to give a full explanation of
how module autoloading works including modaliases and everything. And this
sysctl isn't needed to enable module autoloading; it's enabled by default.
Most users already use module autoloading without ever touching this sysctl.
Let's just write instead:
For example, if userspace passes an unknown filesystem type to mount(),
then the kernel will automatically request the corresponding filesystem
module by executing this usermode helper. This usermode helper should
insert the needed module into the kernel.
If someone wants to write a new documentation file that fully explains kernel
modules (I don't see any yet), they should should certainly do so. It's more
than I set out to do, though. IMO, just documenting this sysctl is already a
nice improvement by itself.
- Eric
next prev parent reply other threads:[~2020-03-13 19:05 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-12 20:25 [PATCH v2 0/4] module autoloading fixes and cleanups Eric Biggers
2020-03-12 20:25 ` [PATCH v2 1/4] kmod: make request_module() return an error when autoloading is disabled Eric Biggers
2020-03-13 0:57 ` Luis Chamberlain
2020-03-12 20:25 ` [PATCH v2 2/4] fs/filesystems.c: downgrade user-reachable WARN_ONCE() to pr_warn_once() Eric Biggers
2020-03-12 22:06 ` NeilBrown
2020-03-13 1:00 ` Luis Chamberlain
2020-03-13 0:58 ` Luis Chamberlain
2020-03-12 20:25 ` [PATCH v2 3/4] docs: admin-guide: document the kernel.modprobe sysctl Eric Biggers
2020-03-12 22:04 ` NeilBrown
2020-03-13 1:07 ` Luis Chamberlain
2020-03-13 19:05 ` Eric Biggers [this message]
2020-03-13 23:31 ` Luis Chamberlain
2020-03-12 20:25 ` [PATCH v2 4/4] selftests: kmod: test disabling module autoloading Eric Biggers
2020-03-13 1:09 ` Luis Chamberlain
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=20200313190529.GB55327@gmail.com \
--to=ebiggers@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=ast@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jeffv@google.com \
--cc=jeyu@kernel.org \
--cc=keescook@chromium.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=neilb@suse.com \
--cc=neilb@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).