From dd9195d6df75c74e7f99c81e45cb008771144bbf Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 10 Mar 2020 18:41:10 +0100 Subject: [PATCH] ANDROID: GKI: mount.h: add Android ABI padding to some structures Try to mitigate potential future driver core api changes by adding a padding to struct vfsmount. Based on a patch from Michal Marek from the SLES kernel Leaf changes summary: 1 artifact changed Changed leaf types summary: 1 leaf type changed Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable 'struct vfsmount at mount.h:68:1' changed: type size changed from 256 to 512 (in bits) 4 data member insertions: 'u64 vfsmount::android_kabi_reserved1', at offset 192 (in bits) at mount.h:73:1 'u64 vfsmount::android_kabi_reserved2', at offset 256 (in bits) at mount.h:74:1 'u64 vfsmount::android_kabi_reserved3', at offset 320 (in bits) at mount.h:75:1 'u64 vfsmount::android_kabi_reserved4', at offset 384 (in bits) at mount.h:76:1 there are data member changes: 'void* vfsmount::data' offset changed from 192 to 448 (in bits) (by +256 bits) 8 impacted interfaces: function vfsmount* mntget(vfsmount*) function int notify_change2(vfsmount*, dentry*, iattr*, inode**) function int vfs_create2(vfsmount*, inode*, dentry*, umode_t, bool) function int vfs_mkdir2(vfsmount*, inode*, dentry*, umode_t) function int vfs_path_lookup(dentry*, vfsmount*, const char*, unsigned int, path*) function int vfs_rename2(vfsmount*, inode*, dentry*, inode*, dentry*, inode**, unsigned int) function int vfs_rmdir2(vfsmount*, inode*, dentry*) function int vfs_unlink2(vfsmount*, inode*, dentry*, inode**) Bug: 151154716 Signed-off-by: Greg Kroah-Hartman Change-Id: I9ce1b63f05c90af168eeea1312ac88d3cc5cfdf3 --- include/linux/mount.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/mount.h b/include/linux/mount.h index aaf343b38671..2f64e66f9c8c 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h @@ -16,6 +16,7 @@ #include #include #include +#include struct super_block; struct vfsmount; @@ -72,6 +73,11 @@ struct vfsmount { struct dentry *mnt_root; /* root of the mounted tree */ struct super_block *mnt_sb; /* pointer to superblock */ int mnt_flags; + + ANDROID_KABI_RESERVE(1); + ANDROID_KABI_RESERVE(2); + ANDROID_KABI_RESERVE(3); + ANDROID_KABI_RESERVE(4); } __randomize_layout; struct file; /* forward dec */