[PATCH] scripts/check-uapi.sh: add stgdiff support
Trilok Soni
quic_tsoni at quicinc.com
Sat Jul 22 12:40:51 PDT 2023
On 7/20/2023 9:10 AM, Giuliano Procida wrote:
> Hi John.
>
> I spent a few minutes adding stgdiff support to the script. It's
> really just for illustration purposes.
>
> As I think you know, STG doesn't yet exist as a project outside of
> AOSP. Nevertheless, this may be useful to you as-is.
>
> STG has quite a different philosophy to libabigil in terms of
> filtering out certain kinds of differences. Some of the things (like
> enum enumerator additions) are not considered harmless. The reasoning
> behind this is basically...
> https://en.wikipedia.org/wiki/Covariance_and_contravariance_(computer_science)
>
> However, it does have --ignore interface_addition (and the related
> --ignore type_definition_addition) which can be used to detect whether
> one ABI is a subset of another.
>
> I am looking at adding support for macro definitions (gcc -g3) to STG
> which will then let us cover significantly more of the UAPI surface.
>
> Unfortunately, there are some headers which use anonymous enums to
> define constants (e.g. and ironically BTF). ABI tracking these types
> would require something a bit hacky. Or we could just name them.
Thank you Giuliano for trying the script w/ stg. We will review the
modifications below.
Just to update everyone here that John is looking into the libabigail
changes to reduce the false positives as discussed earlier in the email
thread. There is some progress on the libabigail mailing list. Once we
have enough changes made in the libabigail, John will update here with
his results.
We have also submitted abstract in LPC 2023 Android MC as well about the
UAPI checker. We hope to make a good progress before LPC.
---Trilok Soni
More information about the linux-arm-kernel
mailing list