[PATCH RFC v3 04/44] fs: add SB_I_PSEUDO

sashiko-bot at kernel.org sashiko-bot at kernel.org
Mon Nov 16 11:16:43 UTC 2026


> Currently, there's no way to tell whether the files of a filesystem
> store data or whether they are kernel interfaces. Files on pseudo
> filesystems such as procfs or sysfs generate their contents when they're
> read and writes to them are commands to the kernel.
> 
> But a few places in the kernel take an arbitrary file and use it as
> storage: loop, zloop, the nvme target's file backend, the scsi target's
> fileio backend, fuse passthrough, the usb mass storage gadget and erofs
> file-backed mounts. At most they check the file type and whether the
> file implements ->read_iter() and ->write_iter(). That's not enough.
> kernfs provides both for every sysfs attribute for example.
> 
> Add SB_I_PSEUDO so a filesystem can state that its regular files are
> kernel interfaces and must not be used as storage.
> 
> [ ... ]
> Reviewed-by: Jan Kara <jack at suse.cz>
> Reviewed-by: Christoph Hellwig <hch at lst.de>
> Reviewed-by: Alexander Mikhalitsyn <alex at amutable.com>
> Reviewed-by: Chris Down <chris at chrisdown.name>
> Signed-off-by: Christian Brauner (Amutable) <brauner at kernel.org>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261116-work-loop-pseudo-v3-0-8cbbea1cf34f@kernel.org?part=4




More information about the Linux-security-module-archive mailing list