From e2aed161fc26f9e03ffceec742d85800df22b772 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 8 Dec 2021 17:56:22 +0100 Subject: [PATCH] ANDROID: GKI: fix up abi breakage in fib_rules.h Commit 209d35ee34e2 ("ipv6: fix memory leak in fib6_rule_suppress") added a new variable to the fips_rules_ops.suppress() callback function pointer in order to properly handle a memory leak. This change is not a real ABI breakage, but since the function pointer structure is included in other structures within the networking stack, and they all propagate up to structures that are tracked, libabigail properly detects this change. There is no problem making the change, as the only providers of these callback functions are in the kernel already, and have been fixed up in this commit, and the variable size does not change (function pointers are function pointers), so paper over the CRC change with a judicious ifdef __GENKSYMS__ hack and update the .xml file to properly reflect the updates change: Leaf changes summary: 1 artifact changed Changed leaf types summary: 1 leaf type 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 fib_rules_ops at fib_rules.h:60:1' changed: type size hasn't changed there are data member changes: type 'typedef bool (fib_rule*, fib_lookup_arg*)*' of 'fib_rules_ops::suppress' changed: pointer type changed from: 'typedef bool (fib_rule*, fib_lookup_arg*)*' to: 'typedef bool (fib_rule*, int, fib_lookup_arg*)*' 2448 impacted interfaces Bug: 161946584 Change-Id: I5fd2fcece8f57536369c51e438bd2739631b34e3 Signed-off-by: Greg Kroah-Hartman --- android/abi_gki_aarch64.xml | 678 ++++++++++++++++++------------------ include/net/fib_rules.h | 7 + 2 files changed, 350 insertions(+), 335 deletions(-) diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml index 70cce623bbad..f87e934ed06d 100755 --- a/android/abi_gki_aarch64.xml +++ b/android/abi_gki_aarch64.xml @@ -6742,15 +6742,15 @@ - + - + - + - + @@ -30722,6 +30722,12 @@ + + + + + + @@ -33956,24 +33962,24 @@ - + - + - + - + - + - + - + @@ -48101,7 +48107,6 @@ - @@ -62137,11 +62142,6 @@ - - - - - @@ -65031,12 +65031,12 @@ - + - + - + @@ -68133,6 +68133,7 @@ + @@ -70783,7 +70784,14 @@ - + + + + + + + + @@ -99308,46 +99316,46 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -113342,10 +113350,10 @@ - - - - + + + + @@ -113396,9 +113404,9 @@ - - - + + + @@ -113647,8 +113655,8 @@ - - + + @@ -114049,12 +114057,12 @@ - - + + - - + + @@ -114072,8 +114080,8 @@ - - + + @@ -117632,13 +117640,13 @@ - - - - - - - + + + + + + + @@ -119814,9 +119822,9 @@ - - - + + + @@ -119824,13 +119832,13 @@ - - - - + + + + - + @@ -119869,45 +119877,45 @@ - - + + - - + + - + - - - + + + - - + + - - + + - - + + - - + + - - - + + + @@ -119924,25 +119932,25 @@ - - + + - - + + - - - + + + - - + + - - + + @@ -120825,16 +120833,16 @@ - - - - + + + + - - - - + + + + @@ -120869,9 +120877,9 @@ - - - + + + @@ -120898,9 +120906,9 @@ - - - + + + @@ -121240,19 +121248,19 @@ - - + + - - - - + + + + - - - + + + @@ -126020,8 +126028,8 @@ - - + + @@ -126191,8 +126199,8 @@ - - + + @@ -128118,8 +128126,8 @@ - - + + @@ -129017,11 +129025,11 @@ - - - - - + + + + + @@ -130977,9 +130985,9 @@ - - - + + + @@ -130987,22 +130995,22 @@ - - + + - - - + + + - - - + + + - - + + @@ -131033,9 +131041,9 @@ - - - + + + @@ -131043,39 +131051,39 @@ - - + + - - - - - - - - - - - - - + - - - + + + + + + + + + + - - - - - - + + + + + + + + + + + @@ -131088,43 +131096,43 @@ - - - - + + + + - - + + - - - + + + - - + + - - - - + + + + - - - + + + - - - + + + @@ -131144,31 +131152,31 @@ - - - - - + + + + + - - + + - - + + - - + + - - + + - - + + @@ -131185,13 +131193,13 @@ - - - + + + - - + + @@ -134606,8 +134614,8 @@ - - + + @@ -134705,12 +134713,12 @@ - - + + - - + + @@ -135674,7 +135682,7 @@ - + @@ -136578,36 +136586,36 @@ - - - - + + + + - - - - - + + + + + - - - + + + - - - - + + + + - - + + - - + + @@ -136643,9 +136651,9 @@ - - - + + + @@ -139012,7 +139020,7 @@ - + @@ -139290,16 +139298,16 @@ - - + + - - + + @@ -139312,32 +139320,32 @@ - - - + + + - - + + - - + + - - + + - - - - - + + + + + - - + + @@ -140170,21 +140178,21 @@ - - - + + + - - - + + + - - - - - + + + + + @@ -140200,71 +140208,71 @@ - - + + - - - + + + - - - + + + - - - - - - + + + + + + - - - - - - + + + + + + - - + + - - - + + + - - - + + + - - - - - - - + + + + + + + - - - + + + - - - + + + - - + + @@ -140601,8 +140609,8 @@ - - + + @@ -140617,21 +140625,21 @@ - - + + - - + + - - - + + + @@ -143320,8 +143328,8 @@ - - + + @@ -143341,12 +143349,12 @@ - - - - - - + + + + + + @@ -143396,9 +143404,9 @@ - - - + + + diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h index bd07484ab9dd..a3bd369677e2 100644 --- a/include/net/fib_rules.h +++ b/include/net/fib_rules.h @@ -69,7 +69,14 @@ struct fib_rules_ops { int (*action)(struct fib_rule *, struct flowi *, int, struct fib_lookup_arg *); + /* __GENKSYMS__ hack to preserve the abi change that happened in + * cdef485217d3 ("ipv6: fix memory leak in fib6_rule_suppress") + */ +#ifdef __GENKSYMS__ + bool (*suppress)(struct fib_rule *, +#else bool (*suppress)(struct fib_rule *, int, +#endif struct fib_lookup_arg *); int (*match)(struct fib_rule *, struct flowi *, int);