From: John Moon <quic_johmoo@quicinc.com>
To: Mark Wielaard <mark@klomp.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
"Nicolas Schier" <nicolas@fjasle.eu>,
<linux-kbuild@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-arm-msm@vger.kernel.org>,
Randy Dunlap <rdunlap@infradead.org>,
"Arnd Bergmann" <arnd@arndb.de>,
Bjorn Andersson <andersson@kernel.org>,
Todd Kjos <tkjos@google.com>,
Matthias Maennich <maennich@google.com>,
Giuliano Procida <gprocida@google.com>, <kernel-team@android.com>,
<libabigail@sourceware.org>, Jordan Crouse <jorcrous@amazon.com>,
Trilok Soni <quic_tsoni@quicinc.com>,
Satya Durga Srinivasu Prabhala <quic_satyap@quicinc.com>,
Elliot Berman <quic_eberman@quicinc.com>,
"Guru Das Srinagesh" <quic_gurus@quicinc.com>
Subject: Re: [PATCH v5 1/2] check-uapi: Introduce check-uapi.sh
Date: Thu, 13 Apr 2023 10:15:24 -0700 [thread overview]
Message-ID: <d2c09763-db80-8f67-4b80-dd33384ee533@quicinc.com> (raw)
In-Reply-To: <718c102205750a00b86e8d33748e9bfb3c485ee1.camel@klomp.org>
On 4/13/2023 7:37 AM, Mark Wielaard wrote:
> Hi,
>
> On Wed, 2023-04-12 at 09:37 -0700, John Moon via Libabigail wrote:
>> On 4/11/2023 11:14 PM, Greg Kroah-Hartman wrote:
>>>> Would you find the tool more useful if it simply filtered out all instances
>>>> where the size of the type did not change? This would filter out the
>>>> following which the tool currently flags:
>>>>
>>>> - enum expansions
>>>> - reserved field expansions
>>>> - expansions of a struct with a flex array at the end
>>>> - type changes
>>>> - re-ordering of existing members
>>>> - ...others?
>>>
>>> Obviously not, as some of those are real breakages, and some are not at
>>> all.
>>>
>>> Please understand what is an abi breakage. Adding new enums is not.
>>> Using a reserved field is not. Reording existing members IS.
>>>
>>
>> Yes, understood that method would miss certain classes of breakages. I
>> was suggesting it as a way to improve the signal-to-noise ratio of the
>> tool since we don't currently have an algorithm for determining
>> breakages with 100% accuracy.
>
> Note that you can check the exit code of libabigail's abidiff to see
> whether something is an incompatible abi change or not, see:
> https://sourceware.org/libabigail/manual/abidiff.html#return-values
>
> You can also of course use suppressions to instruct abidiff to avoid
> reporting changes involving certain ABI artifacts:
> https://sourceware.org/libabigail/manual/libabigail-concepts.html#suppr-spec-label
>
> Cheers,
>
> Mark
Checking the ABIDIFF_ABI_INCOMPATIBLE_CHANGE flag in the return code is
a good idea, but checking it doesn't change what the tool is currently
outputting (i.e. the flag is set for all the changes currently
reported). I think this is because of some filtering we're doing based
on grepping stdout, but checking the return code would be more stable.
The suppressions may work for some cases, but I fear they would be too
eager in other cases. Looking at the docs, I'm not sure how we could
express something like:
"suppress changed enumerators if they end in 'MAX' or 'LAST' and appear
at the end of the enumeration"
or
"suppress data member insertions into a struct if the last member in the
struct has its size reduced by sizeof(new_member) and is named 'pad' or
'reserved'"
They're complicated cases to detect in a general way.
Thanks,
John
next prev parent reply other threads:[~2023-04-13 17:16 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-07 20:34 [PATCH v5 0/2] Validating UAPI backwards compatibility John Moon
2023-04-07 20:34 ` [PATCH v5 1/2] check-uapi: Introduce check-uapi.sh John Moon
2023-04-10 10:03 ` Masahiro Yamada
2023-04-10 18:45 ` Greg Kroah-Hartman
2023-04-10 23:32 ` John Moon
2023-04-11 6:34 ` Greg Kroah-Hartman
2023-04-11 18:36 ` John Moon
2023-04-12 6:14 ` Greg Kroah-Hartman
2023-04-12 16:37 ` John Moon
2023-04-12 16:43 ` Greg Kroah-Hartman
2023-04-13 17:07 ` John Moon
2023-04-13 18:22 ` Greg Kroah-Hartman
2023-04-13 14:37 ` Mark Wielaard
2023-04-13 17:12 ` Giuliano Procida
2023-04-13 17:15 ` John Moon [this message]
2023-04-13 17:03 ` Nicolas Schier
2023-04-13 17:33 ` John Moon
2023-07-20 16:10 ` [PATCH] scripts/check-uapi.sh: add stgdiff support Giuliano Procida
2023-07-22 19:40 ` Trilok Soni
2023-04-07 20:34 ` [PATCH v5 2/2] docs: dev-tools: Add UAPI checker documentation John Moon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d2c09763-db80-8f67-4b80-dd33384ee533@quicinc.com \
--to=quic_johmoo@quicinc.com \
--cc=andersson@kernel.org \
--cc=arnd@arndb.de \
--cc=gprocida@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=jorcrous@amazon.com \
--cc=kernel-team@android.com \
--cc=libabigail@sourceware.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maennich@google.com \
--cc=mark@klomp.org \
--cc=masahiroy@kernel.org \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=nicolas@fjasle.eu \
--cc=quic_eberman@quicinc.com \
--cc=quic_gurus@quicinc.com \
--cc=quic_satyap@quicinc.com \
--cc=quic_tsoni@quicinc.com \
--cc=rdunlap@infradead.org \
--cc=tkjos@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).