ANDROID: GKI: sched: add Android ABI padding to some structures

Try to mitigate potential future driver core api changes by adding a
padding to struct user_struct and struct sched_domain.

Based on a change made to the RHEL/CENTOS 8 kernel.

Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ie8f685122767b690a116193aefd8c5e3b6ef8f17
This commit is contained in:
Greg Kroah-Hartman
2020-05-02 09:35:50 +02:00
parent 87839d9b16
commit c89d039e6b
2 changed files with 9 additions and 0 deletions

View File

@@ -3,6 +3,7 @@
#define _LINUX_SCHED_TOPOLOGY_H
#include <linux/topology.h>
#include <linux/android_kabi.h>
#include <linux/sched/idle.h>
@@ -143,6 +144,10 @@ struct sched_domain {
struct sched_domain_shared *shared;
unsigned int span_weight;
ANDROID_KABI_RESERVE(1);
ANDROID_KABI_RESERVE(2);
/*
* Span of all CPUs in this domain.
*

View File

@@ -6,6 +6,7 @@
#include <linux/atomic.h>
#include <linux/refcount.h>
#include <linux/ratelimit.h>
#include <linux/android_kabi.h>
struct key;
@@ -46,6 +47,9 @@ struct user_struct {
/* Miscellaneous per-user rate limit */
struct ratelimit_state ratelimit;
ANDROID_KABI_RESERVE(1);
ANDROID_KABI_RESERVE(2);
};
extern int uids_sysfs_init(void);