From 6b31c548a114044c01436f04d2fe6da5a0bb59d8 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sun, 30 Oct 2022 12:40:56 +0100 Subject: [PATCH] ANDROID: fix up struct sk_buf ABI breakage In commit c378c479c517 ("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: c378c479c517 ("io_uring/af_unix: defer registered files gc to io_uring release") Signed-off-by: Greg Kroah-Hartman Change-Id: I9f99d85c95d78c688c4c9e88562863a1795e7b3a --- android/abi_gki_aarch64.xml | 1189 ++++++++++++++++++----------------- include/linux/skbuff.h | 17 +- 2 files changed, 622 insertions(+), 584 deletions(-) diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml index f32878041ead..c6377fd04f7a 100644 --- a/android/abi_gki_aarch64.xml +++ b/android/abi_gki_aarch64.xml @@ -13532,12 +13532,12 @@ - + - + - + @@ -14876,9 +14876,9 @@ - + - + @@ -18751,42 +18751,42 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -21819,12 +21819,12 @@ - + - + - + @@ -23337,7 +23337,7 @@ - + @@ -27089,12 +27089,12 @@ - + - + - + @@ -38364,6 +38364,20 @@ + + + + + + + + + + + + + + @@ -44932,6 +44946,17 @@ + + + + + + + + + + + @@ -48081,7 +48106,7 @@ - + @@ -51476,12 +51501,12 @@ - + - + - + @@ -58935,36 +58960,36 @@ - + - + - + - + - + - + - + - + - + - + - + @@ -62572,21 +62597,21 @@ - + - + - + - + - + - + @@ -63237,12 +63262,12 @@ - + - + - + @@ -70029,12 +70054,12 @@ - + - + - + @@ -71638,15 +71663,15 @@ - + - + - + - + @@ -74431,12 +74456,12 @@ - + - + - + @@ -75793,18 +75818,18 @@ - + - + - + - + - + @@ -77933,234 +77958,234 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -79783,12 +79808,12 @@ - + - + - + @@ -80915,12 +80940,12 @@ - + - + - + @@ -82157,12 +82182,12 @@ - + - + - + @@ -82749,73 +82774,73 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -83029,12 +83054,12 @@ - + - + - + @@ -86496,15 +86521,15 @@ - + - + - + - + @@ -98224,15 +98249,15 @@ - + - + - + - + @@ -100586,15 +100611,15 @@ - + - + - + - + @@ -103512,199 +103537,199 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -111691,15 +111716,15 @@ - + - + - + - + @@ -113983,33 +114008,33 @@ - + - + - + - + - + - + - + - + - + - + @@ -114702,15 +114727,15 @@ - + - + - + - + @@ -116050,10 +116075,10 @@ - - - - + + + + @@ -116188,16 +116213,16 @@ - - - - + + + + - - - + + + @@ -117166,10 +117191,10 @@ - - - - + + + + @@ -123149,8 +123174,8 @@ - - + + @@ -123520,9 +123545,9 @@ - - - + + + @@ -123808,8 +123833,8 @@ - - + + @@ -123969,8 +123994,8 @@ - - + + @@ -125569,13 +125594,13 @@ - - - + + + - - + + @@ -126036,9 +126061,9 @@ - - - + + + @@ -128607,10 +128632,10 @@ - - - - + + + + @@ -130034,9 +130059,9 @@ - - - + + + @@ -130088,9 +130113,9 @@ - - - + + + @@ -130528,8 +130553,8 @@ - - + + @@ -131089,7 +131114,7 @@ - + @@ -131116,12 +131141,12 @@ - - - - - - + + + + + + @@ -132350,28 +132375,28 @@ - - - + + + - - + + - - + + - - + + - - - - - + + + + + @@ -132404,9 +132429,9 @@ - - - + + + @@ -132424,21 +132449,21 @@ - - - - - + + + + + - - - + + + - - - + + + @@ -132470,9 +132495,9 @@ - - - + + + @@ -134314,9 +134339,9 @@ - - - + + + @@ -135009,103 +135034,103 @@ - - + + - - - + + + - - - + + + - - + + - - + + - - - + + + - - - - - + + + + + - - - - + + + + - - - + + + - - + + - - + + - - - - + + + + - - - + + + - - + + - - - + + + - - - + + + - - + + - - - - - + + + + + - - - - + + + + - - + + @@ -135117,48 +135142,48 @@ - - - + + + - - + + - - - - - - + + + + + + - - - - + + + + - - + + - - + + - - + + - - - + + + @@ -137208,9 +137233,9 @@ - - - + + + @@ -137528,9 +137553,9 @@ - - - + + + @@ -137577,10 +137602,10 @@ - - - - + + + + @@ -139222,14 +139247,14 @@ - - - - + + + + - - + + @@ -139373,7 +139398,7 @@ - + @@ -141634,12 +141659,12 @@ - - + + - - + + @@ -141654,8 +141679,8 @@ - - + + @@ -142531,27 +142556,27 @@ - - + + - - - + + + - - - - + + + + - - + + @@ -142560,11 +142585,11 @@ - - - - - + + + + + @@ -142573,9 +142598,9 @@ - - - + + + @@ -143653,42 +143678,42 @@ - - + + - - + + - - + + - - + + - - - + + + - - + + - - + + - - + + @@ -143743,34 +143768,34 @@ - - + + - - + + - - - + + + - - - + + + - - + + - - - - - - + + + + + + @@ -144199,7 +144224,7 @@ - + @@ -144762,8 +144787,8 @@ - - + + @@ -144780,8 +144805,8 @@ - - + + @@ -144810,8 +144835,8 @@ - - + + @@ -144896,10 +144921,10 @@ - + - + @@ -146218,14 +146243,14 @@ - - - - - - - - + + + + + + + + @@ -148263,9 +148288,9 @@ - - - + + + @@ -148277,8 +148302,8 @@ - - + + @@ -148767,28 +148792,28 @@ - - - - + + + + - - - + + + - - - - + + + + - - - - - + + + + + @@ -148799,38 +148824,38 @@ - - - + + + - - + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - + + @@ -148848,9 +148873,9 @@ - - - + + + @@ -148873,9 +148898,9 @@ - - - + + + @@ -148925,8 +148950,8 @@ - - + + diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 9c892c347887..59a6bf66421f 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -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. */