public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
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 MAP_GROWSDOWN return val
Date: Tue, 27 Jan 2026 23:03:19 +0100	[thread overview]
Message-ID: <aXk13qiCiMyzqWu1@devuan> (raw)
In-Reply-To: <20260127142545.3328119-1-benjamin.p.kallus.gr@dartmouth.edu>

[-- Attachment #1: Type: text/plain, Size: 1476 bytes --]

Hi Ben,

On 2026-01-27T09:25:45-0500, Ben Kallus wrote:
> Previously, the man page stated 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 returns the base address of the mapping
> created. This can be confirmed by inspecting /proc/self/maps after
> making a gd mapping, and comparing it to the returned value from mmap.
> 
> Signed-off-by: Ben Kallus <benjamin.p.kallus.gr@dartmouth.edu>
> ---
>  man/man2/mmap.2 | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/man/man2/mmap.2 b/man/man2/mmap.2
> index 093b0caf1..9bfa88a65 100644
> --- a/man/man2/mmap.2
> +++ b/man/man2/mmap.2
> @@ -274,8 +274,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 patch only removes code.  Is this accidental or intended?  I think
this does not match the commit subject (which BTW has a cut word?)


Have a lovely day!
Alex

>  the mapping to grow by a page.
>  This growth can be repeated until the mapping grows to within a
> -- 
> 2.52.0
> 

-- 
<https://www.alejandro-colomar.es>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2026-01-27 22:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-27 14:25 [PATCH] man/man2/mmap.2: Document MAP_GROWSDOWN return val Ben Kallus
2026-01-27 22:03 ` Alejandro Colomar [this message]
2026-01-28  1:14   ` Ben Kallus
2026-02-10 23:39     ` Alejandro Colomar

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=aXk13qiCiMyzqWu1@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