ANDROID: fix up struct sk_buf ABI breakage

In commit 813d8fe5d3 ("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.

type 'struct sk_buff' changed
  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 { }; }' was added
  member 'u64 android_kabi_reserved1' was removed

Bug: 161946584
Fixes: 813d8fe5d3 ("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 2d19e77e73
commit 16d4484281
2 changed files with 4704 additions and 4828 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -915,7 +915,6 @@ struct sk_buff {
__u8 decrypted:1;
#endif
__u8 slow_gro:1;
__u8 scm_io_uring:1;
#ifdef CONFIG_NET_SCHED
__u16 tc_index; /* traffic control index */
@@ -970,7 +969,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. */