Re: [PATCH 3/3] binfmt_misc: document the pre-opened interpreter limit

[email protected] Mon, 03 Aug 2026 12:18:42 +0000
Newsgroups org.kernel.vger.bpf
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 1 potential issue(=
s) to consider:
- [Low] The patch inadvertently removes useful documentation about binding =
files with no path of their own (e.g., memfd, unlinked files) using `/proc/=
self/fd/N`.
--

--- Patch [3]: [PATCH 3/3] binfmt_misc: document the pre-opened interpreter=
 limit ---
commit 7e931b9fad1ca1a8aeab3afa756448374ff5e74d
Author: Christian Brauner <[email protected]>

binfmt_misc: document the pre-opened interpreter limit

This commit documents how pre-opened interpreters are accounted for and lim=
ited
by the new /proc/sys/user/max_binfmt_misc_interpreters sysctl. It details h=
ow
nested namespaces affect the limit and explains the -ENOSPC error behavior.

> diff --git a/Documentation/admin-guide/binfmt-misc.rst b/Documentation/ad=
min-guide/binfmt-misc.rst
> index 622b5d8c89957..d26b63a27c259 100644
> --- a/Documentation/admin-guide/binfmt-misc.rst
> +++ b/Documentation/admin-guide/binfmt-misc.rst
[ ... ]
> @@ -215,10 +220,9 @@ with the credentials the entry file was opened with,=
 exactly the way ``F``
>  pre-opens a static entry's interpreter; the paths must be absolute. The
>  path is everything past the first space, so there is nothing it cannot
>  express, and no interpreter has to fit in a register string. An entry
> -binds at most 100 interpreters; a write past that is refused with
> -``-ENOSPC``. To bind a file that has no path of its own - already
> -unlinked, a ``memfd``, or reachable only in another mount namespace -
> -open it and write ``/proc/self/fd/N``.
> +binds at most 100 interpreters, and each one is charged against
> +``max_binfmt_misc_interpreters`` like any other binding. A write past ei=
ther
> +limit is refused with ``-ENOSPC``.

[Severity: Low]
This isn't a bug, but does this unintentionally remove the instructions for
binding files that have no path of their own? The previous text provided
useful details on how to use /proc/self/fd/N for unlinked files or memfds,
which seems to have been dropped during the rewording of the limit behavior.

--=20
Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20260803-work-binfm=
[email protected]?part=3D3