From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by sourceware.org (Postfix) with ESMTPS id 1F9193857829; Sat, 10 Apr 2021 12:29:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1F9193857829 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=debian.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=luca.boccassi@gmail.com Received: by mail-wr1-f45.google.com with SMTP id e12so8163253wro.11; Sat, 10 Apr 2021 05:29:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:user-agent :mime-version; bh=PbT9z/DFd6qSJjxbmJZYjDRUsCcqtThI7kaOuGYlg08=; b=KtqOHUC0kIwQrYkneaA/ocBuBRO/qFfn043SmsiGRZEc50iQOvZW7QyFuriRe1V/oW rSrroNLi75o4EBvQgAPb76c4WjUdaXdjLjWITv+K+5+xBqPvvHNq+LDhA7JUUalV+agb APRtatSivxNNUJCSGANPmWIMhZLie9ZMaVfpIA2BADkYkTFvpHXdWd+7MqBz9cPMFwjD C1qbZqF8XIysYsEsmXo2oz7NU9YV5qOxUzPKLOwIxKDLWbKJPSNTV/6vhdxJZUqQGl+O MpOXuz3do8wlDfeU+rMDzZlrCJwwSVIq/Thl77dzioJuA6oHSb8+qYqvSUQpqXOZFGoU kkGA== X-Gm-Message-State: AOAM53273QpCIaDXtldKPj13JFBy7jWa7oRL24AXLg1TFtBbNIr//0bo P/UgAtje2ELKl1kL9Qei16A= X-Google-Smtp-Source: ABdhPJx6i8Xe30e/xfbALOJTxHaolzln9cgnwIVCvNcY9+FucjI9thjlLGHHYnhegrrpuEhc3bel/A== X-Received: by 2002:adf:edd2:: with SMTP id v18mr22528345wro.305.1618057759155; Sat, 10 Apr 2021 05:29:19 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id v14sm8681246wrd.48.2021.04.10.05.29.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Apr 2021 05:29:18 -0700 (PDT) Message-ID: Subject: Storing package metadata in ELF objects From: Luca Boccassi To: SystemD Devel , "elfutils-devel@sourceware.org" , binutils@sourceware.org, debhelper@packages.debian.org, debian-dpkg@lists.debian.org, devel@fedoraproject.org Cc: Zbigniew =?UTF-8?Q?J=C4=99drzejewski-Szmek?= , Lennart Poettering Date: Sat, 10 Apr 2021 13:29:16 +0100 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-WVG3YZzVjt/YOiPlg73k" User-Agent: Evolution 3.30.5-1.2 MIME-Version: 1.0 X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Sat, 10 Apr 2021 12:29:22 -0000 --=-WVG3YZzVjt/YOiPlg73k Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, Cross-posting to the mailing lists of a few relevant projects. After an initial discussion [0], recently we have been working on a new specification [0] to encode rich package-level metadata inside ELF objects, so that it can be included automatically in generated coredump files. The prototype to parse this in systemd-coredump and store the information in systemd-journal is ready for testing and merged upstream. We are now seeking further comments/opinions/suggestions, as we have a few months before the next release and thus there's plenty of time to make incompatible changes to the format and implementation, if required. A proposal to use this by default for all packages built in Fedora 35 has been submitted [1]. The Fedora Wiki and the systemd.io document have more details, but to make a long story short, a new .notes.package section with a JSON payload will be included in ELF objects, encoding various package- build-time information like distro name&version, package name&version, etc. To summarize from the discussion, the main reasons why we believe this is useful are as following: 1) minimal containers: the rpm database is not installed in the containers. The information about build-ids needs to be stored externally, so package name information is not available immediately, but only after offline processing. The new note doesn't depend on the rpm db in any way. 2) handling of a core from a container, where the container and host have different distros 3) self-built and external packages: unless a lot of care is taken to keep access to the debuginfo packages, this information may be lost. The new note is available even if the repository metadata gets lost. Users can easily provide equivalent information in a format that makes sense in their own environment. It should work even when rpms and debs and other formats are mixed, e.g. during container image creation. Other than in Fedora, we are already making the required code changes at Microsoft to use the same format&specification for internally-built binaries, and for tools that parse core files and logs. Tools for RPM and DEB (debhelper) integration are also available [3]. --=20 Kind regards, Luca Boccassi [0] https://github.com/systemd/systemd/issues/18433 [1] https://systemd.io/COREDUMP_PACKAGE_METADATA/ [2] https://fedoraproject.org/wiki/Changes/Package_information_on_ELF_objec= ts [3] https://github.com/systemd/package-notes --=-WVG3YZzVjt/YOiPlg73k Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEErCSqx93EIPGOymuRKGv37813JB4FAmBxmhwACgkQKGv37813 JB6n5A/6AqLI1pNA9ay6ZLBb9p2E3Ne7J5I28m5MTVEBtAa3+iaa/DNXXKB/HENm lxk6nInFV0SPaXqztlCPdyLFM5M5S68V9ynVStLm5DMy8adPp2nHq8tFlpg3Wt5p qJgXyS17qPNLxtXx7KPZOVBuyPdQr6vhkRJnzMMHLAv0vCv4DjxtQQhKn6aVLYYT UMUn52BN+DaLaB8voWV1jkcVBipef6g5umWmG2/3/YbvEZ3flNr5vtEduneDhL6M AwTusNn7L9WoTspCKiXIaetj8SxWhKyWkDw7lofle6LaRYp5wxiFUKzuxuAYnSPb 7yW+/h6AJKiGCjqim74JLIyoZbzB7ca2AwRWw6XdbbQnDxMODfLnrOoI2732whFc U0sGI9q52mHf+EioxkAZwQd2gz+leiAXTPiqKKzbivNbTkfi5PxiBqsPLP5Mc+bj BFXIl2cbwB8zbXnRASa1Kr/C/WGiycv3tR0/ca4rx9czAQRFX5ET0S1HsCdKUAyq ZUdOBWdtO0NUdUlCIGqSaPOlyjbteFXkaLQfu0rDMQN7G+O3KX5pnUE7FkR6pc0V ZXdCm+Qpahp3xnVN6XHVB2+jyRqdTMfBKvJYo/DK2bJ84Rowv6k/X2uWm0CXjtI2 NwALfaYG/A5J7Hgpc3O9VaP2/yiLVOStYyqq8jzkdSu5Ptli9L0= =5CON -----END PGP SIGNATURE----- --=-WVG3YZzVjt/YOiPlg73k--