From 801c9e6233041fa71c42163a09ad7d2c868736af Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 10 Mar 2020 18:41:29 +0100 Subject: [PATCH] ANDROID: GKI: module.h: add Android ABI padding to some structures Try to mitigate potential future driver core api changes by adding a padding to struct module. Based on a patch from Michal Marek from the SLES kernel 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 module at module.h:348:1' changed: type size hasn't changed 4 data member insertions: 'u64 module::android_kabi_reserved1', at offset 6720 (in bits) at module.h:518:1 'u64 module::android_kabi_reserved2', at offset 6784 (in bits) at module.h:519:1 'u64 module::android_kabi_reserved3', at offset 6848 (in bits) at module.h:520:1 'u64 module::android_kabi_reserved4', at offset 6912 (in bits) at module.h:521:1 Bug: 151154716 Signed-off-by: Greg Kroah-Hartman Change-Id: I2a764e9eac88f20e50d192112235da6d2f0f83bc --- include/linux/module.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/module.h b/include/linux/module.h index 62544b50e1c1..fee1cf4086dc 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -549,6 +550,10 @@ struct module { struct error_injection_entry *ei_funcs; unsigned int num_ei_funcs; #endif + ANDROID_KABI_RESERVE(1); + ANDROID_KABI_RESERVE(2); + ANDROID_KABI_RESERVE(3); + ANDROID_KABI_RESERVE(4); } ____cacheline_aligned __randomize_layout; #ifndef MODULE_ARCH_INIT #define MODULE_ARCH_INIT {}