diff options
author | sobomax <sobomax@FreeBSD.org> | 2005-01-29 23:12:00 +0000 |
---|---|---|
committer | sobomax <sobomax@FreeBSD.org> | 2005-01-29 23:12:00 +0000 |
commit | f489acaf0f5bae70444702cdcc02ab81d3b6b51a (patch) | |
tree | c697d47092272c8c6973b42ba0a424e9763f7ce5 /sys/compat/ia32 | |
parent | 1c7b5012657233c6ea65df68e8223e60b6f822a0 (diff) | |
download | FreeBSD-src-f489acaf0f5bae70444702cdcc02ab81d3b6b51a.zip FreeBSD-src-f489acaf0f5bae70444702cdcc02ab81d3b6b51a.tar.gz |
o Split out kernel part of execve(2) syscall into two parts: one that
copies arguments into the kernel space and one that operates
completely in the kernel space;
o use kernel-only version of execve(2) to kill another stackgap in
linuxlator/i386.
Obtained from: DragonFlyBSD (partially)
MFC after: 2 weeks
Diffstat (limited to 'sys/compat/ia32')
-rw-r--r-- | sys/compat/ia32/ia32_sysvec.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/compat/ia32/ia32_sysvec.c b/sys/compat/ia32/ia32_sysvec.c index a2d1435..1052d61 100644 --- a/sys/compat/ia32/ia32_sysvec.c +++ b/sys/compat/ia32/ia32_sysvec.c @@ -183,7 +183,7 @@ ia32_copyout_strings(struct image_params *imgp) arginfo = (struct freebsd32_ps_strings *)FREEBSD32_PS_STRINGS; szsigcode = *(imgp->proc->p_sysent->sv_szsigcode); destp = (caddr_t)arginfo - szsigcode - SPARE_USRSPACE - - roundup((ARG_MAX - imgp->stringspace), sizeof(char *)); + roundup((ARG_MAX - imgp->args->stringspace), sizeof(char *)); /* * install sigcode @@ -208,7 +208,7 @@ ia32_copyout_strings(struct image_params *imgp) * the arg and env vector sets,and imgp->auxarg_size is room * for argument of Runtime loader. */ - vectp = (u_int32_t *) (destp - (imgp->argc + imgp->envc + 2 + + vectp = (u_int32_t *) (destp - (imgp->args->argc + imgp->args->envc + 2 + imgp->auxarg_size) * sizeof(u_int32_t)); } else @@ -217,20 +217,20 @@ ia32_copyout_strings(struct image_params *imgp) * the arg and env vector sets */ vectp = (u_int32_t *) - (destp - (imgp->argc + imgp->envc + 2) * sizeof(u_int32_t)); + (destp - (imgp->args->argc + imgp->args->envc + 2) * sizeof(u_int32_t)); /* * vectp also becomes our initial stack base */ stack_base = vectp; - stringp = imgp->stringbase; - argc = imgp->argc; - envc = imgp->envc; + stringp = imgp->args->begin_argv; + argc = imgp->args->argc; + envc = imgp->args->envc; /* * Copy out strings - arguments and environment. */ - copyout(stringp, destp, ARG_MAX - imgp->stringspace); + copyout(stringp, destp, ARG_MAX - imgp->args->stringspace); /* * Fill in "ps_strings" struct for ps, w, etc. |