From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id D86DB3858D37 for ; Wed, 6 Dec 2023 00:14:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D86DB3858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D86DB3858D37 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701821687; cv=none; b=EhAQJwP6IPc5+BE/IhhKRp4ccdfLl6956fhWqePdwCVZ0rrqecaeXx4hlMExWGXgK52wN7r0N+ExgVu3BljXbRDs1QSHTHOZcitzxsUiETkg4boioC2lS/U5Djs8hN6glsNG4GG3RInONfndPG2E7JVa5r0BTGeMGPvEIcTYIR0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701821687; c=relaxed/simple; bh=fp3unIp/J65sa97dHDp2oOysm/Wfn299QniIusfknqs=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=kB2ojcmBcQ4aML7pNlLHBxdscZJsdbX+WVz84WSgNhxReNz7PI6cxe3yRxhte9fBxXUqYGjhGval0iR2t6qSkXNrtzxQK+/YJ9D+gkAwU128R8y31zgIqHmD61eLgy0UUFG7lqLi8JAuHHmPkmhnbwqxlAfaJcMYn6Wv5eESiiY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701821685; 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: in-reply-to:in-reply-to:references:references; bh=Mh4RgqRp7pN/jSfx2A0IuZPF+zd+yE9NKVm83bLdR5A=; b=F7pvYaBleUy6Fb3zoirIQ08nQjDNjh0R4bKg+D5QAQU/5ckx7uojHblfHb/9PJJuDi5ByS qRPMUHpfas+52h1iq54pwuJ3CJlDrKuTDEKSk0qxpMzzlS1JpmoDmX0DHNKnHzcpt/LQVz zESTr0EBDIIo5FQDlS8LkRW/IY9pu20= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-340-84R4u6bqOSOUX6PRhq6NhQ-1; Tue, 05 Dec 2023 19:14:42 -0500 X-MC-Unique: 84R4u6bqOSOUX6PRhq6NhQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2618829ABA1B; Wed, 6 Dec 2023 00:14:42 +0000 (UTC) Received: from redhat.com (unknown [10.22.8.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 072233C25; Wed, 6 Dec 2023 00:14:42 +0000 (UTC) Received: from fche by redhat.com with local (Exim 4.94.2) (envelope-from ) id 1rAfYn-0003Jl-09; Tue, 05 Dec 2023 19:14:41 -0500 Date: Tue, 5 Dec 2023 19:14:40 -0500 From: "Frank Ch. Eigler" To: Dodji Seketeli Cc: libabigail@sourceware.org, woodard@redhat.com Subject: Re: idea: abigail abixml archive Message-ID: <20231206001440.GA12666@redhat.com> References: <20231115155306.GC15862@redhat.com> <87pm08y1qw.fsf@seketeli.org> <87zfzctorg.fsf@redhat.com> <87ttpkvv2s.fsf@seketeli.org> MIME-Version: 1.0 In-Reply-To: <87ttpkvv2s.fsf@seketeli.org> User-Agent: Mutt/1.12.0 (2019-05-25) X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_LOTSOFHASH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi - Having gone quiet for a few weeks, would like to show a really early sketch of this gadget. See the tools/abidb python script in the users/fche/abidb branch. I am better educated about limitations of abicompat as discussed downthread, but this script doesn't attempt to solve the whole problem yet. Recursive searches for SOLIB chains, reverse dependencies for weak symbols etc., are not in there, but some of them could be added. Anyway, what there is now: % abidb --help usage: abidb [-h] [--loglevel LOGLEVEL] [--git GIT] [--distrobranch DISTROBRANCH] [--submit [SUBMIT ...]] [--check [CHECK ...]] [--ld-library-path LD_LIBRARY_PATH] Check binary against abidb corpus and/or submit new data. options: -h, --help show this help message and exit --loglevel LOGLEVEL logging level (default: info) --git GIT abidb git working tree (default: .) --distrobranch DISTROBRANCH use given abidb distrobranch (default: fedora/39/x86_64) --submit [SUBMIT ...] submit abidw of given binaries to abidb (default: []) --check [CHECK ...] check given binaries against abidb (default: []) --ld-library-path LD_LIBRARY_PATH LD_LIBRARY_PATH to use for soname resolution during check (default: /lib:/lib64) % git init /tmp/abidb NB: this git repo would naturally be centrally shareable over time. % abidb --git /tmp/abidb --submit /lib*/libc.so.? 2023-12-05 19:07:58,738:abidb:INFO:checked out distrobranch fedora/39/x86_64 files 0 2023-12-05 19:07:59,268:abidb:INFO:binary /lib64/libc.so.6 abidb-path /tmp/abidb/lib64/libc.so.6/7dd93cb9991a89f0ec53d9443a0b78ad952269bc.xml abixml-length 3305422 commit e90283c5fe45a2c465edfeb2ec55f3b47cf6dce3 2023-12-05 19:08:00,226:abidb:INFO:binary /lib/libc.so.6 abidb-path /tmp/abidb/lib/libc.so.6/02ac2b73b0b28086109ca73389bf97a26fd70542.xml abixml-length 3521035 commit 57536c5b38e9463654432c0b31e4ff5401eed512 NB: the directory structure in git mirrors the filesystem, plus the appropriate BUILDID. This allows multiple different updates of the same library to be represented. % abidb --git /tmp/abidb --check /bin/ls 2023-12-05 19:08:35,699:abidb:INFO:checked out distrobranch fedora/39/x86_64 files 2 2023-12-05 19:08:35,701:abidb:WARNING:no abi.xml found for libselinux.so.1 searching under /lib:/lib64 2023-12-05 19:08:35,701:abidb:WARNING:no abi.xml found for libcap.so.2 searching under /lib:/lib64 2023-12-05 19:08:35,867:abidb:INFO:abicompat success: /bin/ls vs. /tmp/abidb/lib/libc.so.6/02ac2b73b0b28086109ca73389bf97a26fd70542.xml 2023-12-05 19:08:36,022:abidb:INFO:abicompat success: /bin/ls vs. /tmp/abidb/lib64/libc.so.6/7dd93cb9991a89f0ec53d9443a0b78ad952269bc.xml NB: it complains not having a few solibs in the database yet, so let's add them: % abidb --git /tmp/abidb --submit /lib*/libselinux.so.? /lib*/libcap.so.? 2023-12-05 19:09:10,984:abidb:INFO:checked out distrobranch fedora/39/x86_64 files 2 2023-12-05 19:09:11,041:abidb:INFO:binary /lib64/libselinux.so.1 abidb-path /tmp/abidb/lib64/libselinux.so.1/c3ca2b00f1505a173d44417dc98dced2ec390268.xml abixml-length 281444 commit 91e92229bf17b00cb708d5f0da3e9d94708665a2 2023-12-05 19:09:11,087:abidb:INFO:binary /lib/libselinux.so.1 abidb-path /tmp/abidb/lib/libselinux.so.1/b4ea9035186f94416600ccf6b378afb408a8ec8e.xml abixml-length 280693 commit 9979a994ef5d77ab25ce777ab22ff10aae3d4f59 2023-12-05 19:09:11,119:abidb:INFO:binary /lib64/libcap.so.2 abidb-path /tmp/abidb/lib64/libcap.so.2/ff26c67e54bb86d066f1c3cee3cef74fe0c13a77.xml abixml-length 68942 commit 780a099d2a59132aca0f82ab6d5e553be08c2969 2023-12-05 19:09:11,144:abidb:INFO:binary /lib/libcap.so.2 abidb-path /tmp/abidb/lib/libcap.so.2/86ab6783bd93f43139db2924cbbf25bc9419dc9c.xml abixml-length 69053 commit 7f9cec82580c58007748f470408030195d9dcd07 NB: now it will be happy % abidb --git /tmp/abidb --check /bin/ls 2023-12-05 19:09:27,561:abidb:INFO:checked out distrobranch fedora/39/x86_64 files 6 2023-12-05 19:09:27,578:abidb:INFO:abicompat success: /bin/ls vs. /tmp/abidb/lib/libselinux.so.1/b4ea9035186f94416600ccf6b378afb408a8ec8e.xml 2023-12-05 19:09:27,590:abidb:INFO:abicompat success: /bin/ls vs. /tmp/abidb/lib64/libselinux.so.1/c3ca2b00f1505a173d44417dc98dced2ec390268.xml 2023-12-05 19:09:27,596:abidb:INFO:abicompat success: /bin/ls vs. /tmp/abidb/lib/libcap.so.2/86ab6783bd93f43139db2924cbbf25bc9419dc9c.xml 2023-12-05 19:09:27,602:abidb:INFO:abicompat success: /bin/ls vs. /tmp/abidb/lib64/libcap.so.2/ff26c67e54bb86d066f1c3cee3cef74fe0c13a77.xml 2023-12-05 19:09:27,768:abidb:INFO:abicompat success: /bin/ls vs. /tmp/abidb/lib/libc.so.6/02ac2b73b0b28086109ca73389bf97a26fd70542.xml 2023-12-05 19:09:27,920:abidb:INFO:abicompat success: /bin/ls vs. /tmp/abidb/lib64/libc.so.6/7dd93cb9991a89f0ec53d9443a0b78ad952269bc.xml NB: ok let's try some random ancient binary % abidb --git /tmp/abidb --check /usr/local/bin/avplay 2023-12-05 19:11:17,151:abidb:INFO:checked out distrobranch fedora/39/x86_64 files 6 2023-12-05 19:11:17,153:abidb:WARNING:no abi.xml found for libm.so.6 searching under /lib:/lib64 2023-12-05 19:11:17,153:abidb:WARNING:no abi.xml found for libasound.so.2 searching under /lib:/lib64 2023-12-05 19:11:17,153:abidb:WARNING:no abi.xml found for libbz2.so.1 searching under /lib:/lib64 2023-12-05 19:11:17,153:abidb:WARNING:no abi.xml found for libz.so.1 searching under /lib:/lib64 2023-12-05 19:11:17,153:abidb:WARNING:no abi.xml found for libSDL-1.2.so.0 searching under /lib:/lib64 2023-12-05 19:11:17,153:abidb:WARNING:no abi.xml found for libpthread.so.0 searching under /lib:/lib64 2023-12-05 19:11:22,889:abidb:WARNING:abicompat error: /usr/local/bin/avplay vs. /tmp/abidb/lib/libc.so.6/02ac2b73b0b28086109ca73389bf97a26fd70542.xml: functions defined in library '/tmp/abidb/lib/libc.so.6/02ac2b73b0b28086109ca73389bf97a26fd70542.xml' have sub-types that are different from what application '/usr/local/bin/avplay' expects: function int __xpg_strerror_r(int, char*, size_t): parameter 3 of type 'typedef size_t' changed: underlying type 'unsigned long int' changed: type name changed from 'unsigned long int' to 'unsigned int' type size changed from 64 to 32 (in bits) address size of function changed from 64 bits to 32 bits variables defined in library '/tmp/abidb/lib/libc.so.6/02ac2b73b0b28086109ca73389bf97a26fd70542.xml' have sub-types that are different from what application '/usr/local/bin/avplay' expects: void (void*, void*)* __free_hook: in pointed to type 'function type void (void*, void*)': address size of function changed from 64 bits to 32 bits FILE* stdin: in pointed to type 'typedef FILE' at FILE.h:7:1: underlying type 'struct _IO_FILE' at struct_FILE.h:49:1 changed: type size changed from 1728 to 1184 (in bits) [...] long int __timezone: type size changed from 64 to 32 (in bits) 2023-12-05 19:11:22,889:abidb:INFO:abicompat success: /usr/local/bin/avplay vs. /tmp/abidb/lib/libc.so.6/02ac2b73b0b28086109ca73389bf97a26fd70542.xml 2023-12-05 19:11:28,727:abidb:WARNING:abicompat error: /usr/local/bin/avplay vs. /tmp/abidb/lib64/libc.so.6/7dd93cb9991a89f0ec53d9443a0b78ad952269bc.xml: functions defined in library '/tmp/abidb/lib64/libc.so.6/7dd93cb9991a89f0ec53d9443a0b78ad952269bc.xml' have sub-types that are different from what application '/usr/local/bin/avplay' expects: function int fputc(int, FILE*): parameter 2 of type 'FILE*' has sub-type changes: in pointed to type 'typedef FILE' at FILE.h:7:1: underlying type 'struct _IO_FILE' at struct_FILE.h:49:1 changed: type size hasn't changed [...] unqualified underlying type 'struct tm' changed at struct_tm.h:7:1, as reported earlier variables defined in library '/tmp/abidb/lib64/libc.so.6/7dd93cb9991a89f0ec53d9443a0b78ad952269bc.xml' have sub-types that are different from what application '/usr/local/bin/avplay' expects: FILE* stdin: pointed to type 'typedef FILE' changed at FILE.h:7:1, as reported earlier [...] 2023-12-05 19:11:28,727:abidb:INFO:abicompat success: /usr/local/bin/avplay vs. /tmp/abidb/lib64/libc.so.6/7dd93cb9991a89f0ec53d9443a0b78ad952269bc.xml That's it for now. - FChE