From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [IPv6:2001:4b98:dc4:8::230]) by sourceware.org (Postfix) with ESMTPS id B7A0C386F0F2 for ; Thu, 30 Jun 2022 16:41:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B7A0C386F0F2 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=seketeli.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=seketeli.org Received: (Authenticated sender: dodji@seketeli.org) by mail.gandi.net (Postfix) with ESMTPSA id 3E610240008; Thu, 30 Jun 2022 16:41:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seketeli.org; s=gm1; t=1656607265; 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=jAkC0Sm1PWAmRMQBUbj2e/1kz9vmZdUvFNI6n+ww7Nw=; b=pgYIgPCVOIE7VZtV1RD8zVdRTlRACkW+jV3FLIXJ78JvpfV2+9yNreTy5/tEWxDxYS+fVO xsLo+X93cutqU32rXaoAOXoiYI6UFLo3AAmnqj3C4PQ/q8yTmDH4ihL6U/q6gOWnL3c/ta SU1T4mPVQuY3MSdGk1itDQxRR38zbbyWR+Bc5yUfS3zW8tqGzp3octGV70nSLALsnY24VD 04hiKg7jkPrqbo8uY9Myadx/LLQSDi5djuUzpdipZkMUZQ5NQOEpVxdxKUY0hZ0nqUJ5hm frWpV6Uq8EvXcYl1iJY7fLtcQ2D2wxf987QRyGgNcjJpvr2RcAX7eoqDrwlM0Q== Received: by localhost (Postfix, from userid 1000) id AB7365800FC; Thu, 30 Jun 2022 18:41:04 +0200 (CEST) From: Dodji Seketeli To: Giuliano Procida Cc: libabigail@sourceware.org, kernel-team@android.com, maennich@google.com Subject: Re: [PATCH v5 3/4] Linux symbol CRCs: support 0 and report presence changes Organization: Me, myself and I References: <20220321160221.1372398-1-gprocida@google.com> <20220613142533.3676501-4-gprocida@google.com> X-Operating-System: Fedora 37 X-URL: http://www.seketeli.net/~dodji Date: Thu, 30 Jun 2022 18:41:04 +0200 In-Reply-To: <20220613142533.3676501-4-gprocida@google.com> (Giuliano Procida's message of "Mon, 13 Jun 2022 15:25:32 +0100") Message-ID: <87tu82cden.fsf@seketeli.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, 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 X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jun 2022 16:41:08 -0000 Hello, Giuliano Procida a =C3=A9crit: > The CRC with value zero was used to mean "absent". This can be better > modelled using optional. > > This commit makes this change and also tweaks reporting so that > disappearing / appearing CRCs are noted. This should be essentially > impossible unless CRCs are enabled / disabled altogether but would be > very noteworthy otherwise. > > * include/abg-ir.h (elf_symbol::elf_symbol): Argument crc is > now an optional defaulted to absent. > (elf_symbol::create): Likewise. > (elf_symbol::get_crc): Now returns an optional uint64_t. > (elf_symbol::set_src): Now takes an optional uint64_t. > * src/abg-comp-filter.cc (crc_changed): Simplify comparison. > * src/abg-ir.cc (elf_symbol::priv): Member crc_ is now an > optional uint64_t. > (elf_symbol::priv::priv): Argument crc is now an optional > uint64_t. > (elf_symbol::elf_symbol): Likewise. > (elf_symbol::create): Argument crc is now an optional uint64_t > and defaults to absent. > (textually_equals): Simplify comparison. > (elf_symbol::get_crc): Now returns an optional uint64_t. > (elf_symbol::set_crc): Now takes an optional uint64_t. > * src/abg-reader.cc (build_elf_symbol): Treat CRC 0 the same > as other CRC values. > * src/abg-reporter-priv.cc (maybe_report_diff_for_symbol): > Treat CRC 0 the same as other CRC values and also report > changes to CRC presence. > * src/abg-writer.cc (write_elf_symbol): Treat CRC 0 the same > as other CRC values. > * tests/data/Makefile: Remove test-abidiff/test-crc-report.txt > and add test-abidiff/test-crc-report-{0-1,1-0,1-2}.txt. > * tests/data/test-abidiff/test-crc-report-0-1.txt: Report > showing additional of CRCs. > * tests/data/test-abidiff/test-crc-report-1-0.txt: Report > showing removal of CRCs. > * tests/data/test-abidiff/test-crc-report-1-2.txt: Renamed > from tests/data/test-abidiff/test-crc-report.txt. > * tests/test-abidiff.cc: Update test cases that no longer > generate empty reports. > * tests/test-symtab.cc: Update KernelSymtabsWithCRC test. > > Reviewed-by: Matthias Maennich > Signed-off-by: Giuliano Procida Applied to master, thanks ! [...] Cheers, --=20 Dodji