From: Alejandro Colomar <alx@kernel.org>
To: Ben Kallus <benjamin.p.kallus.gr@dartmouth.edu>
Cc: linux-man@vger.kernel.org
Subject: Re: [PATCH] man/man2/mmap.2: Document that MAP_GROWSDOWN doesn't affect mmap return value.
Date: Wed, 18 Mar 2026 01:36:09 +0100 [thread overview]
Message-ID: <abnyaq8-JD9oturR@devuan> (raw)
In-Reply-To: <20260317214652.2135374-1-benjamin.p.kallus.gr@dartmouth.edu>
[-- Attachment #1: Type: text/plain, Size: 2451 bytes --]
Hi Ben,
> Subject: Re: [PATCH] man/man2/mmap.2: Document that MAP_GROWSDOWN
> doesn't affect mmap return value.
Please include patch version in the [] prefix. See
<https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING.d/patches/subject#n37>.
Also, please send In-Reply-To previous iterations. See
<https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING.d/patches/sendmail#n17>
And ideally, include a range-diff that compares the patch against the
previous iteration. See
<https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING.d/patches/range-diff>.
On 2026-03-17T17:46:52-0400, Ben Kallus wrote:
> The man page states that the MAP_GROWSDOWN flag causes the kernel to return an
> address one page lower than the mapping created. This is not true; the kernel
Please use two spaces after period. See
<https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING.d/patches/description#n44>.
> returns the base address of the mapping created, just as it does when
> MAP_GROWSDOWN is not passed. This can be confirmed by inspecting
> /proc/self/maps after making a gd mapping, and comparing it to the returned
> value from mmap.
Please include in the commit message the example program you sent in the
previous thread about this patch.
> Fixes: 176b1a76 (2016-11-21; "mmap.2: Add (much) more detail on MAP_GROWSDOWN")
>
> Signed-off-by: Ben Kallus <benjamin.p.kallus.gr@dartmouth.edu>
Please no blank lines between Fixes and SoB. The trailer should be a
single block.
Have a lovely night!
Alex
> ---
> man/man2/mmap.2 | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/man/man2/mmap.2 b/man/man2/mmap.2
> index 09e7933d3..20b94c243 100644
> --- a/man/man2/mmap.2
> +++ b/man/man2/mmap.2
> @@ -276,8 +276,6 @@ should check the returned address against the requested address.
> This flag is used for stacks.
> It indicates to the kernel virtual memory system that the mapping
> should extend downward in memory.
> -The return address is one page lower than the memory area that is
> -actually created in the process's virtual address space.
> Touching an address in the "guard" page below the mapping will cause
> the mapping to grow by a page.
> This growth can be repeated until the mapping grows to within a
> --
> 2.53.0
>
>
--
<https://www.alejandro-colomar.es>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-03-18 0:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-17 21:46 [PATCH] man/man2/mmap.2: Document that MAP_GROWSDOWN doesn't affect mmap return value Ben Kallus
2026-03-18 0:36 ` Alejandro Colomar [this message]
2026-03-18 14:49 ` [PATCH v3] " Ben Kallus
2026-03-19 0:37 ` Alejandro Colomar
-- strict thread matches above, loose matches on Subject: below --
2026-02-23 16:02 [PATCH] " Ben Kallus
2026-03-04 15:04 ` Alejandro Colomar
2026-03-04 16:38 ` Ben Kallus
2026-03-17 20:51 ` Ben Kallus
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=abnyaq8-JD9oturR@devuan \
--to=alx@kernel.org \
--cc=benjamin.p.kallus.gr@dartmouth.edu \
--cc=linux-man@vger.kernel.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