From nobody Wed Dec 6 21:41:24 2023 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 4SlrSy0gpCz532h2 for ; Wed, 6 Dec 2023 21:41:38 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) (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 4SlrSx6RQ2z3WfN for ; Wed, 6 Dec 2023 21:41:37 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40c09fcfa9fso3203925e9.2 for ; Wed, 06 Dec 2023 13:41:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1701898896; x=1702503696; 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=3gJeFonGvMYNeKzsV6Oy/XnXlI6wbESGNu0OauOKf+Y=; b=G2ZE5hr5Jxb9D+OozrcTsWPy09lZ8KdtBNLwoHm/x+ztx7yL5mYTcI/U6TIdP7DKQx skuoEhkZLwFahcCJVCR2071XnieT+Hjy/zb4j1zPwn4mf/XvYlbEnPW6ISdg0+zkfwft 6i/fGSgA5AGFyQyFBhufO+v+9w8Pg6jv1Z1nYkEI/xvJz/27aFvoCHGupdNF4E/nfWYE MYE4SN2GW+/ZpQUOJDDT+Rg5f6fR6TZQzyr4BfSItm5Hb1BhgxXt65URUvjHCi3/l9Jj 4N5HPSgAZ0dqSAz8gJJ4tSGJfJ19pU4YkMV/zjsIGZA07MGEBsu5m0Oz/MCMqkZIKAUX sxUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701898896; x=1702503696; 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=3gJeFonGvMYNeKzsV6Oy/XnXlI6wbESGNu0OauOKf+Y=; b=d7R/gsjOMg0YmPSln3Eo3/XfqexBRMxPRx8+sDZiEaFAD2KJe9MsqdrQnLKlGMUic6 tmpd5efXlAgGu/ROU4GepeTRUwM2qcKsicMkU2hkcDWUA4fR8awxxp/X4SXQ8g35++cF 6HEd1jKrSc51X8EnQdxi2TG2mWluNmVvG5v2BuJi2/zmvOqAzLUoiClELwASR3fBOaVb dzkuYm+qtVgXfxFUSuq3C3f2EI2NA3tHSnfgl5WOhByS/WnBpAgwkgADihl9AQD1Sch8 bXT2Q5xSQG8oZK3TVh4mmDGI3Zniq+K4Q7TcvOl43DhUX29hjJ+eyHpg/o5LhCOCH1vh 66BA== X-Gm-Message-State: AOJu0YyhCA3j6Al1S795sTGoZd7KIMKIyem/GqtETHRRa7EP7wiGdmxw P/N6X7HzPQgsdRVVO5edfrM3udkQdMVDYIOcstm4dg== X-Google-Smtp-Source: AGHT+IF1BAaWnlrh5WqF/ya+nuEDfx6aYPnrVjqaCejA8BrvfovJI+eelraigtBR5kxGPehDymbRr61vGQnCv6irXXU= X-Received: by 2002:a05:600c:3d8b:b0:40b:5e22:30c with SMTP id bi11-20020a05600c3d8b00b0040b5e22030cmr476664wmb.120.1701898895900; Wed, 06 Dec 2023 13:41:35 -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: Wed, 6 Dec 2023 14:41:24 -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="0000000000002259b4060bde3711" X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Spamd-Bar: ---- X-Rspamd-Queue-Id: 4SlrSx6RQ2z3WfN --0000000000002259b4060bde3711 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=3D773c13c686e4b6ae9dbbc150b342b82= c3f47d73a > >>> > >>> 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 t= o > >> 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/D27959 > >> > >> This restriction is too broad and omits all of the modern wifi firmwar= e > >> 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 the > kernel > > too? > > We do index the kernel as well, yes. However, we could probably get by > with "kernel" and ends in ".ko" as a valid set of files. 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 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... Warner --0000000000002259b4060bde3711 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hey John,

On Wed, Dec 6, 2023 at 2:13= =E2=80=AFPM John Baldwin <jhb@freebsd= .org> wrote:
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 773c13c686e4b6ae9dbbc150b342b82c3f47d73a
>>> 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=A0kldxref: skip .pkgsave files
>>>
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0This should help people transitionin= g from traditional setups to
>> pkgbase
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0experience a lot less friction.
>>>
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0We do this by skipping all files con= taining two dots.
>>>
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0Reviewed by: imp
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0Pull Request: = https://github.com/freebsd/freebsd-src/pull/661
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0Differential Revision: http= s://reviews.freebsd.org/D27959
>>
>> This restriction is too broad and omits all of the modern wifi fir= mware
>> 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 pkg= save
>> to the list of "known bad" suffixes.
>>
>
> Sure. Any reason to not just require .ko? Or do we have to index the k= ernel
> too?

We do index the kernel as well, yes.=C2=A0 However, we could probably get b= y
with "kernel" and ends in ".ko" as a valid 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.

<= div>But why does it matter for these? Firmware is usually loaded by filenam= e and need not be elf... or are these wrapped in elf sections...
=
I haven't noticed it breaking my linuxkpi wifi driver th= at have autoloaded firmware...

Warner=C2=A0
<= /div>
--0000000000002259b4060bde3711--