Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
39c5573
fuse: Convert to using invalidate_lock
jankara Apr 21, 2021
baf87ad
fuse: fix use after free in fuse_read_interrupt()
Aug 4, 2021
559c496
fuse: flush extending writes
Aug 31, 2021
ee2b6ee
fuse: remove unused arg in fuse_write_file_get()
Sep 1, 2021
da24a87
fuse: make sure reclaim doesn't write the inode
Oct 22, 2021
4982679
fuse: write inode in fuse_vma_close() instead of fuse_release()
Oct 22, 2021
fd044e5
fuse: annotate lock in fuse_reverse_inval_entry()
Oct 22, 2021
eb86a57
fuse: use kmap_local_page()
flying-122 Sep 8, 2021
5f31b61
fuse: delete redundant code
flying-122 Sep 6, 2021
a5d2cda
fuse: move fuse_invalidate_attr() into fuse_update_ctime()
Oct 22, 2021
aef200f
fuse: simplify __fuse_write_file_get()
Oct 22, 2021
fd41337
fuse: decrement nlink on overwriting rename
Oct 22, 2021
7e3227c
fuse: don't increment nlink in link()
Oct 22, 2021
c857e62
fuse: selective attribute invalidation
Oct 22, 2021
818717f
fuse: don't bump attr_version in cached write
Oct 22, 2021
6678bc9
fuse: rename fuse_write_update_size()
Oct 22, 2021
0ae4ee3
fuse: always invalidate attributes after writes
Oct 22, 2021
a533743
fuse: fix attr version comparison in fuse_read_update_size()
Oct 22, 2021
f9e2b08
fuse: cleanup code conditional on fc->writeback_cache
Oct 22, 2021
0fca658
fuse: simplify local variables holding writeback cache state
Oct 22, 2021
1046d19
fuse: move reverting attributes to fuse_change_attributes()
Oct 22, 2021
37d3759
fuse: add cache_mask
Oct 22, 2021
74bf1c1
fuse: take cache_mask into account in getattr
Oct 22, 2021
392a0d9
fuse: only update necessary attributes
Oct 22, 2021
d5ad7c9
fuse: fix page stealing
Nov 2, 2021
e8506bb
fuse: release pipe buf after last use
Nov 25, 2021
b88db07
fuse: Pass correct lend value to filemap_write_and_wait_range()
YongjiXie Nov 22, 2021
30b4920
fuse: add fuse_should_enable_dax() helper
lostjeffle Nov 25, 2021
bec11dc
fuse: make DAX mount option a tri-state
lostjeffle Nov 25, 2021
8106250
fuse: support per inode DAX in fuse protocol
lostjeffle Nov 25, 2021
c4d56ed
fuse: enable per inode DAX
lostjeffle Nov 25, 2021
fda90de
fuse: negotiate per inode DAX in FUSE_INIT
lostjeffle Nov 25, 2021
7282779
fuse: mark inode DONT_CACHE when per inode DAX hint changes
lostjeffle Nov 25, 2021
b649e66
fuse: write inode in fuse_release()
Apr 20, 2022
b7006d7
fuse: avoid unnecessary spinlock bump
lostjeffle Apr 2, 2022
cee147a
fuse: Remove the control interface for virtio-fs
YongjiXie Jul 18, 2022
a421f3d
fuse: Add module param for CAP_SYS_ADMIN access bypassing allow_other
davemarchevsky Jul 11, 2022
e2a03e8
fuse: implement ->tmpfile()
Sep 24, 2022
291eec4
fuse: port to vfs{g,u}id_t and associated helpers
brauner Sep 9, 2022
4b68041
fs/fuse: Replace kmap() with kmap_local_page()
xp4ns3 Oct 12, 2022
b656678
fuse: add "expire only" mode to FUSE_NOTIFY_INVAL_ENTRY
Oct 28, 2022
efe4603
fuse: always revalidate rename target dentry
zhangjaycee Sep 28, 2022
49154a1
fuse: Remove user_ns check for FUSE_DEV_IOC_CLONE
thejh Sep 14, 2022
033aa8d
fuse: remove the unneeded result variable
Sep 1, 2022
be42d86
fuse: allow non-extending parallel direct writes on the same file
d-hans Jun 17, 2022
4e5287e
fuse: Rearrange fuse_allow_current_process checks
davemarchevsky Oct 25, 2022
e34bdb4
fuse: in fuse_flush only wait if someone wants the return code
ebiederm Jan 26, 2023
f3d8f83
fuse: fix all W=1 kernel-doc warnings
rddunlap Jan 9, 2023
0f006a6
fuse: add inode/permission checks to fileattr_get/fileattr_set
mihalicyn Jan 26, 2023
642bde3
fuse_dev_ioctl(): switch to fdget()
Aug 21, 2022
5b2f0cb
fuse: remove duplicate check for nodeid
zyfjeff Dec 13, 2022
0ef8df0
fuse: Apply flags2 only when userspace set the FUSE_INIT_EXT
bsbernd Apr 15, 2022
fe53ae4
fuse: revalidate: don't invalidate if interrupted
Jun 7, 2023
bf1903b
fuse: use direct_write_fallback
Jun 1, 2023
4ab76fb
fuse: convert to ctime accessor functions
jtlayton Jul 5, 2023
794d48c
Revert "fuse: in fuse_flush only wait if someone wants the return code"
Aug 14, 2023
40f9f1b
fuse: nlookup missing decrement in fuse_direntplus_link
Apr 25, 2023
b72fbb8
fuse: invalidate page cache pages before direct write
Aug 1, 2023
823e11e
fuse: add a new fuse init flag to relax restrictions in no cache mode
Aug 1, 2023
49a9eca
fuse: write back dirty pages before direct write in direct_io_relax mode
Aug 1, 2023
c64f03d
fuse: handle empty request_mask in statx
Aug 10, 2023
7488abf
fuse: add STATX request
Aug 10, 2023
95f3d0f
fuse: add ATTR_TIMEOUT macro
Aug 10, 2023
c51527e
fuse: implement statx
Aug 10, 2023
a426dd4
fuse: cache btime
Aug 10, 2023
0a0af1b
fuse: invalidate dentry on EEXIST creates or ENOENT deletes
zhangjaycee Jul 11, 2023
3af46aa
fuse: conditionally fill kstat in fuse_do_statx()
bsbernd Aug 23, 2023
8c62c4b
fuse: move fuse_xattr_handlers to .rodata
wedsonaf Sep 30, 2023
23eaac5
fuse: Rename DIRECT_IO_RELAX to DIRECT_IO_ALLOW_MMAP
tylerfanelli Sep 20, 2023
7484a9a
fuse: share lookup state between submount and its parent
kmjohansen Nov 3, 2023
9e10aa7
fuse: dax: set fc->dax to NULL in fuse_dax_conn_free()
HBh25Y Nov 16, 2023
50d3853
fuse: disable FOPEN_PARALLEL_DIRECT_WRITES with FUSE_DIRECT_IO_ALLOW_…
amir73il Dec 3, 2023
bff8bf3
fuse: fix UAF in rcu pathwalks
Sep 28, 2023
4f765c6
fuse: fix VM_MAYSHARE and direct_io_allow_mmap
bsbernd Dec 12, 2023
3dc1e84
fuse: replace remaining make_bad_inode() with fuse_make_bad()
Feb 28, 2024
5dcb017
fuse: fix root lookup with nonzero generation
Feb 28, 2024
5120474
fuse: don't unhash root
Feb 28, 2024
b414e6a
fuse: fix leaked ENOSYS error on first statx call
kdrag0n Apr 14, 2024
bf65b1d
fuse: verify {g,u}id mount options correctly
Jul 2, 2024
0e35402
fuse: update stats for pages in dropped aux writeback list
joannekoong Aug 26, 2024
978fecf
fuse: use unsigned type for getxattr/listxattr size truncation
thejh Aug 19, 2024
0189cac
fuse: fix memory leak in fuse_create_open
yangyun50 Aug 23, 2024
b23294f
fuse: clear PG_uptodate when using a stolen page
Aug 28, 2024
bcb8b15
virtiofs: use pages instead of pointer for kernel direct IO
Mar 10, 2025
64856a6
fuse: rename to fuse_dev_end_requests and make non-static
bsbernd Jan 20, 2025
a743681
fuse: Move fuse_get_dev to header file
bsbernd Jan 20, 2025
f8432a5
fuse: Move request bits
bsbernd Jan 20, 2025
5079ca4
fuse: make args->in_args[0] to be always the header
bsbernd Jan 20, 2025
6e3cb93
fuse: {io-uring} Handle SQEs - register commands
bsbernd Jan 20, 2025
b91ad6a
fuse: Make fuse_copy non static
bsbernd Jan 20, 2025
9508f69
fuse: Add fuse-io-uring handling into fuse_copy
bsbernd Jan 20, 2025
02909ca
fuse: {io-uring} Make hash-list req unique finding functions non-static
bsbernd Jan 20, 2025
85bb928
fuse: Add io-uring sqe commit and fetch support
bsbernd Jan 20, 2025
0b5ce86
fuse: {io-uring} Handle teardown of ring entries
bsbernd Jan 20, 2025
f901028
fuse: cleanup request queuing towards virtiofs
May 29, 2024
2684d63
fuse: {io-uring} Make fuse_dev_queue_{interrupt,forget} non-static
bsbernd Jan 20, 2025
e51a304
fuse: Allow to queue fg requests through io-uring
bsbernd Jan 20, 2025
23a51c2
RED-ONLY: fuse: {io-uring red} define IO_URING_F_TASK_DEAD
bsbernd Apr 17, 2025
dc8f179
fuse: Allow to queue bg requests through io-uring
bsbernd Jan 20, 2025
fe07f77
fuse: {io-uring} Prevent mount point hang on fuse-server termination
bsbernd Jan 20, 2025
0c57266
fuse: block request allocation until io-uring init is complete
bsbernd Jan 20, 2025
35568d3
fuse: enable fuse-over-io-uring
bsbernd Jan 20, 2025
fb98a6c
fuse: prevent disabling io-uring on active connections
bsbernd Jan 23, 2025
ed65c3f
fuse: fix uring race condition for null dereference of fc
joannekoong Mar 18, 2025
305bf99
fuse: fix possible deadlock if rings are never initialized
luis-henrix Mar 6, 2025
06f8a97
fuse: {io-uring} Fix a possible req cancellation race
bsbernd Mar 25, 2025
a37e6ad
fuse: removed unused function fuse_uring_create() from header
luis-henrix Feb 7, 2025
9aafe13
fuse: Allocate only namelen buf memory in fuse_notify_
bsbernd Dec 16, 2024
eae2cd9
fuse: use FUSE_ROOT_ID in fuse_get_root_inode()
Feb 28, 2024
5405900
fuse: check attributes staleness on fuse_iget()
cntianci Nov 18, 2024
d152d64
fuse: fuse: Use readdir buffer of max_pages size
szmi Apr 8, 2025
012360e
Revert "virtiofs: use pages instead of pointer for kernel direct IO"
bsbernd Apr 17, 2025
1a8c006
fuse: enable dynamic configuration of fuse max pages limit (FUSE_MAX_…
joannekoong Sep 23, 2024
81bff2e
fuse: Make the fuse_send_one request counter atomic
bsbernd Apr 2, 2025
5dce112
[RFC] fuse: Set request unique on allocation
bsbernd Apr 2, 2025
6ea0d7f
fuse: add simple request tracepoints
josefbacik Jul 3, 2024
5744e72
fuse: {io-uring} Avoid _send code dup
bsbernd Apr 2, 2025
da5edac
fuse: fine-grained request ftraces
bsbernd Apr 2, 2025
f697c35
fuse: Increase FUSE_NAME_MAX to PATH_MAX
bsbernd Dec 16, 2024
5a25d0a
fuse: add support for explicit export disabling
lostjeffle Feb 26, 2024
71f374e
fuse: create helper function if DIO write needs exclusive lock
bsbernd Aug 22, 2023
2575634
fuse: factor out helper fuse_truncate_update_attr()
amir73il Feb 1, 2024
df79bf8
fuse: allocate ff->release_args only if release is needed
amir73il Feb 1, 2024
80ab5d1
fuse: break up fuse_open_common()
amir73il Feb 2, 2024
a48114b
fuse: prepare for failing open response
amir73il Feb 1, 2024
89d1dd9
fuse: introduce inode io modes
amir73il Feb 1, 2024
9e6ed0e
fuse: add fuse_dio_lock/unlock helper functions
bsbernd Dec 23, 2023
f1d3fdb
fuse: allow parallel dio writes with FUSE_DIRECT_IO_ALLOW_MMAP
amir73il Feb 9, 2024
c41a5d3
fuse: add fast path for fuse_range_is_writeback
yangyun50 Aug 14, 2024
7397492
fuse: use exclusive lock when FUSE_I_CACHE_IO_MODE is set
yangyun50 Sep 14, 2024
80f281f
fuse: Increase the default max pages limit to 8182
bsbernd Apr 8, 2025
9161ba4
fuse: {uring} Pin the user buffer
bsbernd Jan 8, 2025
cee53e8
fuse: {io-uring] Avoid complete-in-task if pinned pages are used
bsbernd Jan 17, 2025
2bc6983
fuse: Add memory barrier in fuse_uring_destruct
bsbernd Apr 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Documentation/admin-guide/sysctl/fs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -382,3 +382,13 @@ Each "watch" costs roughly 90 bytes on a 32bit kernel, and roughly 160 bytes
on a 64bit one.
The current default value for max_user_watches is the 1/25 (4%) of the
available low memory, divided for the "watch" cost in bytes.

5. /proc/sys/fs/fuse - Configuration options for FUSE filesystems
=====================================================================

This directory contains the following configuration options for FUSE
filesystems:

``/proc/sys/fs/fuse/max_pages_limit`` is a read/write file for
setting/getting the maximum number of pages that can be used for servicing
requests in FUSE.
29 changes: 24 additions & 5 deletions Documentation/filesystems/fuse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ How are requirements fulfilled?
the filesystem or not.

Note that the *ptrace* check is not strictly necessary to
prevent B/2/i, it is enough to check if mount owner has enough
prevent C/2/i, it is enough to check if mount owner has enough
privilege to send signal to the process accessing the
filesystem, since *SIGSTOP* can be used to get a similar effect.

Expand All @@ -288,10 +288,29 @@ I think these limitations are unacceptable?

If a sysadmin trusts the users enough, or can ensure through other
measures, that system processes will never enter non-privileged
mounts, it can relax the last limitation with a 'user_allow_other'
config option. If this config option is set, the mounting user can
add the 'allow_other' mount option which disables the check for other
users' processes.
mounts, it can relax the last limitation in several ways:

- With the 'user_allow_other' config option. If this config option is
set, the mounting user can add the 'allow_other' mount option which
disables the check for other users' processes.

User namespaces have an unintuitive interaction with 'allow_other':
an unprivileged user - normally restricted from mounting with
'allow_other' - could do so in a user namespace where they're
privileged. If any process could access such an 'allow_other' mount
this would give the mounting user the ability to manipulate
processes in user namespaces where they're unprivileged. For this
reason 'allow_other' restricts access to users in the same userns
or a descendant.

- With the 'allow_sys_admin_access' module option. If this option is
set, super user's processes have unrestricted access to mounts
irrespective of allow_other setting or user namespace of the
mounting user.

Note that both of these relaxations expose the system to potential
information leak or *DoS* as described in points B and C/2/i-ii in the
preceding section.

Kernel - userspace interface
============================
Expand Down
12 changes: 12 additions & 0 deletions fs/fuse/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,15 @@ config FUSE_DAX

If you want to allow mounting a Virtio Filesystem with the "dax"
option, answer Y.

config FUSE_IO_URING
bool "FUSE communication over io-uring"
default y
depends on FUSE_FS
depends on IO_URING
help
This allows sending FUSE requests over the io-uring interface and
also adds request core affinity.

If you want to allow fuse server/client communication through io-uring,
answer Y
6 changes: 6 additions & 0 deletions fs/fuse/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@
# Makefile for the FUSE filesystem.
#

# Needed for trace events
ccflags-y = -I$(src)

obj-$(CONFIG_FUSE_FS) += fuse.o
obj-$(CONFIG_CUSE) += cuse.o
obj-$(CONFIG_VIRTIO_FS) += virtiofs.o

fuse-y := dev.o dir.o file.o inode.o control.o xattr.o acl.o readdir.o ioctl.o
fuse-y += iomode.o
fuse-$(CONFIG_FUSE_DAX) += dax.o
fuse-$(CONFIG_FUSE_IO_URING) += dev_uring.o
fuse-$(CONFIG_SYSCTL) += sysctl.o

virtiofs-y := virtio_fs.o
2 changes: 1 addition & 1 deletion fs/fuse/acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ int fuse_set_acl(struct user_namespace *mnt_userns, struct inode *inode,
return ret;
}

if (!in_group_p(i_gid_into_mnt(&init_user_ns, inode)) &&
if (!vfsgid_in_group_p(i_gid_into_vfsgid(&init_user_ns, inode)) &&
!capable_wrt_inode_uidgid(&init_user_ns, inode, CAP_FSETID))
extra_flags |= FUSE_SETXATTR_ACL_KILL_SGID;

Expand Down
6 changes: 3 additions & 3 deletions fs/fuse/control.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ static struct dentry *fuse_ctl_add_dentry(struct dentry *parent,
inode->i_mode = mode;
inode->i_uid = fc->user_id;
inode->i_gid = fc->group_id;
inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
inode->i_atime = inode->i_mtime = inode_set_ctime_current(inode);
/* setting ->i_op to NULL is not allowed */
if (iop)
inode->i_op = iop;
Expand All @@ -254,7 +254,7 @@ int fuse_ctl_add_conn(struct fuse_conn *fc)
struct dentry *parent;
char name[32];

if (!fuse_control_sb)
if (!fuse_control_sb || fc->no_control)
return 0;

parent = fuse_control_sb->s_root;
Expand Down Expand Up @@ -292,7 +292,7 @@ void fuse_ctl_remove_conn(struct fuse_conn *fc)
{
int i;

if (!fuse_control_sb)
if (!fuse_control_sb || fc->no_control)
return;

for (i = fc->ctl_ndents - 1; i >= 0; i--) {
Expand Down
10 changes: 3 additions & 7 deletions fs/fuse/cuse.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ static int cuse_parse_one(char **pp, char *end, char **keyp, char **valp)
}

/**
* cuse_parse_dev_info - parse device info
* cuse_parse_devinfo - parse device info
* @p: device info string
* @len: length of device info string
* @devinfo: out parameter for parsed device info
Expand Down Expand Up @@ -474,8 +474,7 @@ static int cuse_send_init(struct cuse_conn *cc)

static void cuse_fc_release(struct fuse_conn *fc)
{
struct cuse_conn *cc = fc_to_cc(fc);
kfree_rcu(cc, fc.rcu);
kfree(fc_to_cc(fc));
}

/**
Expand Down Expand Up @@ -545,7 +544,6 @@ static int cuse_channel_release(struct inode *inode, struct file *file)
{
struct fuse_dev *fud = file->private_data;
struct cuse_conn *cc = fc_to_cc(fud->fc);
int rc;

/* remove from the conntbl, no more access from this point on */
mutex_lock(&cuse_lock);
Expand All @@ -560,9 +558,7 @@ static int cuse_channel_release(struct inode *inode, struct file *file)
cdev_del(cc->cdev);
}

rc = fuse_dev_release(inode, file); /* puts the base reference */

return rc;
return fuse_dev_release(inode, file);
}

static struct file_operations cuse_channel_fops; /* initialized during init */
Expand Down
Loading