From nobody Thu Jan 18 21:49:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TGGcZ4mtSz5753y for ; Thu, 18 Jan 2024 21:49:50 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TGGcY4cKvz4pQw for ; Thu, 18 Jan 2024 21:49:49 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20230601.gappssmtp.com header.s=20230601 header.b=vw9s5Kh0; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2a00:1450:4864:20::22c) smtp.mailfrom=wlosh@bsdimp.com Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2cddf596321so2150521fa.0 for ; Thu, 18 Jan 2024 13:49:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1705614588; x=1706219388; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=WetM1GnJ4YYPzpFkB3Ln5b8E78qUyxndtR6Zq4owRM8=; b=vw9s5Kh0jm72BszNJ1ua7TMoGV+0zriy4GCM+7tOCscRnTY+2IRkSDdoIZgNLV8a+1 bY4rIX1otyAbhKGpCfStyUelUu8m+7IZ9NRlQaNgyb6g2xtGxTg6a4c2UCwH1RsT63iA rEsJxagnee/E5SYUZ4cha/irVYmJ1qkMaVBzwoDnlnwfar0eP21DhnMPvx7Ak6Ez459d tWOXrOIYQIOYZpXmM8etFHnW8uMBUfxZ0eceehPZRWxXbuuL5ksD/b4tgSrOMMrDoXrv tPoUQci58dhdvGY8w1R4cVJ+qzxfWx1GpGyxXYjzJfTinv3HIc6YRhTisguge7wYKfP/ ujEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705614588; x=1706219388; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=WetM1GnJ4YYPzpFkB3Ln5b8E78qUyxndtR6Zq4owRM8=; b=DKqlW1/cwCTDHjmtWf1uTt+THf/w2D2A249r93ggE7hJ4VvSA8w7GSQy0awaTF79Cv YG88QjgeK2kCYZY8Ytqvo9qQH7EHkuAvJm7FllBTIbBUxgD5ie3Wfw//otaPZxB99/lp gom4R9Okuxy4J6xGqJ8pYb5hXbRoZU4E9DgswazowGk/E3Ga14U50bi5W6XFGU/dbgdO AoYe9f40Lzce4fvuxO5gDVfbpiFLRY4xqvHW1rNUNkCWn8CcGD2VnFyMCe+qhLVs0Mky ODbhJ0UQF/aT3EIvd+LS6tviPCGPyg9mZ2s5S5IrTaO7gl6DIun24/pjsiFXphEDtfbd RXsA== X-Gm-Message-State: AOJu0Yy79vFRYJ86yX/uPllMuPKhTCMQb22G632zVdlttVpnS+0MynD5 wPan7LgKIRQ6efqbFudb38pBzSrlU/ROlXArM+BE7jiv7PqYAMZi9AWAK6b8I4JT40oN+5yXOhH UFY9J6/AI3si9j5xDqVtbjQDy1Uj/cY6M6Lsd5A== X-Google-Smtp-Source: AGHT+IHhtMEEeguXdL8QkcCx7qijYnpQJHDVu3c5S6JCRbhI76AFryicAWGtWjRJP4Wowx5oOqyoNRcT4bJgn4Cy40M= X-Received: by 2002:a05:651c:1991:b0:2cc:f163:fb6a with SMTP id bx17-20020a05651c199100b002ccf163fb6amr1171103ljb.53.1705614587724; Thu, 18 Jan 2024 13:49:47 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202302251737.31PHb2R8072300@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Thu, 18 Jan 2024 14:49:36 -0700 Message-ID: Subject: Re: git: 773c13c686e4 - main - kldxref: skip .pkgsave files To: John Baldwin Cc: Warner Losh , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000a01678060f3f577c" X-Spamd-Bar: -- X-Spamd-Result: default: False [-3.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20230601.gappssmtp.com:s=20230601]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MISSING_XM_UA(0.00)[]; R_SPF_NA(0.00)[no SPF record]; DMARC_NA(0.00)[bsdimp.com]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::22c:from]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20230601.gappssmtp.com:+] X-Rspamd-Queue-Id: 4TGGcY4cKvz4pQw --000000000000a01678060f3f577c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Jan 18, 2024 at 2:47=E2=80=AFPM Warner Losh wrote: > Doh! This is what I have hanging around > > diff --git a/usr.sbin/kldxref/kldxref.c b/usr.sbin/kldxref/kldxref.c > index 1694f069564b..25bfab7129e1 100644 > --- a/usr.sbin/kldxref/kldxref.c > +++ b/usr.sbin/kldxref/kldxref.c > @@ -842,10 +842,10 @@ main(int argc, char *argv[]) > continue; > /* > * Skip files that generate errors like .debug, .symbol > and .pkgsave > - * by generally skipping all files with 2 dots. > + * by generally skipping all files not ending with ".ko". > */ > - dot =3D strchr(p->fts_name, '.'); > - if (dot && strchr(dot + 1, '.') !=3D NULL) > + dot =3D strrchr(p->fts_name, '.'); > + if (dot =3D=3D NULL || strcmp(dot, ".ko") !=3D 0) > continue; > read_kld(p->fts_path, p->fts_name); > } > > See anything obviously wrong with it before I make it into a phab? > > Sorry for the delay... > https://reviews.freebsd.org/D43507 Warner > Warner > > On Thu, Jan 18, 2024 at 2:35=E2=80=AFPM John Baldwin wr= ote: > >> On 12/6/23 5:35 PM, Warner Losh wrote: >> > On Wed, Dec 6, 2023, 2:53 PM John Baldwin wrote: >> > >> >> On 12/6/23 1:41 PM, Warner Losh wrote: >> >>> Hey John, >> >>> >> >>> On Wed, Dec 6, 2023 at 2:13=E2=80=AFPM John Baldwin wrote: >> >>> >> >>>> On 12/6/23 1:02 PM, Warner Losh wrote: >> >>>>> On Wed, Dec 6, 2023, 1:04 PM John Baldwin wrote: >> >>>>> >> >>>>>> On 2/25/23 9:37 AM, Warner Losh wrote: >> >>>>>>> The branch main has been updated by imp: >> >>>>>>> >> >>>>>>> URL: >> >>>>>> >> >>>> >> >> >> https://cgit.FreeBSD.org/src/commit/?id=3D773c13c686e4b6ae9dbbc150b342b8= 2c3f47d73a >> >>>>>>> >> >>>>>>> commit 773c13c686e4b6ae9dbbc150b342b82c3f47d73a >> >>>>>>> Author: Mina Gali=C4=87 >> >>>>>>> AuthorDate: 2023-02-25 17:31:58 +0000 >> >>>>>>> Commit: Warner Losh >> >>>>>>> CommitDate: 2023-02-25 17:35:43 +0000 >> >>>>>>> >> >>>>>>> kldxref: skip .pkgsave files >> >>>>>>> >> >>>>>>> This should help people transitioning from traditional >> setups >> >> to >> >>>>>> pkgbase >> >>>>>>> experience a lot less friction. >> >>>>>>> >> >>>>>>> We do this by skipping all files containing two dots. >> >>>>>>> >> >>>>>>> Reviewed by: imp >> >>>>>>> Pull Request: >> https://github.com/freebsd/freebsd-src/pull/661 >> >>>>>>> Differential Revision: https://reviews.freebsd.org/D2795= 9 >> >>>>>> >> >>>>>> This restriction is too broad and omits all of the modern wifi >> >> firmware >> >>>>>> klds from linker.hints, e.g. >> >>>>>> >> >>>>>> /boot/kernel/iwlwifi-3160-17.ucode.ko >> >>>>>> /boot/kernel/iwlwifi-3168-29.ucode.ko >> >>>>>> /boot/kernel/iwlwifi-7260-17.ucode.ko >> >>>>>> /boot/kernel/iwlwifi-7265-17.ucode.ko >> >>>>>> /boot/kernel/iwlwifi-7265D-29.ucode.ko >> >>>>>> /boot/kernel/iwlwifi-8000C-36.ucode.ko >> >>>>>> /boot/kernel/iwlwifi-8265-36.ucode.ko >> >>>>>> /boot/kernel/iwlwifi-9000-pu-b0-jf-b0-46.ucode.ko >> >>>>>> /boot/kernel/iwlwifi-9260-th-b0-jf-b0-46.ucode.ko >> >>>>>> /boot/kernel/iwlwifi-Qu-b0-hr-b0-77.ucode.ko >> >>>>>> /boot/kernel/iwlwifi-Qu-b0-jf-b0-77.ucode.ko >> >>>>>> /boot/kernel/iwlwifi-Qu-c0-hr-b0-77.ucode.ko >> >>>>>> /boot/kernel/iwlwifi-Qu-c0-jf-b0-77.ucode.ko >> >>>>>> /boot/kernel/iwlwifi-QuZ-a0-hr-b0-77.ucode.ko >> >>>>>> /boot/kernel/iwlwifi-QuZ-a0-jf-b0-77.ucode.ko >> >>>>>> /boot/kernel/iwlwifi-cc-a0-77.ucode.ko >> >>>>>> /boot/kernel/iwlwifi-so-a0-gf-a0-83.ucode.ko >> >>>>>> /boot/kernel/iwlwifi-so-a0-gf-a0.pnvm.ko >> >>>>>> /boot/kernel/iwlwifi-so-a0-gf4-a0-83.ucode.ko >> >>>>>> /boot/kernel/iwlwifi-so-a0-gf4-a0.pnvm.ko >> >>>>>> /boot/kernel/iwlwifi-so-a0-hr-b0-81.ucode.ko >> >>>>>> /boot/kernel/iwlwifi-so-a0-jf-b0-77.ucode.ko >> >>>>>> /boot/kernel/iwlwifi-ty-a0-gf-a0-83.ucode.ko >> >>>>>> /boot/kernel/iwlwifi-ty-a0-gf-a0.pnvm.ko >> >>>>>> /boot/kernel/rtw8723d_fw.bin.ko >> >>>>>> /boot/kernel/rtw8821c_fw.bin.ko >> >>>>>> /boot/kernel/rtw8822b_fw.bin.ko >> >>>>>> /boot/kernel/rtw8822c_fw.bin.ko >> >>>>>> /boot/kernel/rtw8822c_wow_fw.bin.ko >> >>>>>> >> >>>>>> all match this pattern and are skipped. >> >>>>>> >> >>>>>> I'm busy rewriting a bunch of kldxref to be a cross tool using >> libelf, >> >>>>>> but I think here you want to probably revert this and just add >> pkgsave >> >>>>>> to the list of "known bad" suffixes. >> >>>>>> >> >>>>> >> >>>>> Sure. Any reason to not just require .ko? Or do we have to index t= he >> >>>> kernel >> >>>>> too? >> >>>> >> >>>> We do index the kernel as well, yes. However, we could probably ge= t >> by >> >>>> with "kernel" and ends in ".ko" as a valid set of files. This woul= d >> >> also >> >>>> avoid bogusly warning about linker.hints not being a valid ELF file >> on >> >>>> re-runs if you use -v. >> >>>> >> >>> >> >>> Yea, that sounds good. I'll code it up and add you to the review. >> >>> >> >>> But why does it matter for these? Firmware is usually loaded by >> filename >> >>> and need not be elf... or are these wrapped in elf sections... >> >>> >> >>> I haven't noticed it breaking my linuxkpi wifi driver that have >> >> autoloaded >> >>> firmware... >> >> >> >> Hmm, afaik firmwares are loaded by "module name" where a firmware .ko >> >> contains >> >> one or more of the firmware modules. We happen today to generally on= ly >> >> store one module in a single .ko (and with the same name), and in tha= t >> case >> >> kern_linker.c may fallback to just trying to load "foo".ko if it >> doesn't >> >> find >> >> an entry in linker.hints, but if that is why it is working that is >> >> certainly >> >> by happy accident. >> >> >> >> I only found this by comparing klxref output btw on a stale i386 VM >> between >> >> the native kldxref in the VM (before this change) and my cross-arch >> version >> >> of kldxref. >> >> >> > >> > Ok. That all makes sense. I'll update my working tree tomorrow with th= e >> > revert and the replacement. Since it "works" today, I'll push the reve= rt >> > and the fix at the same time unless the review takes too long. >> >> Ping, do you still have this fix in your pending tree? I noticed it is >> still there when doing MFC's of the libelf kldxref changes today. >> >> -- >> John Baldwin >> >> --000000000000a01678060f3f577c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Jan 18, 2024 at 2:47=E2=80=AF= PM Warner Losh <imp@bsdimp.com>= wrote:
Doh! This is what I have hanging around

