Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp914745ybh; Thu, 12 Mar 2020 13:28:21 -0700 (PDT) X-Google-Smtp-Source: ADFU+vu1h/n1QKQZXLa4BEdfySr2+J6CPPPV2o4B+kEWJqVLO7RCnptGaDtCalV0EtcR17LTNRTH X-Received: by 2002:a9d:5181:: with SMTP id y1mr5811021otg.199.1584044901632; Thu, 12 Mar 2020 13:28:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584044901; cv=none; d=google.com; s=arc-20160816; b=BSpGNCeTLECu8r5lsEGBxxpY0plH2/1BZEPYyK+dpVha/bJWl+ZvgQvJrO1+s5B2t+ b3fNW5bfRPqpPB70OwHEKrIjb74kJSAD7DGUsSq9gMHaDePWR4BAh0ZHS9XHKlwO+9rC nX4yRjmWyziwAIOFoZihSrQdlPK0L+oieHMRoAAtcDQZ5Q/h/jokGH4HB3tDbnQFfQJT +GqbFgpmzEtIKLFqQLymhe8hsnXlFa05+vfV8f2n7tPXyjvYvBn6biQwY7LqCRDGiyFl 2x5+m3iwNTn/7F5hCEGYBVI2djUmBsPcRy11sKABd0lP1RFqaBdgb9n2Fs1YjKyHe8yj z0sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JBnh7/cRaa0Ey582+OS1a4iot+AM4tVH8XnivMVda2o=; b=GjGcWhzAaCpvdKyMzKMs7oxQYe90l3TR3ZatJ/4DeQVGzu4A6fWdcnrimkXmn3a50F Ear06osPg4q4J/nkGWHXflyY2nKXdIZYzfAkkD78VbJvy7HoN5gwvLI4fHoRAtaUJP2t hcBpxYK5fJOB/Yb28hd8DYQQHpikGBnJpQ+noEzlkctaoiLqdR72/ErgBFjow7K52rrC VCRrd4GABqnFQDBJCebaHTdgVaMCuBgU5bzrTrYYbvYvyvorAUMSPBR1r4ssV/Vi35Wz 7ePiZgbW/OF/gC6DC2HrPU5IPW2dExwHO9jW5K0c31b4Nvf7yyDVwPlD+eHF+HJ5gQxS 0+OA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KuleeduD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h23si3843527otk.315.2020.03.12.13.28.09; Thu, 12 Mar 2020 13:28:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KuleeduD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727154AbgCLU0R (ORCPT + 99 others); Thu, 12 Mar 2020 16:26:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:60294 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727041AbgCLU0L (ORCPT ); Thu, 12 Mar 2020 16:26:11 -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 B63D220724; Thu, 12 Mar 2020 20:26:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584044770; bh=L6THbxbpph8IpXk+VCYu9esbzAMpoBUjjQyA3jdIFbI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KuleeduDblgu+tcTTwXnhTHVDn8oSBKsjMOgWI/0GaepVS65w56rkBWreak3cEvEj NpBa98Q7/NOF1JzOwnbw7LQ+qKkBRumbjY+O6piMW1SdEkw14eEEb3nHohMfjb4rhd zPDfyvUj2U+Xc4DEJqZVe5uU87VoAg+v0UNZBW+s= 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 v2 3/4] docs: admin-guide: document the kernel.modprobe sysctl Date: Thu, 12 Mar 2020 13:25:51 -0700 Message-Id: <20200312202552.241885-4-ebiggers@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200312202552.241885-1-ebiggers@kernel.org> References: <20200312202552.241885-1-ebiggers@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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..454f3402ed321 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 "foo" to mount(), then the kernel will automatically +request the module "fs-foo.ko" 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