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 <mmarek@suse.cz> 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 <gregkh@google.com>
Change-Id: I9ce1b63f05c90af168eeea1312ac88d3cc5cfdf3
This commit is contained in:
Greg Kroah-Hartman 2020-03-10 18:41:10 +01:00 committed by Carlos Llamas
parent 98042d19ad
commit da717c3ce1
1 changed files with 6 additions and 0 deletions

View File

@ -16,6 +16,7 @@
#include <linux/spinlock.h>
#include <linux/seqlock.h>
#include <linux/atomic.h>
#include <linux/android_kabi.h>
struct super_block;
struct vfsmount;
@ -73,6 +74,11 @@ struct vfsmount {
struct super_block *mnt_sb; /* pointer to superblock */
int mnt_flags;
struct user_namespace *mnt_userns;
ANDROID_KABI_RESERVE(1);
ANDROID_KABI_RESERVE(2);
ANDROID_KABI_RESERVE(3);
ANDROID_KABI_RESERVE(4);
} __randomize_layout;
static inline struct user_namespace *mnt_user_ns(const struct vfsmount *mnt)