From: Miklos Szeredi <miklos@szeredi.hu>
To: Allison Karlitskaya <lis@redhat.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: Request for clarification about FILESYSTEM_MAX_STACK_DEPTH
Date: Tue, 13 May 2025 12:21:26 +0200 [thread overview]
Message-ID: <CAJfpegtdy7BYUpt795vGKFDHfRpyPVhqrL=gbQzauTvNawrZyw@mail.gmail.com> (raw)
In-Reply-To: <CAOYeF9V_n93OEF_uf0Gwtd=+da0ReX8N2aaT6RfEJ9DPvs8O2w@mail.gmail.com>
On Mon, 5 May 2025 at 23:02, Allison Karlitskaya <lis@redhat.com> wrote:
>
> 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?
It will never be smaller than 2, that's guaranteed. I think there's a
good chance of increasing this in the future if there's use case for
it.
> - if so, can we add some sort of API to get the current value?
Yes.
Thanks,
Miklos
next prev parent reply other threads:[~2025-05-13 10:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-05 21:02 Request for clarification about FILESYSTEM_MAX_STACK_DEPTH Allison Karlitskaya
2025-05-13 10:21 ` Miklos Szeredi [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJfpegtdy7BYUpt795vGKFDHfRpyPVhqrL=gbQzauTvNawrZyw@mail.gmail.com' \
--to=miklos@szeredi.hu \
--cc=linux-fsdevel@vger.kernel.org \
--cc=lis@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).