From: John Moon <quic_johmoo@quicinc.com>
To: Dodji Seketeli <dodji@seketeli.org>
Cc: Satya Durga Srinivasu Prabhala <quic_satyap@quicinc.com>,
Trilok Soni <quic_tsoni@quicinc.com>, <libabigail@sourceware.org>
Subject: abidiff handling of migrations to flex arrays
Date: Wed, 25 Oct 2023 16:31:47 -0700 [thread overview]
Message-ID: <073a984e-e30d-4de2-9c6f-e3d39a58da13@quicinc.com> (raw)
Hi Dodji,
I was reviewing notes that Greg KH gave me in the last revision of the
script.
https://lore.kernel.org/lkml/2023041136-donator-faceplate-5f91@gregkh/
Notably, this section:
>> Addition/use of flex arrays:
>> - include/uapi/linux/rseq.h (f7b01bb0b57f)
>> - include/uapi/scsi/scsi_bsg_mpi3mr.h (c6f2e6b6eaaf)
>
> That is not a breakage, that's a tool problem.
>
>> Type change:
>> - include/uapi/scsi/scsi_bsg_ufs.h (3f5145a615238)
>
> Again, not a real breakage, size is still the same.
>
>> Additions into existing struct:
>> - include/uapi/drm/amdgpu_drm.h (b299221faf9b)
>> - include/uapi/linux/perf_event.h (09519ec3b19e)
>> - include/uapi/linux/virtio_blk.h (95bfec41bd3d)
>
> Adding data to the end of a structure is a well-known way to extend the
> api, in SOME instances if it is used properly.
>
> So again, not a break.
If we look at these examples, we can now effectively suppress all of
them except for include/uapi/scsi/scsi_bsg_mpi3mr.h (c6f2e6b6eaaf).
https://github.com/torvalds/linux/commit/c6f2e6b6eaaf883df482cb94f302acad9b80a2a4
Basically, the change takes a struct which ends in a "fake flex array"
and turns it into a real flex array:
struct foo {
int x;
int y;
int end[1];
};
...
struct foo {
int x;
int y;
int end[];
};
abidiff flags this change with:
[C] 'struct foo' changed:
type size changed from 96 to 64 (in bits)
1 data member change:
type of 'int end[1]' changed:
type name changed from 'int[1]' to 'int[]'
array type size changed from 32 to 'unknown'
array type subrange 1 changed length from 1 to 'unknown'
These sorts of changes are all over the kernel since they recently
decided to move to using flex arrays and are continuing to make updates
similar to this one.
I tried looking through the docs and couldn't find a way to suppress
this kind of change. Do you know of a way to do it using the existing
suppressions? I think semantically we're trying to suppress "changes
which take an array of size 1 and turn it into a flex array".
Thanks,
John
next reply other threads:[~2023-10-25 23:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-25 23:31 John Moon [this message]
2023-10-27 10:14 ` Dodji Seketeli
2023-10-27 17:51 ` 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=073a984e-e30d-4de2-9c6f-e3d39a58da13@quicinc.com \
--to=quic_johmoo@quicinc.com \
--cc=dodji@seketeli.org \
--cc=libabigail@sourceware.org \
--cc=quic_satyap@quicinc.com \
--cc=quic_tsoni@quicinc.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).