From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 078D0C4CECE for ; Sun, 15 Mar 2020 02:24:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D43BC205C9 for ; Sun, 15 Mar 2020 02:24:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584239083; bh=pyfoelTFUrUS8nqrG9mSLUHYjidpQeeIpDUHP53gjl8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=oV9jaLzcSfQLxrjCrPm80kFAGM2d60SEmPjvh4WzwSs5zxZYetiK9mMxCgtHlAPgt hA40CH3kCy7EIHnvaU3BGSZ5CnWSzLSMzsFNIIsbBzAmypp7DlKQJWTQTVJ9Gc4zkZ 48am+NWI641HT/JGSecdS9hEVGrWwGlXVGx7+2bU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727943AbgCOCYO (ORCPT ); Sat, 14 Mar 2020 22:24:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:39070 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727911AbgCOCYN (ORCPT ); Sat, 14 Mar 2020 22:24:13 -0400 Received: from sol.hsd1.ca.comcast.net (c-107-3-166-239.hsd1.ca.comcast.net [107.3.166.239]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9E74A208E4; Sat, 14 Mar 2020 21:36:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584221808; bh=pyfoelTFUrUS8nqrG9mSLUHYjidpQeeIpDUHP53gjl8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aA9JmKx1AmQXReCs2UQdldQBufumaqmJDrCrYtVKn6syEOSmoATH6+XhoxpvcRmXJ 0oz3ax0QyyKCptQro3j57gRu6VCvZHsOksbiwy4EP7j0ffqm8Up+Ixtjgw39Ijh0Fu AdDY9p+FDl2sWJEk82BqZUEicW1PvaGdrplaqKHQ= From: Eric Biggers To: linux-kernel@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, Alexei Starovoitov , Andrew Morton , Greg Kroah-Hartman , Jeff Vander Stoep , Jessica Yu , Kees Cook , Luis Chamberlain , NeilBrown Subject: [PATCH v3 3/5] docs: admin-guide: document the kernel.modprobe sysctl Date: Sat, 14 Mar 2020 14:34:24 -0700 Message-Id: <20200314213426.134866-4-ebiggers@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200314213426.134866-1-ebiggers@kernel.org> References: <20200314213426.134866-1-ebiggers@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org From: Eric Biggers Document the kernel.modprobe sysctl in the same place that all the other kernel.* sysctls are documented. Make sure to mention how to use this sysctl to completely disable module autoloading, and how this sysctl relates to CONFIG_STATIC_USERMODEHELPER. Cc: Alexei Starovoitov Cc: Andrew Morton Cc: Greg Kroah-Hartman Cc: Jeff Vander Stoep Cc: Jessica Yu Cc: Kees Cook Cc: Luis Chamberlain Cc: NeilBrown Signed-off-by: Eric Biggers --- Documentation/admin-guide/sysctl/kernel.rst | 25 ++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst index def074807cee9..e3c15660ee5d9 100644 --- a/Documentation/admin-guide/sysctl/kernel.rst +++ b/Documentation/admin-guide/sysctl/kernel.rst @@ -49,7 +49,7 @@ show up in /proc/sys/kernel: - kexec_load_disabled - kptr_restrict - l2cr [ PPC only ] -- modprobe ==> Documentation/debugging-modules.txt +- modprobe - modules_disabled - msg_next_id [ sysv ipc ] - msgmax @@ -444,6 +444,29 @@ l2cr: (PPC only) This flag controls the L2 cache of G3 processor boards. If 0, the cache is disabled. Enabled if nonzero. +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. + +Also see Documentation/debugging-modules.txt. modules_disabled: ================= -- 2.25.1