Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Oct 2020 21:40:33 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r366918 - head/lib/libc/sys
Message-ID:  <202010212140.09LLeXIJ087131@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Wed Oct 21 21:40:33 2020
New Revision: 366918
URL: https://svnweb.freebsd.org/changeset/base/366918

Log:
  mmap(2): Document guard size for MAP_STACK and related EINVAL.
  
  Based on submission by:	emaste
  Reviewed by:	emaste, markj
  Sponsored by:	The FreeBSD Foundation
  MFC after:	1 week
  Differential revision:	https://reviews.freebsd.org/D26894

Modified:
  head/lib/libc/sys/mmap.2

Modified: head/lib/libc/sys/mmap.2
==============================================================================
--- head/lib/libc/sys/mmap.2	Wed Oct 21 21:28:20 2020	(r366917)
+++ head/lib/libc/sys/mmap.2	Wed Oct 21 21:40:33 2020	(r366918)
@@ -28,7 +28,7 @@
 .\"	@(#)mmap.2	8.4 (Berkeley) 5/11/95
 .\" $FreeBSD$
 .\"
-.Dd February 26, 2020
+.Dd October 21, 2020
 .Dt MMAP 2
 .Os
 .Sh NAME
@@ -351,6 +351,8 @@ Stacks created with
 automatically grow.
 Guards prevent inadvertent use of the regions into which those
 stacks can grow without requiring mapping the whole stack in advance.
+The size of the guard, in pages, is specified by sysctl
+.Dv security.bsd.stack_guard_page .
 .El
 .Pp
 The
@@ -451,6 +453,11 @@ or
 .Dv MAP_STACK
 was specified.
 At least one of these flags must be included.
+.It Bq Er EINVAL
+.Dv MAP_STACK
+was specified and
+.Va len
+is less than or equal to the guard size.
 .It Bq Er EINVAL
 .Dv MAP_FIXED
 was specified and the



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202010212140.09LLeXIJ087131>