Mounting a 9P FS from inside a user NS ?
Dear Kernel Gurus,
I would like to mount 9P filesystems from inside user namespaces, in order to replicate Plan 9's default per-process view of the filesystem, with 9P as a glue to mount part of one process' fs in another process' fs.
From what I understand, if I create a user- and mount- namespace, I would be able to unprivilegially mount FSs in it. But only if those FS have been deemed safe, blessed by the FS_USERNS_MOUNT flag.
For example, tmpfs is a safe FS, and I can do:
unshare --user --map-root-user --mount
mount -t tmpfs tmpfs mnt/mnt1/
and it works.
However, if I do:
unshare --user --map-root-user --mount
mount -t 9p -o trans=unix /run/9p/srv4 mnt/mnt1
I get mount: /home/edouard/mnt/mnt1: permission denied.
My question is: Are there currently any plans to make v9fs a FS_USERNS_MOUNT-flagged, safe filesystem ?
If not, is it because of a fundamental design flaw somewhere that make v9fs less safe than e.g. FUSE, which AFAIK, is deemed safe ?
Or is it because nobody ever got around to it ?
This 2018 thread:
https://lore.kernel.org/all/[email protected]/T/
ended with
Quoted 3 lines
plan9fs would also be a candidate for that kind of treatment [being allowed for unprivileged mounts] if it had a maintainer.
Is this still true ? I did not know v9fs was unmaintained.
How big of a change would making v9fs FS_USERNS_MOUNT-flagged be ? Would anybody here be open to guide an effort made (by me or anybody else) to implement this change ?
Last question: I think I can temporarily get by by writing a FUSE wrapper for 9P2000.L (the current wrappers, 9pfs and plan9port's 9pfuse only speak 9P2000). Is there an easier temporary solution ?
Thank you for your time and hard work around the kernel.
Cheers,
Edouard.
P.S. Please keep me in CC of the replies if you can.