[PATCH RFC v2 36/42] nvmet: refuse files on pseudo filesystems as namespace backing files
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Sat Nov 14 13:21:19 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.
>
> 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/20261114-work-loop-pseudo-v2-0-98639a2286fb@kernel.org?part=36
More information about the Linux-security-module-archive
mailing list