From: Pratyush Yadav <pratyush@kernel.org>
To: Alejandro Colomar <alx@kernel.org>
Cc: "Pratyush Yadav (Google)" <pratyush@kernel.org>,
David Hildenbrand <david@kernel.org>,
Daniel Verkamp <dverkamp@chromium.org>,
Jeff Xu <jeffxu@google.com>,
Pasha Tatashin <pasha.tatashin@soleen.com>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
Hugh Dickins <hughd@google.com>,
linux-man@vger.kernel.org, linux-mm@kvack.org
Subject: [PATCH] man/man2const/F_{ADD,GET}_SEALS.2const: document F_SEAL_EXEC
Date: Fri, 29 May 2026 14:40:44 +0200 [thread overview]
Message-ID: <20260529124047.1483026-1-pratyush@kernel.org> (raw)
From: "Pratyush Yadav (Google)" <pratyush@kernel.org>
F_SEAL_EXEC was added in Linux v6.3. It seals the exec bits of the
memfd. Document it.
Signed-off-by: Pratyush Yadav (Google) <pratyush@kernel.org>
---
Notes:
I discovered this was missing when working on [0]. I had to look at the
code to figure out how it was supposed to behave.
Disclaimer: I used help from Gemini to write this patch, mainly because
I don't know the man page syntax. If the man-pages project also uses the
AI-assisted tags as Linux, feel free to add:
Assisted-by: Gemini:gemini-3.1-pro
[0] https://lore.kernel.org/linux-mm/20260505133922.797635-1-pratyush@kernel.org/
man/man2const/F_GET_SEALS.2const | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/man/man2const/F_GET_SEALS.2const b/man/man2const/F_GET_SEALS.2const
index 175025c10..2de8009a8 100644
--- a/man/man2const/F_GET_SEALS.2const
+++ b/man/man2const/F_GET_SEALS.2const
@@ -176,6 +176,25 @@ will fail with
Using this seal,
one process can create a memory buffer that it can continue to modify
while sharing that buffer on a "read-only" basis with other processes.
+.TP
+.BR F_SEAL_EXEC " (since Linux 6.3)"
+If this seal is set, the execute bits in the file mode cannot be modified.
+Any attempt to modify these bits via
+.BR chmod (2),
+.BR fchmod (2),
+or similar calls will fail with
+.BR EPERM .
+This preserves the execute bits as they were at the time of sealing,
+making the file either permanently executable or permanently unexecutable.
+.IP
+If this seal is applied to a file that is already executable,
+the kernel also implicitly applies
+.BR F_SEAL_SHRINK ,
+.BR F_SEAL_GROW ,
+.BR F_SEAL_WRITE ,
+and
+.BR F_SEAL_FUTURE_WRITE ,
+preventing any further modifications to the contents of the file.
.SH RETURN VALUE
.TP
.B F_GET_SEALS
base-commit: 9db8ca91f920b9aba40ed68de6b8da0ca9dbefaa
--
2.54.0.1013.g208068f2d8-goog
next reply other threads:[~2026-05-29 12:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-29 12:40 Pratyush Yadav [this message]
2026-05-29 13:12 ` [PATCH] man/man2const/F_{ADD,GET}_SEALS.2const: document F_SEAL_EXEC Alejandro Colomar
2026-05-29 13:28 ` Pratyush Yadav
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=20260529124047.1483026-1-pratyush@kernel.org \
--to=pratyush@kernel.org \
--cc=alx@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=david@kernel.org \
--cc=dverkamp@chromium.org \
--cc=hughd@google.com \
--cc=jeffxu@google.com \
--cc=linux-man@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pasha.tatashin@soleen.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