[0/7,applied,to,mainline] Support the Linux Kernel UAPI checker project

Message ID 87cyx97h4j.fsf@redhat.com
Headers
Series Support the Linux Kernel UAPI checker project |

Message

Dodji Seketeli Oct. 20, 2023, 9:55 a.m. UTC
  Hello,

The check-uapi.sh script uses abidiff to validate backwards
compatibility of the Linux Kernel UAPI headers.  It does so by
comparing modified headers' ABI before and after a patch is applied.

The script is being reviewed upstream, notably at
https://lore.kernel.org/lkml/20230407203456.27141-1-quic_johmoo@quicinc.com/.

During that review, it appeared that libabigail needs a number of
improvements to support this Linux Kernel UAPI checker project.

From a discussion on the mailing list[1], John Moon laid out the 3
areas that need improvement in libabigail:

    1. Extend the suppression specification engine to better support enum
    expansion by adding support for this kind type suppression:

	[suppress_type]
	  type_kind = enum

    2. Extend the suppression specification engine to support suppressing
    change reports involving new data members being added right before
    flexible array data members with this kind of type suppression:

	[suppress_type]
	  type_kind = struct
	  name = foo
	  has_data_member_inserted_at = offset_of_flexible_array_data_member
	  has_size_change = yes

    3. Better support representing changes to anonymous enum, union and
    struct types.


Item 1/ is handled by the first patch:
    suppression: Add "changed_enumerators_regexp" property

Item 2/ is handled by the sixth patch:
    Support suppressing data member insertion before a flexible array
    member

Item 3/ is handled by patches three to five:
    ir,comparison,corpus: Better support anonymous enums comparison

    ir,comparison: Represent changed anonymous enums

    comparison: Represent changed unreachable anonymous unions,
    structs & enums

The last patch is a rewrite of the support of the (existing) handling
of the "end" keyword in terms of the concept of "named boundary"
introduced by the sixth patch.  Note that the "end" keyword is used in
suppression specifications like this one:

    [suppress_type]
      type_kind = struct
      name = foo
      has_data_member_inserted_at = end
      has_size_change = yes

That last patch thus makes the new "named boundary" concept used in a
consistent way in the source code, making it more maintainable.

This patch set has been applied to the master branch.

Thanks.

Dodji Seketeli (6):
  default-reporter,reporter-priv: Do not report names of anonymous enums
  ir,comparison,corpus: Better support anonymous enums comparison
  ir,comparison: Represent changed anonymous enums
  comparison: Represent changed unreachable anonymous unions, structs &
    enums
  Support suppressing data member insertion before a flexible array
    member
  suppression: Make the "end" data member offset selector be named
    boundary

