From nobody Wed Dec 06 21:53:03 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 4Slrk92qkWz533xV; Wed, 6 Dec 2023 21:53:05 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Slrk92Gx0z3XWP; Wed, 6 Dec 2023 21:53:05 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701899585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=24+YK1NzRwtovKmVnnVatT7bftsBJU4lmlJlWTVHo7U=; b=EGG21HcuwFesyA8FbJ01gpGBRCaD5h8VbuiwG4qYyOPvTENvOwar7321q6rahhuRc4wKpw 8i0fXIOgyX0d7KI5NemB7zwCiMoGYQdZlotvztcPfbFyHlNR6ivZTNU/tR62wVxm7ff7T8 B+5EKA/1LgOX4T6TU1bjlsnqFc+OfZtvK+9B2NPXXx2wucINIXL8x+Da3yLkXHmvXzYY3v su3LFdWWCKwcq4hUlZLk9p3m9KeJ3oH4nuCJSic0fZofJmJ7CR74w4sl343o0WT0nWONDO XkpxbnjX0eIuyEae0nnoXy0pzcne7iBJrO82/cIpck8zr2u7UXxQCfVAzRPlww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701899585; a=rsa-sha256; cv=none; b=h6zeNwd8K9nlRmLsiM/g4vUZ62oiDYQj+iGK0KgYo2gIDzf4zuyzXJaM+s9Zt8fRPfQN2b gv6pBKr6UhIdRe6Y2C1wD8uy8oExnC6ivKeZ/4fPuYtCGe5DBevCgXwjITXassVd6Gargi +JQ+TPVXNVvEI3L7tHiqIi8zv26AXIVRZsEIS9QcvJhwoWqk/meSh5dOPd12SpeZvpOTAp gHzj6mmoQzplqjpppn/vTjyTctuSTrO4mrPXM4UgEXbV17dmc/IN6CsLuLf7zqGAN/SrBv EoEnLb/nyKnsiu0LzR0r/O+hIGvB5Ny9uaIpDblPNCODi0MIk28N1fIpJd5pCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701899585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=24+YK1NzRwtovKmVnnVatT7bftsBJU4lmlJlWTVHo7U=; b=w3xYRHaD8OEbDIMTc0JAQe34DdDxjiivyh7Mq+LLK1ytuO4X0H1QUmckTtFsWV8WIxcJtP VfYZF6G2sx/TK+iHjPsNH8zurfFUTmt1KijNdtSUpr79uJIHw+xGkazBa/MZIYaZPF5qqh YdbJQJLt6YXDVET7XvGvc88aqN84u1r5ucboehKWBgW+PYzvwCPw5diKiT1ztbUu2FYuUp 0Ga0NtOmvxPUae/Z46RDtJ4vcR0jBPDG9x6QCA3oQXV655p3yjn8SMVq3yFQP4wlanvM1X zM5bKqhk4bQm8T+tDttZTVCPm4hw+qMQTcnhejCEDqmg1JJR1TxAkWknSwZ7OA== Received: from [IPV6:2601:648:8384:fd00:8d37:e6e8:747c:72de] (unknown [IPv6:2601:648:8384:fd00:8d37:e6e8:747c:72de]) (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 did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Slrk84qMBz1JGW; Wed, 6 Dec 2023 21:53:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Wed, 6 Dec 2023 13:53:03 -0800 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 User-Agent: Mozilla Thunderbird Subject: Re: git: 773c13c686e4 - main - kldxref: skip .pkgsave files Content-Language: en-US To: Warner Losh Cc: Warner Losh , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202302251737.31PHb2R8072300@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 12/6/23 1:41 PM, Warner Losh wrote: > Hey John, > > On Wed, Dec 6, 2023 at 2:13 PM 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=773c13c686e4b6ae9dbbc150b342b82c3f47d73a >>>>> >>>>> commit 773c13c686e4b6ae9dbbc150b342b82c3f47d73a >>>>> Author: Mina Galić >>>>> 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/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 >>>> /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... 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 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 VM between the native kldxref in the VM (before this change) and my cross-arch version of kldxref. -- John Baldwin