From d8e7ccc0032f8ce0d10a5ed589eb3088fa361d2c Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 22 Apr 2020 15:47:34 +0200 Subject: [PATCH] ANDROID: GKI: dentry: add Android ABI padding to some structures Try to mitigate potential future driver core api changes by adding a padding to struct dentry and struct dentry_operations. Based on a change made to the RHEL/CENTOS 8 kernel. Bug: 151154716 Signed-off-by: Greg Kroah-Hartman Change-Id: Idde3c6e99bd4af3a91ba115b8ec148e3e1cdd4a9 --- include/linux/dcache.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 84be671d8131..854e52c44948 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -14,6 +14,7 @@ #include #include #include +#include struct path; struct file; @@ -111,6 +112,9 @@ struct dentry { struct hlist_bl_node d_in_lookup_hash; /* only for in-lookup ones */ struct rcu_head d_rcu; } d_u; + + ANDROID_KABI_RESERVE(1); + ANDROID_KABI_RESERVE(2); } __randomize_layout; /* @@ -141,6 +145,10 @@ struct dentry_operations { int (*d_manage)(const struct path *, bool); struct dentry *(*d_real)(struct dentry *, const struct inode *); int (*d_canonical_path)(const struct path *, struct path *); + ANDROID_KABI_RESERVE(1); + ANDROID_KABI_RESERVE(2); + ANDROID_KABI_RESERVE(3); + ANDROID_KABI_RESERVE(4); } ____cacheline_aligned; /*