Commit 52338dfb authored by Eric Biggers's avatar Eric Biggers Committed by Jonathan Corbet

docs: admin-guide: merge sections for the kernel.modprobe sysctl

Documentation for the kernel.modprobe sysctl was added both by
commit 0317c537 ("docs: merge debugging-modules.txt into
sysctl/kernel.rst") and by commit 6e715825 ("docs: admin-guide:
document the kernel.modprobe sysctl"), resulting in the same sysctl
being documented in two places.  Merge these into one place.
Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
Reviewed-by: default avatarStephen Kitt <steve@sk2.org>
Link: https://lore.kernel.org/r/20200414172430.230293-1-ebiggers@kernel.orgSigned-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent 404e603f
...@@ -390,9 +390,17 @@ When ``kptr_restrict`` is set to 2, kernel pointers printed using ...@@ -390,9 +390,17 @@ When ``kptr_restrict`` is set to 2, kernel pointers printed using
modprobe modprobe
======== ========
This gives the full path of the modprobe command which the kernel will The full path to the usermode helper for autoloading kernel modules,
use to load modules. This can be used to debug module loading by default "/sbin/modprobe". This binary is executed when the kernel
requests:: requests a module. 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.
This sysctl only affects module autoloading. It has no effect on the
ability to explicitly insert modules.
This sysctl can be used to debug module loading requests::
echo '#! /bin/sh' > /tmp/modprobe echo '#! /bin/sh' > /tmp/modprobe
echo 'echo "$@" >> /tmp/modprobe.log' >> /tmp/modprobe echo 'echo "$@" >> /tmp/modprobe.log' >> /tmp/modprobe
...@@ -400,10 +408,15 @@ requests:: ...@@ -400,10 +408,15 @@ requests::
chmod a+x /tmp/modprobe chmod a+x /tmp/modprobe
echo /tmp/modprobe > /proc/sys/kernel/modprobe echo /tmp/modprobe > /proc/sys/kernel/modprobe
This only applies when the *kernel* is requesting that the module be Alternatively, if this sysctl is set to the empty string, then module
loaded; it won't have any effect if the module is being loaded autoloading is completely disabled. The kernel will not try to
explicitly using ``modprobe`` from userspace. execute a usermode helper at all, nor will it call the
kernel_module_request LSM hook.
If CONFIG_STATIC_USERMODEHELPER=y is set in the kernel configuration,
then the configured static usermode helper overrides this sysctl,
except that the empty string is still accepted to completely disable
module autoloading as described above.
modules_disabled modules_disabled
================ ================
...@@ -446,28 +459,6 @@ Notes: ...@@ -446,28 +459,6 @@ Notes:
successful IPC object allocation. If an IPC object allocation syscall successful IPC object allocation. If an IPC object allocation syscall
fails, it is undefined if the value remains unmodified or is reset to -1. fails, it is undefined if the value remains unmodified or is reset to -1.
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 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.
This sysctl only affects module autoloading. It has no effect on the
ability to explicitly insert modules.
If this sysctl is set to the empty string, then module autoloading is
completely disabled. The kernel will not try to execute a usermode
helper at all, nor will it call the kernel_module_request LSM hook.
If CONFIG_STATIC_USERMODEHELPER=y is set in the kernel configuration,
then the configured static usermode helper overrides this sysctl,
except that the empty string is still accepted to completely disable
module autoloading as described above.
nmi_watchdog nmi_watchdog
============ ============
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment