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

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
parent b80b149ef7
commit b0c456e92b

View file

@ -22,6 +22,7 @@
#include <linux/error-injection.h>
#include <linux/tracepoint-defs.h>
#include <linux/cfi.h>
#include <linux/android_kabi.h>
#include <linux/percpu.h>
#include <asm/module.h>
@ -489,6 +490,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 {}