Index: lib/libc/sys/mmap.2 =================================================================== --- lib/libc/sys/mmap.2 +++ lib/libc/sys/mmap.2 @@ -351,6 +351,8 @@ automatically grow. Guards prevent inadvertent use of the regions into which those stacks can grow without requiring mapping the whole stack in advance. +Size of the guard, in pages, is specified by sysctl +.Va security.bsd.stack_guard_page . .El .Pp The @@ -452,6 +454,11 @@ 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 or equal to the guard size. +.It Bq Er EINVAL .Dv MAP_FIXED was specified and the .Fa addr