From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (gnu.wildebeest.org [45.83.234.184]) by sourceware.org (Postfix) with ESMTPS id 6384D385801B for ; Fri, 25 Mar 2022 13:39:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6384D385801B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from tarox.wildebeest.org (83-87-18-245.cable.dynamic.v4.ziggo.nl [83.87.18.245]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id CBF9A3022F37; Fri, 25 Mar 2022 14:39:13 +0100 (CET) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id B6536413CEB2; Fri, 25 Mar 2022 14:39:12 +0100 (CET) Message-ID: <77321d756629343a321f4e011e52d1a1fcdd7302.camel@klomp.org> Subject: Re: [PATCH v2] libebl: recognize FDO Packaging Metadata ELF note From: Mark Wielaard To: Luca Boccassi , elfutils-devel@sourceware.org Date: Fri, 25 Mar 2022 14:39:12 +0100 In-Reply-To: <3ad724af194ed4b05d539f0807d77ae7955371df.camel@debian.org> References: <20211119003127.466778-1-luca.boccassi@gmail.com> <20211121194318.105654-1-luca.boccassi@gmail.com> <40a5de54f089f344697ece88e11eb41e526462ac.camel@gmail.com> <17e1d554c9a52598d2c7d27e7a40f17381285ba5.camel@klomp.org> <20220324231438.350551-1-mark@klomp.org> <3ad724af194ed4b05d539f0807d77ae7955371df.camel@debian.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.28.5 (3.28.5-10.el7) Mime-Version: 1.0 X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2022 13:39:19 -0000 Hi Luca, On Fri, 2022-03-25 at 11:17 +0000, Luca Boccassi wrote: > On Fri, 2022-03-25 at 00:14 +0100, Mark Wielaard wrote: > > I took the elf.h update separately. Tweaked your patch a little and > > added a patch of my own to make elflint recognize the new note > > type. > >=20 > > [PATCH 1/3] libelf: Sync elf.h from glibc. > > [PATCH 2/3] libebl: recognize FDO Packaging Metadata ELF note > > [PATCH 3/3] elflint: Recognize NT_FDO_PACKAGING_METADATA >=20 > No problem at all, change looks good, thanks for following up. Thanks, I pushed these three patches. But I noticed an issue on s390x fedora 36. This isn't just elfutils though, binutils also has trouble: Displaying notes found in: .note.package Owner Data size Description readelf: /usr/bin/bash: Warning: note with invalid namesz and/or descsz found at offset 0x0 readelf: /usr/bin/bash: Warning: type: 0x7e1afeca, namesize: 0x04000000, descsize: 0x78000000, alignment: 4 Note how it seems the sizes are swapped. s390x is a big endian platform. Do you happen to know what/how the notes are created and if that process might produce bad little/big encoding issues? > I have included the field in the first PoC that uses the spec in > Debian, for the systemd packages: >=20 > $ readelf --notes /usr/lib/systemd/systemd | grep Packaging > Packaging Metadata: > {"type":"deb","os":"debian","name":"systemd","architecture":"amd64"," > version":"250.4-1","debugInfoUrl":"https://debuginfod.debian.net"} Nice, thanks. I'll look into how to pick up the debugInfoUrl and use that automagically if possible. BTW. I notice that Fedora has an osCpe field where Debian has an os field. It would imho be good if one or the other got standardized. Cheers, Mark