execve.2: Note that stack+environ size is also limited to 3/4 of _STK_LIM

In fs/exec.c::prepare_arg_pages(), we have:

        limit = _STK_LIM / 4 * 3;
        limit = min(limit, bprm->rlim_stack.rlim_cur / 4);

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2019-05-05 07:34:13 -05:00
parent c7dc46d0a2
commit 4a696f5ebd
1 changed files with 4 additions and 0 deletions

View File

@ -387,6 +387,10 @@ stack size.
ensures that the new program always has some stack space.)
.\" Ollie: That doesn't include the lists of pointers, though,
.\" so the actual usage is a bit higher (1 pointer per argument).
Additionally, the total size is limited to 3/4 of the value
of the kernel constant
.B _STK_LIM
(8 Mibibytes).
Since Linux 2.6.25,
the kernel places a floor of 32 pages on this size limit,
so that, even when