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 <mmarek@suse.cz> 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 <gregkh@google.com>
Change-Id: I2a764e9eac88f20e50d192112235da6d2f0f83bc
This commit is contained in:
Greg Kroah-Hartman 2020-03-10 18:41:29 +01:00 committed by Carlos Llamas
parent 15e9bd7cf2
commit 801c9e6233

View File

@ -27,6 +27,7 @@
#include <linux/tracepoint-defs.h>
#include <linux/srcu.h>
#include <linux/static_call_types.h>
#include <linux/android_kabi.h>
#include <linux/percpu.h>
#include <asm/module.h>
@ -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 {}