ANDROID: fix up struct sk_buf ABI breakage

In commit c378c479c5 ("io_uring/af_unix: defer registered files gc to
io_uring release"), a new field is added to struct sk_buf.  We need that
new field to resolve real problems, so move it to the padded area that
we had reserved for these types of issues.

Update the .xml file to handle the change in fields for the padding
structure, which is an abi-safe change:

Leaf changes summary: 1 artifact changed (1 filtered out)
Changed leaf types summary: 1 (1 filtered out) leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

'struct sk_buff at skbuff.h:717:1' changed:
  type size hasn't changed
  there are data member changes:
    data member u64 android_kabi_reserved1 at offset 1472 (in bits) became anonymous data member 'union {struct {__u8 scm_io_uring; __u8 android_kabi_reserved1_padding1; __u16 android_kabi_reserved1_padding2; __u32 android_kabi_reserved1_padding3;}; struct {u64 android_kabi_reserved1;}; union {};}'
  169 impacted interfaces

Bug: 161946584
Fixes: c378c479c5 ("io_uring/af_unix: defer registered files gc to io_uring release")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I9f99d85c95d78c688c4c9e88562863a1795e7b3a
This commit is contained in:
Greg Kroah-Hartman
2022-10-30 12:40:56 +01:00
parent bd66e91ad2
commit 6b31c548a1
2 changed files with 622 additions and 584 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -863,7 +863,6 @@ struct sk_buff {
#ifdef CONFIG_TLS_DEVICE
__u8 decrypted:1;
#endif
__u8 scm_io_uring:1;
#ifdef CONFIG_NET_SCHED
__u16 tc_index; /* traffic control index */
@@ -914,7 +913,21 @@ struct sk_buff {
__u32 headers_end[0];
/* public: */
ANDROID_KABI_RESERVE(1);
/* Android KABI preservation.
*
* "open coded" version of ANDROID_KABI_USE() to pack more
* fields/variables into the space that we have.
*
* scm_io_uring is from 04df9719df18 ("io_uring/af_unix: defer
* registered files gc to io_uring release")
*/
_ANDROID_KABI_REPLACE(_ANDROID_KABI_RESERVE(1),
struct {
__u8 scm_io_uring:1;
__u8 android_kabi_reserved1_padding1;
__u16 android_kabi_reserved1_padding2;
__u32 android_kabi_reserved1_padding3;
});
ANDROID_KABI_RESERVE(2);
/* These elements must be at the end, see alloc_skb() for details. */