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
175 *175 *
176 * 7.32176 * 7.32
177 * - add flags to fuse_attr, add FUSE_ATTR_SUBMOUNT, add FUSE_SUBMOUNTS177 * - 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
178 */182 */
179 183
180#ifndef _LINUX_FUSE_H184#ifndef _LINUX_FUSE_H
@@ -210,7 +214,7 @@ · 29 unmodified lines
210#define FUSE_KERNEL_VERSION 7214#define FUSE_KERNEL_VERSION 7
211 215
212/** Minor version number of this interface */216/** Minor version number of this interface */
213#define FUSE_KERNEL_MINOR_VERSION 32217#define FUSE_KERNEL_MINOR_VERSION 33
214 218
215/** The node ID of the root inode */219/** The node ID of the root inode */
216#define FUSE_ROOT_ID 1220#define FUSE_ROOT_ID 1
@@ -271,6 +275,7 @@ struct fuse_file_lock { · 54 unmodified lines
271#define FATTR_MTIME_NOW (1 << 8)275#define FATTR_MTIME_NOW (1 << 8)
272#define FATTR_LOCKOWNER (1 << 9)276#define FATTR_LOCKOWNER (1 << 9)
273#define FATTR_CTIME (1 << 10)277#define FATTR_CTIME (1 << 10)
278#define FATTR_KILL_SUIDGID (1 << 11)
274 279
275/**280/**
276 * Flags returned by the OPEN request281 * Flags returned by the OPEN request
@@ -320,6 +325,11 @@ struct fuse_file_lock { · 43 unmodified lines
320 * foffset and moffset fields in struct325 * foffset and moffset fields in struct
321 * fuse_setupmapping_out and fuse_removemapping_one.326 * fuse_setupmapping_out and fuse_removemapping_one.
322 * FUSE_SUBMOUNTS: kernel supports auto-mounting directory submounts327 * 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).
323 */333 */
324#define FUSE_ASYNC_READ (1 << 0)334#define FUSE_ASYNC_READ (1 << 0)
325#define FUSE_POSIX_LOCKS (1 << 1)335#define FUSE_POSIX_LOCKS (1 << 1)
@@ -349,6 +359,7 @@ struct fuse_file_lock { · 23 unmodified lines
349#define FUSE_EXPLICIT_INVAL_DATA (1 << 25)359#define FUSE_EXPLICIT_INVAL_DATA (1 << 25)
350#define FUSE_MAP_ALIGNMENT (1 << 26)360#define FUSE_MAP_ALIGNMENT (1 << 26)
351#define FUSE_SUBMOUNTS (1 << 27)361#define FUSE_SUBMOUNTS (1 << 27)
362#define FUSE_HANDLE_KILLPRIV_V2 (1 << 28)
352 363
353/**364/**
354 * CUSE INIT request/reply flags365 * CUSE INIT request/reply flags
@@ -378,11 +389,14 @@ struct fuse_file_lock { · 23 unmodified lines
378 *389 *
379 * FUSE_WRITE_CACHE: delayed write from page cache, file handle is guessed390 * FUSE_WRITE_CACHE: delayed write from page cache, file handle is guessed
380 * FUSE_WRITE_LOCKOWNER: lock_owner field is valid391 * FUSE_WRITE_LOCKOWNER: lock_owner field is valid
381 * FUSE_WRITE_KILL_PRIV: kill suid and sgid bits392 * FUSE_WRITE_KILL_SUIDGID: kill suid and sgid bits
382 */393 */
383#define FUSE_WRITE_CACHE (1 << 0)394#define FUSE_WRITE_CACHE (1 << 0)
384#define FUSE_WRITE_LOCKOWNER (1 << 1)395#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
386 400
387/**401/**
388 * Read flags402 * Read flags
@@ -431,6 +445,12 @@ struct fuse_file_lock { · 42 unmodified lines
431 */445 */
432#define FUSE_ATTR_SUBMOUNT (1 << 0)446#define FUSE_ATTR_SUBMOUNT (1 << 0)
433 447
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
434enum fuse_opcode {454enum fuse_opcode {
435 FUSE_LOOKUP = 1,455 FUSE_LOOKUP = 1,
436 FUSE_FORGET = 2, /* no reply */456 FUSE_FORGET = 2, /* no reply */
@@ -592,14 +612,14 @@ struct fuse_setattr_in { · 155 unmodified lines
592 612
593struct fuse_open_in {613struct fuse_open_in {
594 uint32_t flags;614 uint32_t flags;
595 uint32_t unused;615 uint32_t open_flags; /* FUSE_OPEN_... */
596};616};
597 617
598struct fuse_create_in {618struct fuse_create_in {
599 uint32_t flags;619 uint32_t flags;
600 uint32_t mode;620 uint32_t mode;
601 uint32_t umask;621 uint32_t umask;
602 uint32_t padding;622 uint32_t open_flags; /* FUSE_OPEN_... */
603};623};
604 624
605struct fuse_open_out {625struct fuse_open_out {