History

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace

Pull namespace updates from Eric Biederman: "Life has been busy and I have not gotten half as much done this round as I would have liked. I delayed it so that a minor conflict resolution with the mips tree could spend a little time in linux-next before I sent this pull request. This includes two long delayed user namespace changes from Kirill Tkhai. It also includes a very useful change from Serge Hallyn that allows the security capability attribute to be used inside of user namespaces. The practical effect of this is people can now untar tarballs and install rpms in user namespaces. It had been suggested to generalize this and encode some of the namespace information information in the xattr name. Upon close inspection that makes the things that should be hard easy and the things that should be easy more expensive. Then there is my bugfix/cleanup for signal injection that removes the magic encoding of the siginfo union member from the kernel internal si_code. The mips folks reported the case where I had used FPE_FIXME me is impossible so I have remove FPE_FIXME from mips, while at the same time including a return statement in that case to keep gcc from complaining about unitialized variables. I almost finished the work to get make copy_siginfo_to_user a trivial copy to user. The code is available at: git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git neuter-copy_siginfo_to_user-v3 But I did not have time/energy to get the code posted and reviewed before the merge window opened. I was able to see that the security excuse for just copying fields that we know are initialized doesn't work in practice there are buggy initializations that don't initialize the proper fields in siginfo. So we still sometimes copy unitialized data to userspace" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: Introduce v3 namespaced file capabilities mips/signal: In force_fcr31_sig return in the impossible case signal: Remove kernel interal si_code magic fcntl: Don't use ambiguous SIG_POLL si_codes prctl: Allow local CAP_SYS_ADMIN changing exe_file security: Use user_namespace::level to avoid redundant iterations in cap_capable() userns,pidns: Verify the userns for new pid namespaces signal/testing: Don't look for __SI_FAULT in userspace signal/mips: Document a conflict with SI_USER with SIGFPE signal/sparc: Document a conflict with SI_USER with SIGFPE signal/ia64: Document a conflict with SI_USER with SIGFPE signal/alpha: Document a conflict with SI_USER for SIGTRAP

Linus Torvalds committed 9 years ago

Commit dd198ce2 parents 89fd915 076a9bc40 files · +622 −297Browse files

Showing the changes to include/uapi/linux (1 of 40 files). Show all

Unified · Split

include/uapi/linux/capability.h+19−3
@@ -60,9 +60,13 @@ typedef struct __user_cap_data_struct { · 59 unmodified lines
6060 #define VFS_CAP_U32_2 2
6161 #define XATTR_CAPS_SZ_2 (sizeof(__le32)*(1 + 2*VFS_CAP_U32_2))
6262
63−#define XATTR_CAPS_SZ XATTR_CAPS_SZ_2
64−#define VFS_CAP_U32 VFS_CAP_U32_2
65−#define VFS_CAP_REVISION VFS_CAP_REVISION_2
63+#define VFS_CAP_REVISION_3 0x03000000
64+#define VFS_CAP_U32_3 2
65+#define XATTR_CAPS_SZ_3 (sizeof(__le32)*(2 + 2*VFS_CAP_U32_3))
66+
67+#define XATTR_CAPS_SZ XATTR_CAPS_SZ_3
68+#define VFS_CAP_U32 VFS_CAP_U32_3
69+#define VFS_CAP_REVISION VFS_CAP_REVISION_3
6670
6771 struct vfs_cap_data {
6872 __le32 magic_etc; /* Little endian */
@@ -72,6 +76,18 @@ struct vfs_cap_data { · 3 unmodified lines
7276 } data[VFS_CAP_U32];
7377 };
7478
79+/*
80+ * same as vfs_cap_data but with a rootid at the end
81+ */
82+struct vfs_ns_cap_data {
83+ __le32 magic_etc;
84+ struct {
85+ __le32 permitted; /* Little endian */
86+ __le32 inheritable; /* Little endian */
87+ } data[VFS_CAP_U32];
88+ __le32 rootid;
89+};
90+
7591 #ifndef __KERNEL__
7692
7793 /*