On Fri, May 9, 2025 at 8:34 AM Chen Linxuan via B4 Relay <devnull+chenlinxuan.uniontech.com@xxxxxxxxxx> wrote: > > From: Chen Linxuan <chenlinxuan@xxxxxxxxxxxxx> > > Add a new FUSE control file "/sys/fs/fuse/connections/*/backing_files" > that exposes the paths of all backing files currently being used in > FUSE mount points. This is particularly valuable for tracking and > debugging files used in FUSE passthrough mode. > > This approach is similar to how fixed files in io_uring expose their > status through fdinfo, providing administrators with visibility into > backing file usage. By making backing files visible through the FUSE > control filesystem, administrators can monitor which files are being > used for passthrough operations and can force-close them if needed by > aborting the connection. > > This exposure of backing files information is an important step towards > potentially relaxing CAP_SYS_ADMIN requirements for certain passthrough > operations in the future, allowing for better security analysis of > passthrough usage patterns. > > The control file is implemented using the seq_file interface for > efficient handling of potentially large numbers of backing files. > Access permissions are set to read-only (0400) as this is an > informational interface. > > FUSE_CTL_NUM_DENTRIES has been increased from 5 to 6 to accommodate the > additional control file. > > Some related discussions can be found at links below. > > Link: https://lore.kernel.org/all/4b64a41c-6167-4c02-8bae-3021270ca519@xxxxxxxxxxx/T/#mc73e04df56b8830b1d7b06b5d9f22e594fba423e > Link: https://lore.kernel.org/linux-fsdevel/CAOQ4uxhAY1m7ubJ3p-A3rSufw_53WuDRMT1Zqe_OC0bP_Fb3Zw@xxxxxxxxxxxxxx/ > Cc: Amir Goldstein <amir73il@xxxxxxxxx> > Signed-off-by: Chen Linxuan <chenlinxuan@xxxxxxxxxxxxx> > --- Looks good! With minor nits fixed, please feel free to add: Reviewed-by: Amir Goldstein <amir73il@xxxxxxxxx> (instead of Cc:) ... > static const struct fs_context_operations fuse_ctl_context_ops = { > - .get_tree = fuse_ctl_get_tree, > + .get_tree = fuse_ctl_get_tree, > }; > > static int fuse_ctl_init_fs_context(struct fs_context *fsc) > @@ -358,10 +489,10 @@ static void fuse_ctl_kill_sb(struct super_block *sb) > } > > static struct file_system_type fuse_ctl_fs_type = { > - .owner = THIS_MODULE, > - .name = "fusectl", > + .owner = THIS_MODULE, > + .name = "fusectl", > .init_fs_context = fuse_ctl_init_fs_context, > - .kill_sb = fuse_ctl_kill_sb, > + .kill_sb = fuse_ctl_kill_sb, > }; Please undo these whitespace changes. Thanks, Amir.