John Moon (1):
  suppression: Add "changed_enumerators_regexp" property

 doc/manuals/libabigail-concepts.rst           |    30 +
 include/abg-fwd.h                             |    53 +
 include/abg-ir.h                              |    11 +
 include/abg-suppression.h                     |    33 +
 src/abg-comparison.cc                         |   152 +-
 src/abg-corpus.cc                             |     4 +-
 src/abg-default-reporter.cc                   |    12 +-
 src/abg-ir.cc                                 |   358 +-
 src/abg-reporter-priv.cc                      |    11 +-
 src/abg-suppression-priv.h                    |     1 +
 src/abg-suppression.cc                        |   187 +-
 tests/data/Makefile.am                        |    44 +
 .../test-anon-types-report-1.txt              |    31 +
 .../test-abidiff-exit/test-anon-types-v0.c    |    42 +
 .../test-abidiff-exit/test-anon-types-v0.o    |   Bin 0 -> 3240 bytes
 .../test-abidiff-exit/test-anon-types-v1.c    |    33 +
 .../test-abidiff-exit/test-anon-types-v1.o    |   Bin 0 -> 3168 bytes
 .../test-anonymous-enums-change-report-v0.txt |    16 +
 .../test-anonymous-enums-change-report-v1.txt |    21 +
 .../test-anonymous-enums-change-v0.c          |    36 +
 .../test-anonymous-enums-change-v0.o          |   Bin 0 -> 3296 bytes
 .../test-anonymous-enums-change-v1.c          |    41 +
 .../test-anonymous-enums-change-v1.o          |   Bin 0 -> 3336 bytes
 .../test-abidiff-exit/test-fam1-report-1.txt  |    14 +
 .../test-abidiff-exit/test-fam1-report-2.txt  |     3 +
 .../test-abidiff-exit/test-fam1-report-3.txt  |    14 +
 .../test-abidiff-exit/test-fam1-report-4.txt  |     3 +
 .../test-abidiff-exit/test-fam1-report-5.txt  |    14 +
 .../test-fam1-suppr-1.abignore                |     4 +
 .../test-fam1-suppr-2.abignore                |     3 +
 .../test-fam1-suppr-3.abignore                |     5 +
 .../test-fam1-suppr-4.abignore                |     5 +
 tests/data/test-abidiff-exit/test-fam1-v0.c   |    10 +
 tests/data/test-abidiff-exit/test-fam1-v0.o   |   Bin 0 -> 3184 bytes
 tests/data/test-abidiff-exit/test-fam1-v1.c   |    11 +
 tests/data/test-abidiff-exit/test-fam1-v1.o   |   Bin 0 -> 3224 bytes
 .../test-abidiff-exit/test-fam2-report-1.txt  |    14 +
 tests/data/test-abidiff-exit/test-fam2-v0.c   |    10 +
 tests/data/test-abidiff-exit/test-fam2-v0.o   |   Bin 0 -> 3184 bytes
 tests/data/test-abidiff-exit/test-fam2-v1.c   |    12 +
 tests/data/test-abidiff-exit/test-fam2-v1.o   |   Bin 0 -> 3232 bytes
 tests/data/test-annotate/libtest23.so.abi     |   224 +-
 .../test-anonymous-members-0.o.abi            |    22 +-
 .../data/test-annotate/test15-pr18892.so.abi  |     8 +-
 ...st18-pr19037-libvtkRenderingLIC-6.1.so.abi |    54 +-
 ...19-pr19023-libtcmalloc_and_profiler.so.abi |    10 +-
 ...st20-pr19025-libvtkParallelCore-6.1.so.abi |     2 +-
 .../test43-PR22913-report-0.txt               |     4 +-
 ...merator-changes-enumerator-changes-1.suppr |     3 +
 ...merator-changes-enumerator-changes-2.suppr |     3 +
 ...merator-changes-enumerator-changes-3.suppr |     3 +
 ...merator-changes-enumerator-changes-4.suppr |     3 +
 ...merator-changes-enumerator-changes-5.suppr |     3 +
 ...or-changes-enumerator-changes-report-0.txt |    29 +
 ...or-changes-enumerator-changes-report-1.txt |    21 +
 ...or-changes-enumerator-changes-report-2.txt |    21 +
 ...or-changes-enumerator-changes-report-3.txt |    13 +
 ...or-changes-enumerator-changes-report-4.txt |    21 +
 ...or-changes-enumerator-changes-report-5.txt |     3 +
 ...enumerator-changes-enumerator-changes-v0.c |    37 +
 ...enumerator-changes-enumerator-changes-v0.o |   Bin 0 -> 3944 bytes
 ...enumerator-changes-enumerator-changes-v1.c |    40 +
 ...enumerator-changes-enumerator-changes-v1.o |   Bin 0 -> 4064 bytes
 .../test-read-dwarf/PR22122-libftdc.so.abi    | 12416 ++++++++--------
 tests/data/test-read-dwarf/libtest23.so.abi   |   216 +-
 .../test-read-dwarf/test-libandroid.so.abi    |    44 +-
 .../test-read-dwarf/test16-pr18904.so.abi     |  1816 +--
 ...st18-pr19037-libvtkRenderingLIC-6.1.so.abi |    40 +-
 .../test22-pr19097-libstdc++.so.6.0.17.so.abi |    60 +-
 tests/test-abidiff-exit.cc                    |   153 +
 tests/test-diff-suppr.cc                      |    60 +
 71 files changed, 9022 insertions(+), 7545 deletions(-)
 create mode 100644 tests/data/test-abidiff-exit/test-anon-types-report-1.txt
 create mode 100644 tests/data/test-abidiff-exit/test-anon-types-v0.c
 create mode 100644 tests/data/test-abidiff-exit/test-anon-types-v0.o
 create mode 100644 tests/data/test-abidiff-exit/test-anon-types-v1.c
 create mode 100644 tests/data/test-abidiff-exit/test-anon-types-v1.o
 create mode 100644 tests/data/test-abidiff-exit/test-anonymous-enums-change-report-v0.txt
 create mode 100644 tests/data/test-abidiff-exit/test-anonymous-enums-change-report-v1.txt
 create mode 100644 tests/data/test-abidiff-exit/test-anonymous-enums-change-v0.c
 create mode 100644 tests/data/test-abidiff-exit/test-anonymous-enums-change-v0.o
 create mode 100644 tests/data/test-abidiff-exit/test-anonymous-enums-change-v1.c
 create mode 100644 tests/data/test-abidiff-exit/test-anonymous-enums-change-v1.o
 create mode 100644 tests/data/test-abidiff-exit/test-fam1-report-1.txt
 create mode 100644 tests/data/test-abidiff-exit/test-fam1-report-2.txt
 create mode 100644 tests/data/test-abidiff-exit/test-fam1-report-3.txt
 create mode 100644 tests/data/test-abidiff-exit/test-fam1-report-4.txt
 create mode 100644 tests/data/test-abidiff-exit/test-fam1-report-5.txt
 create mode 100644 tests/data/test-abidiff-exit/test-fam1-suppr-1.abignore
 create mode 100644 tests/data/test-abidiff-exit/test-fam1-suppr-2.abignore
 create mode 100644 tests/data/test-abidiff-exit/test-fam1-suppr-3.abignore
 create mode 100644 tests/data/test-abidiff-exit/test-fam1-suppr-4.abignore
 create mode 100644 tests/data/test-abidiff-exit/test-fam1-v0.c
 create mode 100644 tests/data/test-abidiff-exit/test-fam1-v0.o
 create mode 100644 tests/data/test-abidiff-exit/test-fam1-v1.c
 create mode 100644 tests/data/test-abidiff-exit/test-fam1-v1.o
 create mode 100644 tests/data/test-abidiff-exit/test-fam2-report-1.txt
 create mode 100644 tests/data/test-abidiff-exit/test-fam2-v0.c
 create mode 100644 tests/data/test-abidiff-exit/test-fam2-v0.o
 create mode 100644 tests/data/test-abidiff-exit/test-fam2-v1.c
 create mode 100644 tests/data/test-abidiff-exit/test-fam2-v1.o
 create mode 100644 tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-1.suppr
 create mode 100644 tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-2.suppr
 create mode 100644 tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-3.suppr
 create mode 100644 tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-4.suppr
 create mode 100644 tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-5.suppr
 create mode 100644 tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-0.txt
 create mode 100644 tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-1.txt
 create mode 100644 tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-2.txt
 create mode 100644 tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-3.txt
 create mode 100644 tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-4.txt
 create mode 100644 tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-5.txt
 create mode 100644 tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-v0.c
 create mode 100644 tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-v0.o
 create mode 100644 tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-v1.c
 create mode 100644 tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-v1.o