From owner-svn-src-head@freebsd.org Mon Dec 24 19:10:32 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 203C6134BF35; Mon, 24 Dec 2018 19:10:32 +0000 (UTC) (envelope-from chris@rees.space) Received: from mail37c50.megamailservers.eu (mail161c50.megamailservers.eu [91.136.10.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DDB88FF56; Mon, 24 Dec 2018 19:10:30 +0000 (UTC) (envelope-from chris@rees.space) X-Authenticated-User: bayofrum@uwclub.net Received: from pegasus.bayofrum.net (host-80-41-58-105.as13285.net [80.41.58.105]) (authenticated bits=0) by mail37c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id wBOIvCUB008265; Mon, 24 Dec 2018 18:57:14 +0000 Received: from [192.168.1.121] (POSEIDON.bayofrum.net [192.168.1.121]) by pegasus.bayofrum.net (Postfix) with ESMTPSA id 8CF3E20F12; Mon, 24 Dec 2018 18:57:10 +0000 (GMT) Subject: Re: svn commit: r342389 - head/share/man/man5 To: Konstantin Belousov CC: Chris Rees , freebsd-rc@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <9f786428-7fea-4fa4-a29e-ed91997a87fd@email.android.com> <20181224133721.GW60291@kib.kiev.ua> <20181224165023.GY60291@kib.kiev.ua> From: Chris Rees Message-ID: Date: Mon, 24 Dec 2018 18:56:40 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 MIME-Version: 1.0 In-Reply-To: <20181224165023.GY60291@kib.kiev.ua> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-GB X-bayofrum-MailScanner-Information: Please contact the ISP for more information X-bayofrum-MailScanner-ID: 8CF3E20F12.A115D X-bayofrum-MailScanner: Found to be clean X-bayofrum-MailScanner-From: chris@rees.space X-Spam-Status: No X-CTCH-RefID: str=0001.0A0B020C.5C212C0A.001F, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=POghB8iC c=1 sm=1 tr=0 a=EuuEpbt/dLJjUk3psnl2FQ==:117 a=EuuEpbt/dLJjUk3psnl2FQ==:17 a=IkcTkHD0fZMA:10 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=2ur7OfE09M0A:10 a=Y8a21bOVD5kA:10 a=ZZnuYtJkoWoA:10 a=pGLkceISAAAA:8 a=6I5d2MoRAAAA:8 a=ZB5LerlCAAAA:8 a=3-IN03I_HsmVaqBs_CAA:9 a=QEXdDO2ut3YA:10 a=IjZwj45LgO3ly-622nXo:22 a=YKPTzOroS2oaEK2QgPcx:22 X-Rspamd-Queue-Id: 3DDB88FF56 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.985,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Dec 2018 19:10:32 -0000 On 24/12/2018 16:50, Konstantin Belousov wrote: > On Mon, Dec 24, 2018 at 03:34:57PM +0000, Chris Rees wrote: >> On 24/12/2018 13:37, Konstantin Belousov wrote: >>> On Mon, Dec 24, 2018 at 01:07:54PM +0000, Chris Rees wrote: >>>> On 24/12/2018 11:23, Chris Rees wrote: >>>>> On 24 Dec 2018 11:17, Konstantin Belousov wrote: >>>>> >>>>> On Mon, Dec 24, 2018 at 10:47:48AM +0000, Chris Rees wrote: >>>>> > Author: crees (doc,ports committer) >>>>> > Date: Mon Dec 24 10:47:48 2018 >>>>> > New Revision: 342389 >>>>> > URL: https://svnweb.freebsd.org/changeset/base/342389 >>>>> > >>>>> > Log: >>>>> >   Clarify kld_list format >>>>> >   >>>>> >   PR: docs/234248 >>>>> >   Submitted by: David Fiander >>>>> >   Submitted by: Miroslav Lachman >>>>> > >>>>> > Modified: >>>>> >   head/share/man/man5/rc.conf.5 >>>>> > >>>>> > Modified: head/share/man/man5/rc.conf.5 >>>>> > >>>>> ============================================================================== >>>>> > --- head/share/man/man5/rc.conf.5 Mon Dec 24 06:14:32 2018 >>>>> (r342388) >>>>> > +++ head/share/man/man5/rc.conf.5 Mon Dec 24 10:47:48 2018 >>>>> (r342389) >>>>> > @@ -248,12 +248,14 @@ Default >>>>> >  .Pa /etc/ddb.conf . >>>>> >  .It Va kld_list >>>>> >  .Pq Vt str >>>>> > -A list of kernel modules to load right after the local >>>>> > -disks are mounted. >>>>> > +A whitespace-separated list of kernel modules to load right after >>>>> > +the local disks are mounted, without any >>>>> > +.Pa .ko >>>>> > +extension or path. >>>>> I think both extension and path are accepted if supplied. >>>>> It is the behaviour described in kldload(8). >>>>> >>>>> >>>>> That's true, but the kld rc script adds .ko, so providing the >>>>> extension will probably break, and it checks for existing modules >>>>> using the provided name as a regex, so that will also fail. >>>>> >>>>> I don't think that'd be hard to fix though, so I'll fix that and put a >>>>> patch up for review later. >>>> Having looked again, rc.subr uses kldstat -v, so the path is indeed not >>>> a problem, but the extension is-- removing any extension from _kld will >>>> ensure that it will always match correctly.  At the moment it is >>>> fragile, because it will load correctly the first time but hit an error >>>> if the user has put the extension in and the module is already loaded. >>>> >>>> @RC people, does this look acceptable (I'll need approval please)? >>>> >>>> https://www.bayofrum.net/~crees/patches/rc-kld_list-extension.diff >>> I do not quite see a point in the check for the module presence. >>> Kernel already rejects already loaded modules (by module name). >> True; this code predates the -n option to kldload.  Using that makes the >> whole checking unnecessary. >> >> How about this one? >> >> https://www.bayofrum.net/~crees/patches/rc-kld_list-extension-2.diff > It looks reasonable to me. I am not sure if we want to keep the options > for load_kld for benefit of the third-party scripts, or not. E.g. we can > silently ignore them. Yeah, my patch ignores them silently.  It has the added bonus of not needing to sweep the ports tree, with all the version issues that entails as the behaviour has slightly changed if the options are necessary at that point. > How was this tested ? [crees@pegasus]~/workspace/src/head% sudo sh # . libexec/rc/rc.subr # kldstat |grep cuse # load_kld cuse4bsd # kldstat |grep cuse 15    1 0xffffffff818c3000 40a0     cuse.ko # load_kld cuse4bsd # load_kld doesntexist kldload: can't load doesntexist: No such file or directory sh: WARNING: Unable to load kernel module doesntexist # kldunload cuse # load_kld -m nothing -e noop /boot/modules/cuse4bsd.ko # kldstat |grep cuse 15    1 0xffffffff818c3000 4c80     cuse4bsd.ko # load_kld -m nothing -e noop /boot/modules/cuse4bsd.ko # load_kld -m nothing -e noop /boot/modules/cuse4bsd.ko # load_kld -m nothing -e noop /boot/modules/cuse4bsd.ko # kldstat |grep cuse 15    1 0xffffffff818c3000 4c80     cuse4bsd.ko # It's rather a curiosity for me that cuse4bsd only loads as itself if called by path, but it doesn't happen with any other modules-- this was just to prove that full paths and extensions work correctly as intended.  My machine also boots fine. Can you think of any other behaviour I'd need to check? Chris -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.