diff --= git a/usr.sbin/kldxref/kldxref.c b/usr.sbin/kldxref/kldxref.c
index 1694= f069564b..25bfab7129e1 100644
--- a/usr.sbin/kldxref/kldxref.c
+++ b/= usr.sbin/kldxref/kldxref.c
@@ -842,10 +842,10 @@ main(int argc, char *ar= gv[])
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 continue;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 /*
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0* Skip files that generate errors like .debug, .symbol and .pkgsave<= br>- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* by generally skipping all f= iles with 2 dots.
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* by generally ski= pping all files not ending with ".ko".
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*/
- =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 dot =3D strchr(p->fts_name, '.');
- =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 if (dot && strchr(dot + 1, '.') !=3D N= ULL)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 dot =3D strrchr(p->fts_name, '= .');
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (dot =3D=3D NULL || strcmp(dot= , ".ko") !=3D 0)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 continue;
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 read_kld(p->fts_path, p->fts_name)= ;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 }

See anythin= g obviously wrong with it before I make it into a phab?

Sorry for the delay...


Warner=C2=A0
Warner

On Thu, Jan 18, 2024 at 2:35=E2=80=AFPM John Baldwin <jhb@freebsd.org> wrote:
On 12/6/23 5:35 PM, Warn= er Losh wrote:
> On Wed, Dec 6, 2023, 2:53 PM John Baldwin <jhb@freebsd.org> wrote:
>
>> On 12/6/23 1:41 PM, Warner Losh wrote:
>>> Hey John,
>>>
>>> On Wed, Dec 6, 2023 at 2:13=E2=80=AFPM John Baldwin <jhb@freebsd.org> wrot= e:
>>>
>>>> On 12/6/23 1:02 PM, Warner Losh wrote:
>>>>> On Wed, Dec 6, 2023, 1:04 PM John Baldwin <jhb@freebsd.org> wrote= :
>>>>>
>>>>>> On 2/25/23 9:37 AM, Warner Losh wrote:
>>>>>>> The branch main has been updated by imp:
>>>>>>>
>>>>>>> URL:
>>>>>>
>>>>
>> https://c= git.FreeBSD.org/src/commit/?id=3D773c13c686e4b6ae9dbbc150b342b82c3f47d73a
>>>>>>>
>>>>>>> commit 773c13c686e4b6ae9dbbc150b342b82c3f47d73= a
>>>>>>> Author:=C2=A0 =C2=A0 =C2=A0Mina Gali=C4=87 <= ;
freebsd@igalic.co>
>>>>>>> AuthorDate: 2023-02-25 17:31:58 +0000
>>>>>>> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp= @FreeBSD.org>
>>>>>>> CommitDate: 2023-02-25 17:35:43 +0000
>>>>>>>
>>>>>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0kldxref: skip= .pkgsave files
>>>>>>>
>>>>>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0This should h= elp people transitioning from traditional setups
>> to
>>>>>> pkgbase
>>>>>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0experience a = lot less friction.
>>>>>>>
>>>>>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0We do this by= skipping all files containing two dots.
>>>>>>>
>>>>>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Reviewed by: = imp
>>>>>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Pull Request:=
https://github.com/freebsd/freebsd-src/pull/661<= br> >>>>>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Differential = Revision: https://reviews.freebsd.org/D27959
>>>>>>
>>>>>> This restriction is too broad and omits all of the= modern wifi
>> firmware
>>>>>> klds from linker.hints, e.g.
>>>>>>
>>>>>> /boot/kernel/iwlwifi-3160-17.ucode.ko
>>>>>> /boot/kernel/iwlwifi-3168-29.ucode.ko
>>>>>> /boot/kernel/iwlwifi-7260-17.ucode.ko
>>>>>> /boot/kernel/iwlwifi-7265-17.ucode.ko
>>>>>> /boot/kernel/iwlwifi-7265D-29.ucode.ko
>>>>>> /boot/kernel/iwlwifi-8000C-36.ucode.ko
>>>>>> /boot/kernel/iwlwifi-8265-36.ucode.ko
>>>>>> /boot/kernel/iwlwifi-9000-pu-b0-jf-b0-46.ucode.ko<= br> >>>>>> /boot/kernel/iwlwifi-9260-th-b0-jf-b0-46.ucode.ko<= br> >>>>>> /boot/kernel/iwlwifi-Qu-b0-hr-b0-77.ucode.ko
>>>>>> /boot/kernel/iwlwifi-Qu-b0-jf-b0-77.ucode.ko
>>>>>> /boot/kernel/iwlwifi-Qu-c0-hr-b0-77.ucode.ko
>>>>>> /boot/kernel/iwlwifi-Qu-c0-jf-b0-77.ucode.ko
>>>>>> /boot/kernel/iwlwifi-QuZ-a0-hr-b0-77.ucode.ko
>>>>>> /boot/kernel/iwlwifi-QuZ-a0-jf-b0-77.ucode.ko
>>>>>> /boot/kernel/iwlwifi-cc-a0-77.ucode.ko
>>>>>> /boot/kernel/iwlwifi-so-a0-gf-a0-83.ucode.ko
>>>>>> /boot/kernel/iwlwifi-so-a0-gf-a0.pnvm.ko
>>>>>> /boot/kernel/iwlwifi-so-a0-gf4-a0-83.ucode.ko
>>>>>> /boot/kernel/iwlwifi-so-a0-gf4-a0.pnvm.ko
>>>>>> /boot/kernel/iwlwifi-so-a0-hr-b0-81.ucode.ko
>>>>>> /boot/kernel/iwlwifi-so-a0-jf-b0-77.ucode.ko
>>>>>> /boot/kernel/iwlwifi-ty-a0-gf-a0-83.ucode.ko
>>>>>> /boot/kernel/iwlwifi-ty-a0-gf-a0.pnvm.ko
>>>>>> /boot/kernel/rtw8723d_fw.bin.ko
>>>>>> /boot/kernel/rtw8821c_fw.bin.ko
>>>>>> /boot/kernel/rtw8822b_fw.bin.ko
>>>>>> /boot/kernel/rtw8822c_fw.bin.ko
>>>>>> /boot/kernel/rtw8822c_wow_fw.bin.ko
>>>>>>
>>>>>> all match this pattern and are skipped.
>>>>>>
>>>>>> I'm busy rewriting a bunch of kldxref to be a = cross tool using libelf,
>>>>>> but I think here you want to probably revert this = and just add pkgsave
>>>>>> to the list of "known bad" suffixes.
>>>>>>
>>>>>
>>>>> Sure. Any reason to not just require .ko? Or do we hav= e to index the
>>>> kernel
>>>>> too?
>>>>
>>>> We do index the kernel as well, yes.=C2=A0 However, we cou= ld probably get by
>>>> with "kernel" and ends in ".ko" as a v= alid set of files.=C2=A0 This would
>> also
>>>> avoid bogusly warning about linker.hints not being a valid= ELF file on
>>>> re-runs if you use -v.
>>>>
>>>
>>> Yea, that sounds good. I'll code it up and add you to the = review.
>>>
>>> But why does it matter for these? Firmware is usually loaded b= y filename
>>> and need not be elf... or are these wrapped in elf sections...=
>>>
>>> I haven't noticed it breaking my linuxkpi wifi driver that= have
>> autoloaded
>>> firmware...
>>
>> Hmm, afaik firmwares are loaded by "module name" where a= firmware .ko
>> contains
>> one or more of the firmware modules.=C2=A0 We happen today to gene= rally only
>> store one module in a single .ko (and with the same name), and in = that case
>> kern_linker.c may fallback to just trying to load "foo".= ko if it doesn't
>> find
>> an entry in linker.hints, but if that is why it is working that is=
>> certainly
>> by happy accident.
>>
>> I only found this by comparing klxref output btw on a stale i386 V= M between
>> the native kldxref in the VM (before this change) and my cross-arc= h version
>> of kldxref.
>>
>
> Ok. That all makes sense. I'll update my working tree tomorrow wit= h the
> revert and the replacement. Since it "works" today, I'll= push the revert
> and the fix at the same time unless the review takes too long.

Ping, do you still have this fix in your pending tree?=C2=A0 I noticed it i= s
still there when doing MFC's of the libelf kldxref changes today.

--
John Baldwin

--000000000000a01678060f3f577c--