linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Request for clarification about FILESYSTEM_MAX_STACK_DEPTH
@ 2025-05-05 21:02 Allison Karlitskaya
  2025-05-13 10:21 ` Miklos Szeredi
  0 siblings, 1 reply; 10+ messages in thread
From: Allison Karlitskaya @ 2025-05-05 21:02 UTC (permalink / raw)
  To: linux-fsdevel

hi,

Here's another "would be nice to have this on the record" sort of
thing that I haven't been able to find any other public statements
about.

FILESYSTEM_MAX_STACK_DEPTH is defined in a non-public header as 2.  As
far as I can tell, there's no way to query the limit out of a running
kernel, and there's no indication if this value might ever be
increased.  Hopefully it won't be decreased.

I'm trying to write a userspace binding layer for supporting
passthrough fds in fuse and it's hard to validate user input for the
stacking depth parameter.  libfuse hardcodes some constant values (0,
1) that the user might choose, but in an adjacent comment makes
references to the "current" kernel, suggesting that it might change at
some point.  It's also sort of difficult to determine if a value is
valid by probing: choosing an invalid value simply disables
passthrough fd support, which you won't find out about until you
actually go and try to create a passthrough fd, at which point it
fails with EPERM (but which can also happen for many other reasons).

So, I guess:
 - will 2 ever change?
 - if not, can we get it in a public header?
 - if so, can we add some sort of API to get the current value?

Thanks in advance!

lis


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-05-27 14:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-05 21:02 Request for clarification about FILESYSTEM_MAX_STACK_DEPTH Allison Karlitskaya
2025-05-13 10:21 ` Miklos Szeredi
2025-05-14 12:14   ` [PATCH] fuse: add max_stack_depth to fuse_init_in Allison Karlitskaya
2025-05-14 13:32     ` Bernd Schubert
2025-05-15  8:42     ` Miklos Szeredi
2025-05-15 10:10       ` Christian Brauner
2025-05-16  9:07         ` Miklos Szeredi
2025-05-26  8:50           ` Allison Karlitskaya
2025-05-26 10:11             ` Amir Goldstein
2025-05-27 14:30               ` Miklos Szeredi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).