From c6f7a0ebd8fc4ba7ded80a9cb69dd1015e1075ee Mon Sep 17 00:00:00 2001 From: Todd Kjos Date: Wed, 21 Sep 2022 21:48:21 +0000 Subject: [PATCH] ANDROID: make sure all types for hooks are defined in KMI There are 2 remaining types directly referenced by vendor hooks that were not fully-defined in the KMI: struct gic_chip_data : defined in include/linux/irqchip/arm-gic-v3.h struct swap_slots_cache : defined include/linux/swap_slots.h libabigail is not finding definitions based on the instantiation of the hooks, so force them to be defined by defining dummy exported symbols. Update XML with the now visible definitions Bug: 233047575 Signed-off-by: Todd Kjos Change-Id: I521b2a596e1d7361d0f44a87ffe330186896b9f8 --- android/abi_gki_aarch64.xml | 609 +++++++++++------------- android/abi_gki_aarch64_type_visibility | 2 + drivers/android/vendor_hooks.c | 13 + 3 files changed, 287 insertions(+), 337 deletions(-) diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml index 52fedee14385..5fe18ac581fc 100644 --- a/android/abi_gki_aarch64.xml +++ b/android/abi_gki_aarch64.xml @@ -6198,6 +6198,9 @@ + + + @@ -7344,17 +7347,7 @@ - - - - - - - - - - - + @@ -9471,14 +9464,6 @@ - - - - - - - - @@ -10765,11 +10750,6 @@ - - - - - @@ -15138,89 +15118,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -15329,11 +15226,6 @@ - - - - - @@ -15757,7 +15649,6 @@ - @@ -17043,14 +16934,6 @@ - - - - - - - - @@ -18598,7 +18481,6 @@ - @@ -18913,7 +18795,6 @@ - @@ -19766,6 +19647,29 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -21274,10 +21178,6 @@ - - - - @@ -21769,11 +21669,6 @@ - - - - - @@ -24738,14 +24633,6 @@ - - - - - - - - @@ -25018,10 +24905,6 @@ - - - - @@ -25299,11 +25182,6 @@ - - - - - @@ -25553,6 +25431,7 @@ + @@ -25963,7 +25842,6 @@ - @@ -31960,7 +31838,6 @@ - @@ -32340,7 +32217,6 @@ - @@ -32645,7 +32521,41 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -35157,10 +35067,14 @@ + + + + @@ -40420,26 +40334,6 @@ - - - - - - - - - - - - - - - - - - - - @@ -43997,6 +43891,7 @@ + @@ -44156,9 +44051,59 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + @@ -45519,6 +45464,7 @@ + @@ -48449,6 +48395,7 @@ + @@ -50722,7 +50669,6 @@ - @@ -53189,7 +53135,6 @@ - @@ -53332,6 +53277,13 @@ + + + + + + + @@ -53954,6 +53906,7 @@ + @@ -54119,17 +54072,6 @@ - - - - - - - - - - - @@ -56656,6 +56598,7 @@ + @@ -60176,6 +60119,7 @@ + @@ -61725,11 +61669,6 @@ - - - - - @@ -61804,20 +61743,6 @@ - - - - - - - - - - - - - - @@ -65906,6 +65831,13 @@ + + + + + + + @@ -67840,14 +67772,7 @@ - - - - - - - - + @@ -70848,7 +70773,6 @@ - @@ -72710,12 +72634,6 @@ - - - - - - @@ -73432,6 +73350,7 @@ + @@ -73843,7 +73762,32 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -78497,6 +78441,7 @@ + @@ -78881,17 +78826,6 @@ - - - - - - - - - - - @@ -79368,6 +79302,7 @@ + @@ -83637,6 +83572,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -85385,26 +85352,6 @@ - - - - - - - - - - - - - - - - - - - - @@ -90350,7 +90297,6 @@ - @@ -90441,6 +90387,7 @@ + @@ -91046,6 +90993,7 @@ + @@ -92526,6 +92474,7 @@ + @@ -92949,7 +92898,6 @@ - @@ -94454,6 +94402,7 @@ + @@ -94910,6 +94859,7 @@ + @@ -101851,26 +101801,6 @@ - - - - - - - - - - - - - - - - - - - - @@ -102113,6 +102043,12 @@ + + + + + + @@ -103128,7 +103064,6 @@ - @@ -105040,6 +104975,7 @@ + @@ -109026,11 +108962,6 @@ - - - - - @@ -110349,6 +110280,7 @@ + @@ -115395,6 +115327,9 @@ + + + @@ -115423,11 +115358,11 @@ - - - - - + + + + + @@ -116057,9 +115992,9 @@ - - - + + + @@ -116112,9 +116047,9 @@ - - - + + + @@ -116625,9 +116560,9 @@ - - - + + + @@ -118558,18 +118493,18 @@ - - - - - - + + + + + + - - - - + + + + @@ -119137,9 +119072,9 @@ - - - + + + @@ -119983,8 +119918,8 @@ - - + + @@ -120092,7 +120027,7 @@ - + @@ -120693,9 +120628,9 @@ - - - + + + @@ -120819,9 +120754,9 @@ - - - + + + @@ -129979,14 +129914,14 @@ - - - + + + - - - + + + @@ -130934,8 +130869,8 @@ - - + + @@ -136741,14 +136676,14 @@ - - - - + + + + - - + + @@ -139321,8 +139256,8 @@ - - + + @@ -141706,11 +141641,11 @@ - + - - + + diff --git a/android/abi_gki_aarch64_type_visibility b/android/abi_gki_aarch64_type_visibility index 88a3c8813346..705bf5574222 100644 --- a/android/abi_gki_aarch64_type_visibility +++ b/android/abi_gki_aarch64_type_visibility @@ -2,3 +2,5 @@ # for type visibility GKI_struct_selinux_state + GKI_struct_gic_chip_data + GKI_struct_swap_slots_cache diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 1ea002e1f230..c9b54b2fa509 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -456,3 +456,16 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_check_page_look_around_ref); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_look_around); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_look_around_migrate_page); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_test_clear_look_around_ref); + +/* + * For type visibility + */ +#ifdef CONFIG_ARM64 +#include +const struct gic_chip_data *GKI_struct_gic_chip_data; +EXPORT_SYMBOL_GPL(GKI_struct_gic_chip_data); +#endif + +#include +const struct swap_slots_cache *GKI_struct_swap_slots_cache; +EXPORT_SYMBOL_GPL(GKI_struct_swap_slots_cache);