From: Charlie Jenkins <thecharlesjenkins@gmail.com>
To: Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Kees Cook <kees@kernel.org>
Cc: linux-doc@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
Charlie Jenkins <thecharlesjenkins@gmail.com>
Subject: [PATCH 1/2] Documentation/binfmt-misc.rst: Include AT_FLAGS info in "P" flag description
Date: Sun, 19 Apr 2026 00:11:02 -0400 [thread overview]
Message-ID: <20260419-binfmt_misc_doc_update_p-v1-1-757c12f33cc2@gmail.com> (raw)
In-Reply-To: <20260419-binfmt_misc_doc_update_p-v1-0-757c12f33cc2@gmail.com>
Commit 2347961b11d4 ("binfmt_misc: pass binfmt_misc flags to the
interpreter") added a bit to AT_FLAGS in the aux vector to notify an
interpreter that the 'P' flag was set in binfmt-misc. Clarify that the
interpreter is able to be aware of the 'P' flag by using this bit.
Signed-off-by: Charlie Jenkins <thecharlesjenkins@gmail.com>
---
Documentation/admin-guide/binfmt-misc.rst | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/Documentation/admin-guide/binfmt-misc.rst b/Documentation/admin-guide/binfmt-misc.rst
index 59cd902e3549..2e2be2922ba6 100644
--- a/Documentation/admin-guide/binfmt-misc.rst
+++ b/Documentation/admin-guide/binfmt-misc.rst
@@ -61,9 +61,11 @@ Here is what the fields mean:
vector for this purpose, thus preserving the original ``argv[0]``.
e.g. If your interp is set to ``/bin/foo`` and you run ``blah``
(which is in ``/usr/local/bin``), then the kernel will execute
- ``/bin/foo`` with ``argv[]`` set to ``["/bin/foo", "/usr/local/bin/blah", "blah"]``. The interp has to be aware of this so it can
- execute ``/usr/local/bin/blah``
- with ``argv[]`` set to ``["blah"]``.
+ ``/bin/foo`` with ``argv[]`` set to ``["/bin/foo",
+ "/usr/local/bin/blah", "blah"]``. The interp can be aware of this
+ by checking if bit 0 in AT_FLAGS in the auxilary vector is set to 1
+ so it can execute ``/usr/local/bin/blah`` with ``argv[]`` set to
+ ``["blah"]``.
``O`` - open-binary
Legacy behavior of binfmt_misc is to pass the full path
of the binary to the interpreter as an argument. When this flag is
--
2.53.0
next prev parent reply other threads:[~2026-04-19 4:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-19 4:11 [PATCH 0/2] Documentation/binfmt-misc.rst: Clarify "P" flag Charlie Jenkins
2026-04-19 4:11 ` Charlie Jenkins [this message]
2026-04-19 4:11 ` [PATCH 2/2] Documenation/binfmt-misc.rst: Make "P" flag path desc more precise Charlie Jenkins
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=20260419-binfmt_misc_doc_update_p-v1-1-757c12f33cc2@gmail.com \
--to=thecharlesjenkins@gmail.com \
--cc=corbet@lwn.net \
--cc=kees@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=skhan@linuxfoundation.org \
/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