From nobody Thu Dec 14 18:02:02 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 4SrgD70ZWrz52pVc for ; Thu, 14 Dec 2023 18:02:15 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) (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 4SrgD661mHz4CwN for ; Thu, 14 Dec 2023 18:02:14 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a1e83adfe72so774435566b.1 for ; Thu, 14 Dec 2023 10:02:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1702576933; x=1703181733; 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=UE4ufFZvqgCYoB9zA80OcULRfoCCy0+yBSpw7Cf5S/8=; b=d9xjLDut0uAm4+csXBC55SrVZWAPCVeYqRn7XFg2j2wFx2r4zvBURhV4WjIVsDlTMZ rMbhOZfiXsXV1nrS+tXW4akXIVa1Wyif7qSiTm2bjYtdeVSS617crF/nHW+3/uqGGq5M U/s9I41y/emvB7fdceu2ydRAO/20vSHmp9be70MKjViW+KMWvVJHjnC+p2uUt//E83LL zV4w0CGsSK+ooA+bh9KgT4TksG0Fqy16pwvcEMWbMVX75CHpf7g+oHSNF+q9fojiSfpw P3AGfoUYA6oTmzl6YQNTbBGIm4ttyeDK+yDg5J6Xs3N829kScoo5UoOJXeuSgpPUHBIU 04RQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702576933; x=1703181733; 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=UE4ufFZvqgCYoB9zA80OcULRfoCCy0+yBSpw7Cf5S/8=; b=BEBd9aPGvtPRqgyLeUZ+SILKJgvZCG/IY72QRBcSp3MedxW7Bt4QGTxsB3sELk1bz6 9uMDyVRmF56UqNzMJ0mkZ984dfOQEce1+be5GdZBu11AjTfqwCGbH3INtKyaAxXVV86/ 9g4Wz1Ct3/Uu39Bh6zZ7Wvax1E8dSV4nYQ6hoICjU+N0XYDUzROM4Xol5G1GRWNMscxl VVkDUE2KwID3mbpNR9Gafvu/rxlz1QRu+aAxR64kzIQbz3XQZ6RATAYYY8acDQhSKAvM h1kbuqhZ3AWuOHMwFwLbmRYj9w52HG5cLsKQ4AhQHGaBh9Owe610eBNRB5YoSLfXkMXX eT8g== X-Gm-Message-State: AOJu0YxS7VbB2JhS59MH/Sv8RzFnKYBEqFMXnfNrS5b9fyGnSbSdAL9c r6F7BtPwuDqCXOGTmLr4z7bInd7H4rODF4bw+4DL9zVglSYYjwnUprI= X-Google-Smtp-Source: AGHT+IF6rfWeLcdxyrM8HGkHYv/zNeyRzAuKugaigUsvl77kXPgEeHdpJOcFkRBtzBc09i3JRRd03DS4envdr6XUSYY= X-Received: by 2002:a17:906:cc96:b0:a1d:8259:98d2 with SMTP id oq22-20020a170906cc9600b00a1d825998d2mr5070203ejb.61.1702576932941; Thu, 14 Dec 2023 10:02:12 -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: <202312141644.3BEGiQKZ081497@gitrepo.freebsd.org> <92a185f3-ab96-4dd0-b455-a3e28aa595f6@FreeBSD.org> In-Reply-To: <92a185f3-ab96-4dd0-b455-a3e28aa595f6@FreeBSD.org> From: Warner Losh Date: Thu, 14 Dec 2023 11:02:02 -0700 Message-ID: Subject: Re: git: 0840bdbf2a07 - main - Don't try and run kldxref for arm kernels To: John Baldwin Cc: Jessica Clarke , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000004a89b5060c7c15ef" 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: 4SrgD661mHz4CwN --0000000000004a89b5060c7c15ef Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Dec 14, 2023 at 10:48=E2=80=AFAM John Baldwin wro= te: > On 12/14/23 8:44 AM, Jessica Clarke wrote: > > The branch main has been updated by jrtc27: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D0840bdbf2a07b68e29267bc49057ca6= df2351360 > > > > commit 0840bdbf2a07b68e29267bc49057ca6df2351360 > > Author: Jessica Clarke > > AuthorDate: 2023-12-14 16:40:08 +0000 > > Commit: Jessica Clarke > > CommitDate: 2023-12-14 16:40:08 +0000 > > > > Don't try and run kldxref for arm kernels > > > > Surprisingly, kldxref does not currently support arm, and > unhelpfully > > this means it silently does nothing rather than give an error, so > the > > linker.hints entry added to the METALOG for -DNO_ROOT builds (and > > pkgbase ones) refers to a file that doesn't exist. Ideally it woul= d > be > > supported (and ideally the METALOG handling would be less fragile, > but > > without integrating it into kldxref the only real option would be = to > > just run find(1) to get the list of linker.hints files, which feel= s > a > > little backwards), but for now just paper over this by skipping th= e > > build step on arm. > > > > Reported by: bapt > > Fixes: ff7c12c1f17e ("Make kldxref a bootstrap tool and > use unconditionally") > > --- > > sys/conf/kmod.mk | 3 ++- > > sys/modules/Makefile | 3 ++- > > 2 files changed, 4 insertions(+), 2 deletions(-) > > I think before the libelf changes it was creating a file, but with only a > single > version record. Now it defers emitting the version record until it emits > at least > one "real" record since it doesn't know which endianness to use until it > has > successfully opened and parsed a file. As a result it is now leaving the > file > empty rather than with the version record. > > It should not be hard to add ef_arm.c to fix for arm. > > Another fun project btw would be for someone to add a "read" mode to > kldxref to > read a linker.hints file and dump the contents in a human readable fashio= n > similar > to the output one gets from 'kldxref -d'. > devmatch -v I think does this. But it's not nice. Warner --0000000000004a89b5060c7c15ef Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Dec 14, 2023 at 10:48=E2=80= =AFAM John Baldwin <jhb@freebsd.org> wrote:
On= 12/14/23 8:44 AM, Jessica Clarke wrote:
> The branch main has been updated by jrtc27:
>
> URL:
https://= cgit.FreeBSD.org/src/commit/?id=3D0840bdbf2a07b68e29267bc49057ca6df2351360<= /a>
>
> commit 0840bdbf2a07b68e29267bc49057ca6df2351360
> Author:=C2=A0 =C2=A0 =C2=A0Jessica Clarke <jrtc27@FreeBSD.org> > AuthorDate: 2023-12-14 16:40:08 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Jessica Clarke <jrtc27@FreeBSD.org> > CommitDate: 2023-12-14 16:40:08 +0000
>
>=C2=A0 =C2=A0 =C2=A0 Don't try and run kldxref for arm kernels
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 Surprisingly, kldxref does not currently support a= rm, and unhelpfully
>=C2=A0 =C2=A0 =C2=A0 this means it silently does nothing rather than gi= ve an error, so the
>=C2=A0 =C2=A0 =C2=A0 linker.hints entry added to the METALOG for -DNO_R= OOT builds (and
>=C2=A0 =C2=A0 =C2=A0 pkgbase ones) refers to a file that doesn't ex= ist. Ideally it would be
>=C2=A0 =C2=A0 =C2=A0 supported (and ideally the METALOG handling would = be less fragile, but
>=C2=A0 =C2=A0 =C2=A0 without integrating it into kldxref the only real = option would be to
>=C2=A0 =C2=A0 =C2=A0 just run find(1) to get the list of linker.hints f= iles, which feels a
>=C2=A0 =C2=A0 =C2=A0 little backwards), but for now just paper over thi= s by skipping the
>=C2=A0 =C2=A0 =C2=A0 build step on arm.
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 Reported by:=C2=A0 =C2=A0 bapt
>=C2=A0 =C2=A0 =C2=A0 Fixes:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ff7c12c1f= 17e ("Make kldxref a bootstrap tool and use unconditionally")
> ---
>=C2=A0 =C2=A0sys/conf/
kmod.mk=C2=A0 =C2=A0 =C2=A0| 3 ++-
>=C2=A0 =C2=A0sys/modules/Makefile | 3 ++-
>=C2=A0 =C2=A02 files changed, 4 insertions(+), 2 deletions(-)

I think before the libelf changes it was creating a file, but with only a s= ingle
version record.=C2=A0 Now it defers emitting the version record until it em= its at least
one "real" record since it doesn't know which endianness to u= se until it has
successfully opened and parsed a file.=C2=A0 As a result it is now leaving = the file
empty rather than with the version record.

It should not be hard to add ef_arm.c to fix for arm.

Another fun project btw would be for someone to add a "read" mode= to kldxref to
read a linker.hints file and dump the contents in a human readable fashion = similar
to the output one gets from 'kldxref -d'.

=
devmatch -v I think does this. But it's not nice.
=
Warner=C2=A0
--0000000000004a89b5060c7c15ef--