From: Alejandro Colomar <alx@kernel.org>
To: Florent Revest <revest@chromium.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Helge Kreutzmann <debian@helgefjell.de>
Cc: mario.blaettermann@gmail.com, linux-man@vger.kernel.org
Subject: Re: Issue in man page PR_SET_MDWE.2const
Date: Thu, 25 Dec 2025 21:54:46 +0100 [thread overview]
Message-ID: <aU2jhFY0ueqVHUJQ@devuan> (raw)
In-Reply-To: <aUv631UU4y9H1x90@meinfjell.helgefjelltest.de>
[-- Attachment #1: Type: text/plain, Size: 1908 bytes --]
Hi Helge, Florent, Catalin,
On Wed, Dec 24, 2025 at 02:38:23PM +0000, Helge Kreutzmann wrote:
> Without further ado, the following was found:
>
> Issue: mapping protections → mapping ?
>
> "New memory mapping protections can't be writable and executable. Non-"
> "executable mappings can't become executable."
That text was added in
commit 457ca4a9ae3eae9835a5c011851c4eb88b49d322
Author: Florent Revest <revest@chromium.org>
Date: Wed Oct 11 13:47:44 2023 +0200
prctl.2: Document PR_SET_MDWE and PR_GET_MDWE
Memory-Deny-Write-Execute is a W^X process control originally introduced
by Joey Gouly. I'm the author of the PR_MDWE_NO_INHERIT flag.
Signed-off-by: Florent Revest <revest@chromium.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
So let's ask the author and reviewer. The manual page says:
$ mansect DESCRIPTION man/man2const/PR_SET_MDWE.2const \
| MANWIDTH=64 man /dev/stdin \
| cat;
PR_SET_MDWE(2const) PR_SET_MDWE(2const)
DESCRIPTION
Set the calling process’ Memory‐Deny‐Write‐Execute protec‐
tion mask. Once protection bits are set, they can not be
changed.
mask must be a bit mask of:
PR_MDWE_REFUSE_EXEC_GAIN
New memory mapping protections can’t be writable
and executable. Non‐executable mappings can’t be‐
come executable.
PR_MDWE_NO_INHERIT (since Linux 6.6)
Do not propagate MDWE protection to child processes
on fork(2). Setting this bit requires setting
PR_MDWE_REFUSE_EXEC_GAIN too.
Linux man‐pages (unreleased) (date) PR_SET_MDWE(2const)
Do you agree with the wording fix proposal?
Have a lovely night!
Alex
--
<https://www.alejandro-colomar.es>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2025-12-25 20:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-24 14:38 Issue in man page PR_SET_MDWE.2const Helge Kreutzmann
2025-12-25 20:54 ` Alejandro Colomar [this message]
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=aU2jhFY0ueqVHUJQ@devuan \
--to=alx@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=debian@helgefjell.de \
--cc=linux-man@vger.kernel.org \
--cc=mario.blaettermann@gmail.com \
--cc=revest@chromium.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;
as well as URLs for NNTP newsgroup(s).