Re: [PATCH 0/4] exportfs: add flag to allow marking export operations as only supporting file handles

Jeff Layton
2024-12-03T14:32:21Z

On Tue, 2024-12-03 at 10:08 +0100, Christian Brauner wrote:
> > Though, I wonder if a similar but separate prohibition
> > mechanism might be necessary for other in-kernel network
> > file system server implementations (eg, ksmbd).
>
> Oh hm, interesting question.
> I have no idea how ksmbd or 9p "exports" work. I really hope they don't
> allow exporting arbitrary pseudo-fses.

SMB is path-based so there's no worry about filehandles there. It looks
like ksmbd keeps a set of ksmbd_share_config objects, that are
configured by userland. If someone deliberately shares stuff under
/proc, then I guess they get to keep all of the pieces. ;)

9P does use filehandles, but there is no in-kernel server, so far.
Wedson had one in development at one point [1], but I haven't heard
anything about it in a while.

[1]: https://kangrejos.com/Async%20Rust%20and%209p%20server.pdf
--
Jeff Layton <jlayton@kernel.org>