From b32c2be88715593ecf8c3d9ae117735bb0982059 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 28 Jan 2021 12:50:34 +0100 Subject: [PATCH] ANDROID: GKI: api preservation of struct inet_connection_sock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit f7020c437e13 ("tcp: fix TCP_USER_TIMEOUT with zero window") added an additional variable to the struct inet_connection_sock structure. To work around that, let's keep the same exact size for this internal structure (no one outside of the networking core sees it), by adding a GENKSYMS build barrier and making the enabled variable only be 1 bit instead of a full integer (change is landing upstream at the moment, so this change is ok to do.) However, libabigal knows we are being too smart for our britches and rightfully complains about the shenanigans happening, with the following report: Functions changes summary: 0 Removed, 2 Changed (1668 filtered out), 0 Added functions Variables changes summary: 0 Removed, 0 Changed (19 filtered out), 0 Added variables 2 functions with some indirect sub-type change: [C] 'function int inet_sk_diag_fill(sock*, inet_connection_sock*, sk_buff*, const inet_diag_req_v2*, user_namespace*, unsigned int, unsigned int, unsigned short int, const nlmsghdr*, bool)' at inet_diag.h:39:1 has some indirect sub-type changes: parameter 2 of type 'inet_connection_sock*' has sub-type changes: in pointed to type 'struct inet_connection_sock' at inet_connection_sock.h:89:1: type size hasn't changed 1 data member insertion: 'u32 inet_connection_sock::icsk_probes_tstamp', at offset 11008 (in bits) at inet_connection_sock.h:151:1 1 data member changes (7 filtered): type of 'struct {int enabled; int search_high; int search_low; int probe_size; u32 probe_timestamp;} inet_connection_sock::icsk_mtup' changed: type size changed from 160 to 128 (in bits) 5 data member changes: 'int enabled' offset changed from 0 to 31 (in bits) (by +31 bits) 'int search_high' offset changed from 32 to 0 (in bits) (by -32 bits) 'int search_low' offset changed from 64 to 32 (in bits) (by -32 bits) 'int probe_size' offset changed from 96 to 64 (in bits) (by -32 bits) 'u32 probe_timestamp' offset changed from 128 to 96 (in bits) (by -32 bits) [C] 'function unsigned int tcp_slow_start(tcp_sock*, unsigned int)' at tcp.h:1090:1 has some indirect sub-type changes: parameter 1 of type 'tcp_sock*' has sub-type changes: in pointed to type 'struct tcp_sock' at tcp.h:138:1: type size hasn't changed 1 data member changes (1 filtered): 'inet_connection_sock tcp_sock::inet_conn' has *some* difference - please report as a bug This internal structure is never touched by any code outside of the networking core, so it is "safe" to change fields, but not the size as the structure is embedded in other things that touch the abi. With this change, update the .xml file to reflect this new change. Cc: Eric Dumazet Cc: Maciej Żenczykowski Cc: Matthias Männich Bug: 161946584 Signed-off-by: Greg Kroah-Hartman Change-Id: I3f884413d44ab83c676bee2855e235ea8cc7f4b0 --- android/abi_gki_aarch64.xml | 750 ++++++++++++++++------------- include/net/inet_connection_sock.h | 14 + 2 files changed, 427 insertions(+), 337 deletions(-) diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml index 4d262a4fe968..7672b6916939 100644 --- a/android/abi_gki_aarch64.xml +++ b/android/abi_gki_aarch64.xml @@ -33092,7 +33092,7 @@ - + @@ -33101,7 +33101,7 @@ - + @@ -33125,10 +33125,10 @@ - + - + @@ -33170,8 +33170,9 @@ - - + + + @@ -33190,7 +33191,73 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -33205,8 +33272,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -33814,7 +33910,7 @@ - + @@ -34152,7 +34248,7 @@ - + @@ -44342,102 +44438,102 @@ - - + + - - + + - - - - - + + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - - - - - + + + + + + - - - + + + - - - - + + + + - - - - - + + + + + - - - + + + - - - + + + - - - + + + - - - + + + @@ -69600,7 +69696,7 @@ - + @@ -69612,7 +69708,7 @@ - + @@ -69702,8 +69798,6 @@ - - @@ -76298,41 +76392,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -99466,41 +99526,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -106568,7 +106594,7 @@ - + @@ -130212,9 +130238,9 @@ - - - + + + @@ -130562,6 +130588,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -130634,6 +130695,7 @@ + @@ -130817,7 +130879,7 @@ - + @@ -137625,7 +137687,6 @@ - @@ -137640,8 +137701,6 @@ - - @@ -137674,6 +137733,9 @@ + + + @@ -156825,6 +156887,23 @@ + + + + + + + + + + + + + + + + + @@ -157823,28 +157902,28 @@ - - + + - - - + + + - - + + - - - - + + + + - - - + + + @@ -158086,106 +158165,106 @@ - - - - + + + + - - - - - + + + + + - - + + - - - + + + - - - + + + - - - + + + - - - - - + + + + + - - - - + + + + - - - + + + - - - - - + + + + + - - + + - - - + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - + + + + - - - + + + - - + + @@ -159487,90 +159566,93 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + - + - + @@ -159751,50 +159833,50 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + + + + - + - - - - + @@ -160640,90 +160722,93 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + - + - + @@ -161355,50 +161440,50 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + + + + - + - - - - + @@ -167722,17 +167807,6 @@ - - - - - - - - - - - @@ -178803,6 +178877,8 @@ + + diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h index 6c8f8e5e33c3..e3a7afd2d30a 100644 --- a/include/net/inet_connection_sock.h +++ b/include/net/inet_connection_sock.h @@ -123,6 +123,7 @@ struct inet_connection_sock { __u16 last_seg_size; /* Size of last incoming segment */ __u16 rcv_mss; /* MSS used for delayed ACK decisions */ } icsk_ack; +#ifdef __GENKSYMS__ struct { int enabled; @@ -133,9 +134,22 @@ struct inet_connection_sock { /* Information on the current probe. */ int probe_size; + u32 probe_timestamp; + } icsk_mtup; +#else + struct { + /* Range of MTUs to search */ + int search_high; + int search_low; + + /* Information on the current probe. */ + int enabled:1; + int probe_size:31; + u32 probe_timestamp; } icsk_mtup; u32 icsk_probes_tstamp; +#endif u32 icsk_user_timeout; u64 icsk_ca_priv[104 / sizeof(u64)];