History

Merge branch 'from-miklos' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull vfs updates from Al Viro: "Assorted patches from Miklos. An interesting part here is /proc/mounts stuff..." The "/proc/mounts stuff" is using a cursor for keeeping the location data while traversing the mount listing. Also probably worth noting is the addition of faccessat2(), which takes an additional set of flags to specify how the lookup is done (AT_EACCESS, AT_SYMLINK_NOFOLLOW, AT_EMPTY_PATH). * 'from-miklos' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: vfs: add faccessat2 syscall vfs: don't parse "silent" option vfs: don't parse "posixacl" option vfs: don't parse forbidden flags statx: add mount_root statx: add mount ID statx: don't clear STATX_ATIME on SB_RDONLY uapi: deprecate STATX_ALL utimensat: AT_EMPTY_PATH support vfs: split out access_override_creds() proc/mounts: add cursor aio: fix async fsync creds vfs: allow unprivileged whiteout creation

Linus Torvalds committed 6 years ago

Commit f3592872 parents 8b39a57 c8ffd8b39 files · +234 −96Browse files

Showing the changes to include/uapi/linux (2 of 39 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/fcntl.h +10 −0
  2. include/uapi/linux/stat.h +16 −2
include/uapi/linux/fcntl.h+10−0
@@ -84,10 +84,20 @@ · 83 unmodified lines
8484 #define DN_ATTRIB 0x00000020 /* File changed attibutes */
8585 #define DN_MULTISHOT 0x80000000 /* Don't remove notifier */
8686
87+/*
88+ * The constants AT_REMOVEDIR and AT_EACCESS have the same value. AT_EACCESS is
89+ * meaningful only to faccessat, while AT_REMOVEDIR is meaningful only to
90+ * unlinkat. The two functions do completely different things and therefore,
91+ * the flags can be allowed to overlap. For example, passing AT_REMOVEDIR to
92+ * faccessat would be undefined behavior and thus treating it equivalent to
93+ * AT_EACCESS is valid undefined behavior.
94+ */
8795 #define AT_FDCWD -100 /* Special value used to indicate
8896 openat should use the current
8997 working directory. */
9098 #define AT_SYMLINK_NOFOLLOW 0x100 /* Do not follow symbolic links. */
99+#define AT_EACCESS 0x200 /* Test access permitted for
100+ effective IDs, not real IDs. */
91101 #define AT_REMOVEDIR 0x200 /* Remove directory instead of
92102 unlinking file. */
93103 #define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */
include/uapi/linux/stat.h+16−2
@@ -123,7 +123,10 @@ struct statx { · 122 unmodified lines
123123 __u32 stx_dev_major; /* ID of device containing file [uncond] */
124124 __u32 stx_dev_minor;
125125 /* 0x90 */
126− __u64 __spare2[14]; /* Spare space for future expansion */
126+ __u64 stx_mnt_id;
127+ __u64 __spare2;
128+ /* 0xa0 */
129+ __u64 __spare3[12]; /* Spare space for future expansion */
127130 /* 0x100 */
128131 };
129132
@@ -148,9 +151,19 @@ struct statx { · 18 unmodified lines
148151 #define STATX_BLOCKS 0x00000400U /* Want/got stx_blocks */
149152 #define STATX_BASIC_STATS 0x000007ffU /* The stuff in the normal stat struct */
150153 #define STATX_BTIME 0x00000800U /* Want/got stx_btime */
151−#define STATX_ALL 0x00000fffU /* All currently supported flags */
154+#define STATX_MNT_ID 0x00001000U /* Got stx_mnt_id */
155+
152156 #define STATX__RESERVED 0x80000000U /* Reserved for future struct statx expansion */
153157
158+#ifndef __KERNEL__
159+/*
160+ * This is deprecated, and shall remain the same value in the future. To avoid
161+ * confusion please use the equivalent (STATX_BASIC_STATS | STATX_BTIME)
162+ * instead.
163+ */
164+#define STATX_ALL 0x00000fffU
165+#endif
166+
154167 /*
155168 * Attributes to be found in stx_attributes and masked in stx_attributes_mask.
156169 *
@@ -168,6 +181,7 @@ struct statx { · 11 unmodified lines
168181 #define STATX_ATTR_NODUMP 0x00000040 /* [I] File is not to be dumped */
169182 #define STATX_ATTR_ENCRYPTED 0x00000800 /* [I] File requires key to decrypt in fs */
170183 #define STATX_ATTR_AUTOMOUNT 0x00001000 /* Dir: Automount trigger */
184+#define STATX_ATTR_MOUNT_ROOT 0x00002000 /* Root of a mount */
171185 #define STATX_ATTR_VERITY 0x00100000 /* [I] Verity protected file */
172186
173187