OSDN Git Service

ANDROID: GKI: user_namespace.h: add Android ABI padding to a structure
authorGreg Kroah-Hartman <gregkh@google.com>
Sat, 2 May 2020 07:44:10 +0000 (09:44 +0200)
committerGreg Kroah-Hartman <gregkh@google.com>
Sun, 3 May 2020 06:45:29 +0000 (08:45 +0200)
Try to mitigate potential future driver core api changes by adding a
padding to struct user_namespace.

Based on a change made to the RHEL/CENTOS 8 kernel.

Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I2c41281b191cd252db2ddc792699d869ce8d7a4d

include/linux/user_namespace.h

index d6b74b9..c1de115 100644 (file)
@@ -10,6 +10,7 @@
 #include <linux/rwsem.h>
 #include <linux/sysctl.h>
 #include <linux/err.h>
+#include <linux/android_kabi.h>
 
 #define UID_GID_MAP_MAX_BASE_EXTENTS 5
 #define UID_GID_MAP_MAX_EXTENTS 340
@@ -76,6 +77,9 @@ struct user_namespace {
 #endif
        struct ucounts          *ucounts;
        int ucount_max[UCOUNT_COUNTS];
+
+       ANDROID_KABI_RESERVE(1);
+       ANDROID_KABI_RESERVE(2);
 } __randomize_layout;
 
 struct ucounts {