[PATCH RFC v3 38/44] nvmet: refuse files on pseudo filesystems as namespace backing files
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Mon Nov 16 11:24:30 UTC 2026
> The file backend takes any file that can be opened for reading and
> writing. With buffered_io=1 that includes files on procfs or sysfs which
> then get read and written by a kernel worker on behalf of the host.
> Refuse files on pseudo filesystems just like loop does by switching to
> file_check_backing().
>
> Note that the helper only accepts regular files and block devices. A
> block device ends up in the file backend when buffered_io is set. But
> so far the file backend also took anything else with ->read_iter() and
> ->write_iter() such as character devices and FIFOs. The size of the
> namespace is the size of the inode which is zero for all of them. So
> such a namespace was unusable anyway. Refuse them.
>
> Reviewed-by: Chris Down <chris at chrisdown.name>
> Tested-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=38
More information about the Linux-security-module-archive
mailing list