Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2052821ybh; Fri, 13 Mar 2020 12:06:15 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt7UmUze6JPcQkAfIquSdVD8xuy7QEJPAd7Zt1t0Fsq0JgF6a2kJ3XrrNBhimiOHvkAnOUe X-Received: by 2002:a9d:2074:: with SMTP id n107mr2741978ota.306.1584126375302; Fri, 13 Mar 2020 12:06:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584126375; cv=none; d=google.com; s=arc-20160816; b=th2PzQqjXGbowGOpb/wNnx6n0ikfPrauB42YWYSijF/ZZbVk9WMrh8uhsKLnGSEMec JKsOVhBUI+kGvhkP667KJfPhL61mo4zCiTACOdckTElISalsqVfw7FG34O+JDEjAY+9g Ne9DIUmx2YfC2wA0MBy5wjgtXW77ZKg/CSKzaGiZtu0UIEEWdWTPsrJkCvq10Gsk36D4 AXV+XegXnJamfOyE2GbXJkSyNKmPcH/f/IMS5I5gwurcI2qMPW6Rqb6yuhiz/RB+3vIe rrxr5NwptBSW0nQJPGLsfiegOzk409bSn0yoLlrNN4occaz3RRajed60RjdEuuUuQkiR z8Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=pW5v1J8BaTdAIIDyhs/1FMttkm0TMbBO6eNI5z5Vixo=; b=YWiUMYCeFfrC7zzHbfh2c+sTQRvsvW2Rq5Ov68xwOiPmLBXkapdREz3xikrBe0I+6f iGRJhkRRmu+SmtCTf4DZDHutDoplyfvFX94PXMvIW4gNM3waKIk6FRXuWbkQmy/kLcNo QkneivoguCWpOVksbTspasUAlRM3EUKvTU4+aQ6CNEI34NFljG6foJ++Bh7HZKT8Yv+y b/WA6NZF3hFT5tII6bnhezrLTA7oWbJZ663HnLtZPiXG4xXHepSVamFKwUbUZE+BXbHM MZPxx/GYdNTk9ffbOuodWLXDNZ+Asbq7kHXFWONtOEwves+xoQ01rdPCNxdogrvaOShg 2j3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VQ4CPUlW; 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 t6si3742787otc.27.2020.03.13.12.05.58; Fri, 13 Mar 2020 12:06:15 -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=VQ4CPUlW; 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 S1726620AbgCMTFb (ORCPT + 99 others); Fri, 13 Mar 2020 15:05:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:55256 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726297AbgCMTFb (ORCPT ); Fri, 13 Mar 2020 15:05:31 -0400 Received: from gmail.com (unknown [104.132.1.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id ABF63206B7; Fri, 13 Mar 2020 19:05:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584126331; bh=vuYul+KNbe7S1RciqI4G1/q/1GISg3EqPissVTD72I8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VQ4CPUlWY3TDyXZr15FC+AB9KXttXeaQJdd7wPkBgHIQWZowL5sV2bVRW+YbNbfDZ yZZO2HFj0Y7K17wa0EzDEiGqgXcmfR8YNueYpshapexkG57KFbM3gCynW8hSzETi91 Sq1nSNEROeqnhMJFhCwWOEco8Gc3mD9JzXzkI5TY= Date: Fri, 13 Mar 2020 12:05:29 -0700 From: Eric Biggers To: Luis Chamberlain Cc: NeilBrown , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Alexei Starovoitov , Andrew Morton , Greg Kroah-Hartman , Jeff Vander Stoep , Jessica Yu , Kees Cook , NeilBrown Subject: Re: [PATCH v2 3/4] docs: admin-guide: document the kernel.modprobe sysctl Message-ID: <20200313190529.GB55327@gmail.com> References: <20200312202552.241885-1-ebiggers@kernel.org> <20200312202552.241885-4-ebiggers@kernel.org> <87lfo5telq.fsf@notabene.neil.brown.name> <20200313010727.GT11244@42.do-not-panic.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200313010727.GT11244@42.do-not-panic.com> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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