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 committed by Carlos Llamas
parent 1c5cd2e4ad
commit 05a42c34b2
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/android_vendor.h>
#include <linux/sched/idle.h>
@ -155,6 +156,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

@ -7,6 +7,7 @@
#include <linux/percpu_counter.h>
#include <linux/refcount.h>
#include <linux/ratelimit.h>
#include <linux/android_kabi.h>
/*
* Some day this will be a full-fledged user tracking system..
@ -35,6 +36,9 @@ struct user_struct {
/* Miscellaneous per-user rate limit */
struct ratelimit_state ratelimit;
ANDROID_OEM_DATA_ARRAY(1, 2);
ANDROID_KABI_RESERVE(1);
ANDROID_KABI_RESERVE(2);
};
extern int uids_sysfs_init(void);