From owner-freebsd-rc@freebsd.org Fri Apr 5 18:42:44 2019 Return-Path: Delivered-To: freebsd-rc@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 277A1155699D for ; Fri, 5 Apr 2019 18:42:44 +0000 (UTC) (envelope-from crees@bayofrum.net) Received: from mail33c50.megamailservers.eu (mail163c50.megamailservers.eu [91.136.10.173]) (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 79FC86ED97 for ; Fri, 5 Apr 2019 18:42:41 +0000 (UTC) (envelope-from crees@bayofrum.net) X-Authenticated-User: bayofrum@uwclub.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1554489441; bh=RLihil8OcDTNckSw+9reczbuK0eVAXppF/FRTIqCHa0=; h=Date:In-Reply-To:References:Subject:To:CC:From:From; b=oLPpdxQhNTZODUHdiW252yExOF3kAkGyf0waTIs1i5APMxuWWROlmSstQr00PexTY tra0ShVsW7lROUeOCgWJSpJVPNGbw9fMNzeUZt/W/O6ZdRvzLLIqxpmmfGM1KovzTd smTkJMmCkkxuF1JBm0hIJ5oGugylid0ftgKNGBZs= Feedback-ID: crees@bayofrum. Received: from pegasus.bayofrum.net (81-178-238-70.dsl.pipex.com [81.178.238.70]) (authenticated bits=0) by mail33c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x35IbJjK016990; Fri, 5 Apr 2019 18:37:21 +0000 Received: from R.bayofrum.net (R.bayofrum.net [192.168.1.129]) by pegasus.bayofrum.net (Postfix) with ESMTPSA id 5F9BECEEF; Fri, 5 Apr 2019 19:37:11 +0100 (BST) Date: Fri, 05 Apr 2019 19:37:16 +0100 User-Agent: K-9 Mail for Android In-Reply-To: <20181225074145.GA60291@kib.kiev.ua> References: <9f786428-7fea-4fa4-a29e-ed91997a87fd@email.android.com> <20181224133721.GW60291@kib.kiev.ua> <20181224165023.GY60291@kib.kiev.ua> <20181225074145.GA60291@kib.kiev.ua> MIME-Version: 1.0 Subject: Re: svn commit: r342389 - head/share/man/man5 To: Konstantin Belousov , Chris Rees CC: freebsd-rc@freebsd.org From: Chris Rees Message-ID: <120E994C-79DE-46E2-AAB7-649E4929AFE9@bayofrum.net> X-bayofrum-MailScanner-Information: Please contact the ISP for more information X-bayofrum-MailScanner-ID: 5F9BECEEF.AEBF8 X-bayofrum-MailScanner: Found to be clean X-bayofrum-MailScanner-From: crees@bayofrum.net X-Spam-Status: No X-CTCH-RefID: str=0001.0A0B020C.5CA7A061.0026, 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=eOw9ckh1 c=1 sm=1 tr=0 a=i0HMBnJGy7D3/NFKO8d8XA==:117 a=i0HMBnJGy7D3/NFKO8d8XA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=oexKYjalfGEA:10 a=ZB5LerlCAAAA:8 a=pGLkceISAAAA:8 a=6I5d2MoRAAAA:8 a=Zh0ublit3hlReUIAKg4A:9 a=IHEb_aTBH0utfAYF:21 a=km0VK683llT37aLa:21 a=QEXdDO2ut3YA:10 a=P0S6o3SJAAAA:8 a=UCBx1uGqF50gFMD534wA:9 a=d3WRF4F4032qF5a9:21 a=tP_O5BDVVbRJCbk7:21 a=DqoLPUHcV2BExSCQ:21 a=_W_S_7VecoQA:10 a=-FEs8UIgK8oA:10 a=NWVoK91CQyQA:10 a=YKPTzOroS2oaEK2QgPcx:22 a=IjZwj45LgO3ly-622nXo:22 a=WH_0ghv6r2uJcVQkXlWi:22 X-Rspamd-Queue-Id: 79FC86ED97 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=fail (rsa verify failed) header.d=megamailservers.eu header.s=maildub header.b=oLPpdxQh X-Spamd-Result: default: False [-1.54 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_DKIM_REJECT(1.00)[megamailservers.eu:s=maildub]; URI_COUNT_ODD(1.00)[9]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[megamailservers.eu:-]; MX_GOOD(-0.01)[www.bayofrum.net]; NEURAL_HAM_SHORT(-0.90)[-0.903,0]; FREEMAIL_TO(0.00)[gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[70.238.178.81.zen.spamhaus.org : 127.0.0.11]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; ASN(0.00)[asn:9115, ipnet:91.136.0.0/17, country:GB]; RCVD_TLS_LAST(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[173.10.136.91.list.dnswl.org : 127.0.5.1]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.97)[-0.970,0]; IP_SCORE(-0.46)[ipnet: 91.136.0.0/17(-1.23), asn: 9115(-0.99), country: GB(-0.09)]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-0.997,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[bayofrum.net]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_NA(0.00)[] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Apr 2019 18:42:44 -0000 Hello RC people, Konstantin has kindly reviewed the patch to fix load_kld behaviour, but wou= ld prefer that someone more familiar with RC give me approval to commit. I= haven't stripped any of the replies, so the conversation should be fairly = easy to follow, though I'm happy to link to archives if anyone missed it. Please would someone review and approve? https://www.bayofrum.net/~crees/patches/rc-kld_list-extension-2.diff Thanks! Chris On 25 December 2018 07:41:45 GMT, Konstantin Belousov = wrote: >On Mon, Dec 24, 2018 at 06:56:40PM +0000, Chris Rees wrote: >> 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: >> >>>>> >=C2=A0=C2=A0 Clarify kld_list format >> >>>>> >=C2=A0=C2=A0 >> >>>>> >=C2=A0=C2=A0 PR: docs/234248 >> >>>>> >=C2=A0=C2=A0 Submitted by: David Fiander >> >>>>> >=C2=A0=C2=A0 Submitted by: Miroslav Lachman >> >>>>> > >> >>>>> > Modified: >> >>>>> >=C2=A0=C2=A0 head/share/man/man5/rc.conf.5 >> >>>>> > >> >>>>> > Modified: head/share/man/man5/rc.conf.5 >> >>>>> > >> >>>>>=20=20=20=20 >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> >>>>> > --- 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 >> >>>>> >=C2=A0 .Pa /etc/ddb.conf . >> >>>>> >=C2=A0 .It Va kld_list >> >>>>> >=C2=A0 .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.=C2=A0 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.=C2=A0 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. >>=20 >> Yeah, my patch ignores them silently.=C2=A0 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. >>=20 >> > 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=C2=A0=C2=A0=C2=A0 1 0xffffffff818c3000 40a0=C2=A0=C2=A0=C2=A0=C2=A0 c= use.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=C2=A0=C2=A0=C2=A0 1 0xffffffff818c3000 4c80=C2=A0=C2=A0=C2=A0=C2=A0 c= use4bsd.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=C2=A0=C2=A0=C2=A0 1 0xffffffff818c3000 4c80=C2=A0=C2=A0=C2=A0=C2=A0 c= use4bsd.ko >I suppose escapes are something that your mail agent inserted and not >the >actual system output. > >The script looks fine to me, but I am not the right person to stamp the >approval on the rc changes. > >> # >>=20 >> 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.=C2=A0 My machine also boots fine. >>=20 >> Can you think of any other behaviour I'd need to check? >No, for me it looks good enough. > >--=20 >This message has been scanned for viruses and >dangerous content by MailScanner, and is >believed to be clean. --=20 Sent from my Android device with K-9 Mail. Please excuse my brevity. --=20 This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.