Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a4e5b525 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

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: default avatarGreg Kroah-Hartman <gregkh@google.com>
Change-Id: Idde3c6e99bd4af3a91ba115b8ec148e3e1cdd4a9
parent de9d4f1b
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
#include <linux/lockref.h>
#include <linux/stringhash.h>
#include <linux/wait.h>
#include <linux/android_kabi.h>

struct path;
struct vfsmount;
@@ -117,6 +118,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;

/*
@@ -147,6 +151,10 @@ struct dentry_operations {
	int (*d_manage)(const struct path *, bool);
	struct dentry *(*d_real)(struct dentry *, const struct inode *);
	void (*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;

/*