aboutsummaryrefslogtreecommitdiffstats
path: root/man2
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2019-05-05 07:34:13 -0500
committerMichael Kerrisk <mtk.manpages@gmail.com>2019-05-05 07:34:13 -0500
commit4a696f5ebd6bb22258e32b409134f57bd97fe7ed (patch)
tree32c711be07cab4038a7697deba01df3cdb8059a1 /man2
parentc7dc46d0a278cdeeb37107727bcf0bfe58d53ab6 (diff)
downloadman-pages-4a696f5ebd6bb22258e32b409134f57bd97fe7ed.tar.gz
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>
Diffstat (limited to 'man2')
-rw-r--r--man2/execve.24
1 files changed, 4 insertions, 0 deletions
diff --git a/man2/execve.2 b/man2/execve.2
index 082bcb1a4c..25360ceb15 100644
--- a/man2/execve.2
+++ b/man2/execve.2
@@ -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