public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] man/man2/mmap.2: Document MAP_GROWSDOWN return val
@ 2026-01-27 14:25 Ben Kallus
  2026-01-27 22:03 ` Alejandro Colomar
  0 siblings, 1 reply; 4+ messages in thread
From: Ben Kallus @ 2026-01-27 14:25 UTC (permalink / raw)
  To: alx; +Cc: linux-man, Ben Kallus

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 mapping to grow by a page.
 This growth can be repeated until the mapping grows to within a
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-02-10 23:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-27 14:25 [PATCH] man/man2/mmap.2: Document MAP_GROWSDOWN return val Ben Kallus
2026-01-27 22:03 ` Alejandro Colomar
2026-01-28  1:14   ` Ben Kallus
2026-02-10 23:39     ` Alejandro Colomar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox