History

Merge tag 'fuse-update-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse

Pull fuse updates from Miklos Szeredi: - Improve performance of virtio-fs in mixed read/write workloads - Try to revalidate cache before returning EEXIST on exclusive create - Add a couple of miscellaneous bug fixes as well as some code cleanups * tag 'fuse-update-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: fuse: fix bad inode fuse: support SB_NOSEC flag to improve write performance fuse: add a flag FUSE_OPEN_KILL_SUIDGID for open() request fuse: don't send ATTR_MODE to kill suid/sgid for handle_killpriv_v2 fuse: setattr should set FATTR_KILL_SUIDGID fuse: set FUSE_WRITE_KILL_SUIDGID in cached write path fuse: rename FUSE_WRITE_KILL_PRIV to FUSE_WRITE_KILL_SUIDGID fuse: introduce the notion of FUSE_HANDLE_KILLPRIV_V2 fuse: always revalidate if exclusive create virtiofs: clean up error handling in virtio_fs_get_tree() fuse: add fuse_sb_destroy() helper fuse: simplify get_fuse_conn*() fuse: get rid of fuse_mount refcount virtiofs: simplify sb setup virtiofs fix leak in setup fuse: launder page should wait for page writeback

Linus Torvalds committed 5 years ago

Commit 65de0b82 parents ff49c86 5d069db9 files · +195 −104Browse files

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

Unified · Split

include/uapi/linux/fuse.h+25−5
@@ -175,6 +175,10 @@ · 174 unmodified lines
175175 *
176176 * 7.32
177177 * - add flags to fuse_attr, add FUSE_ATTR_SUBMOUNT, add FUSE_SUBMOUNTS
178+ *
179+ * 7.33
180+ * - add FUSE_HANDLE_KILLPRIV_V2, FUSE_WRITE_KILL_SUIDGID, FATTR_KILL_SUIDGID
181+ * - add FUSE_OPEN_KILL_SUIDGID
178182 */
179183
180184 #ifndef _LINUX_FUSE_H
@@ -210,7 +214,7 @@ · 29 unmodified lines
210214 #define FUSE_KERNEL_VERSION 7
211215
212216 /** Minor version number of this interface */
213−#define FUSE_KERNEL_MINOR_VERSION 32
217+#define FUSE_KERNEL_MINOR_VERSION 33
214218
215219 /** The node ID of the root inode */
216220 #define FUSE_ROOT_ID 1
@@ -271,6 +275,7 @@ struct fuse_file_lock { · 54 unmodified lines
271275 #define FATTR_MTIME_NOW (1 << 8)
272276 #define FATTR_LOCKOWNER (1 << 9)
273277 #define FATTR_CTIME (1 << 10)
278+#define FATTR_KILL_SUIDGID (1 << 11)
274279
275280 /**
276281 * Flags returned by the OPEN request
@@ -320,6 +325,11 @@ struct fuse_file_lock { · 43 unmodified lines
320325 * foffset and moffset fields in struct
321326 * fuse_setupmapping_out and fuse_removemapping_one.
322327 * FUSE_SUBMOUNTS: kernel supports auto-mounting directory submounts
328+ * FUSE_HANDLE_KILLPRIV_V2: fs kills suid/sgid/cap on write/chown/trunc.
329+ * Upon write/truncate suid/sgid is only killed if caller
330+ * does not have CAP_FSETID. Additionally upon
331+ * write/truncate sgid is killed only if file has group
332+ * execute permission. (Same as Linux VFS behavior).
323333 */
324334 #define FUSE_ASYNC_READ (1 << 0)
325335 #define FUSE_POSIX_LOCKS (1 << 1)
@@ -349,6 +359,7 @@ struct fuse_file_lock { · 23 unmodified lines
349359 #define FUSE_EXPLICIT_INVAL_DATA (1 << 25)
350360 #define FUSE_MAP_ALIGNMENT (1 << 26)
351361 #define FUSE_SUBMOUNTS (1 << 27)
362+#define FUSE_HANDLE_KILLPRIV_V2 (1 << 28)
352363
353364 /**
354365 * CUSE INIT request/reply flags
@@ -378,11 +389,14 @@ struct fuse_file_lock { · 23 unmodified lines
378389 *
379390 * FUSE_WRITE_CACHE: delayed write from page cache, file handle is guessed
380391 * FUSE_WRITE_LOCKOWNER: lock_owner field is valid
381− * FUSE_WRITE_KILL_PRIV: kill suid and sgid bits
392+ * FUSE_WRITE_KILL_SUIDGID: kill suid and sgid bits
382393 */
383394 #define FUSE_WRITE_CACHE (1 << 0)
384395 #define FUSE_WRITE_LOCKOWNER (1 << 1)
385−#define FUSE_WRITE_KILL_PRIV (1 << 2)
396+#define FUSE_WRITE_KILL_SUIDGID (1 << 2)
397+
398+/* Obsolete alias; this flag implies killing suid/sgid only. */
399+#define FUSE_WRITE_KILL_PRIV FUSE_WRITE_KILL_SUIDGID
386400
387401 /**
388402 * Read flags
@@ -431,6 +445,12 @@ struct fuse_file_lock { · 42 unmodified lines
431445 */
432446 #define FUSE_ATTR_SUBMOUNT (1 << 0)
433447
448+/**
449+ * Open flags
450+ * FUSE_OPEN_KILL_SUIDGID: Kill suid and sgid if executable
451+ */
452+#define FUSE_OPEN_KILL_SUIDGID (1 << 0)
453+
434454 enum fuse_opcode {
435455 FUSE_LOOKUP = 1,
436456 FUSE_FORGET = 2, /* no reply */
@@ -592,14 +612,14 @@ struct fuse_setattr_in { · 155 unmodified lines
592612
593613 struct fuse_open_in {
594614 uint32_t flags;
595− uint32_t unused;
615+ uint32_t open_flags; /* FUSE_OPEN_... */
596616 };
597617
598618 struct fuse_create_in {
599619 uint32_t flags;
600620 uint32_t mode;
601621 uint32_t umask;
602− uint32_t padding;
622+ uint32_t open_flags; /* FUSE_OPEN_... */
603623 };
604624
605625 struct fuse_open_out {