summary refs log tree commit diff stats
path: root/bsd-user/elfload.c
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2021-08-06 18:48:37 -0600
committerWarner Losh <imp@bsdimp.com>2021-09-10 14:13:06 -0600
commit312a0b1cbf941c37d3d3aeb1ed651613e04262b5 (patch)
tree2cf26e84457c6bfb969712ef2f323320f7478ecf /bsd-user/elfload.c
parent82792244daa3f500c8cc83c7532754b32e285eb8 (diff)
downloadfocaccia-qemu-312a0b1cbf941c37d3d3aeb1ed651613e04262b5.tar.gz
focaccia-qemu-312a0b1cbf941c37d3d3aeb1ed651613e04262b5.zip
bsd-user: Add system independent stack, data and text limiting
Eliminate the x86 specific stack stuff in favor of more generic control
over the process size:
    target_maxtsiz  max text size
    target_dfldsiz  initial data size limit
    target_maxdsiz  max data size
    target_dflssiz  initial stack size limit
    target_maxssiz  max stack size
    target_sgrowsiz amount to grow stack
These can be set on a per-arch basis, and the stack size can be set
on the command line. Adjust the stack size parameters at startup.

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'bsd-user/elfload.c')
-rw-r--r--bsd-user/elfload.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c
index c28ef34143..59465b71d4 100644
--- a/bsd-user/elfload.c
+++ b/bsd-user/elfload.c
@@ -204,7 +204,7 @@ static abi_ulong setup_arg_pages(abi_ulong p, struct bsd_binprm *bprm,
     /* Create enough stack to hold everything.  If we don't use
      * it for args, we'll use it for something else...
      */
-    size = x86_stack_size;
+    size = target_dflssiz;
     if (size < MAX_ARG_PAGES * TARGET_PAGE_SIZE)
         size = MAX_ARG_PAGES * TARGET_PAGE_SIZE;
     error = target_mmap(0,