[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] linux-user: Clean up arg_start/arg_end confusion
From: |
Peter Maydell |
Subject: |
Re: [PATCH] linux-user: Clean up arg_start/arg_end confusion |
Date: |
Fri, 18 Mar 2022 11:41:28 +0000 |
On Tue, 15 Mar 2022 at 22:47, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> We had two sets of variables: arg_start/arg_end, and
> arg_strings/env_strings. In linuxload.c, we set the
> first pair to the bounds of the argv strings, but in
> elfload.c, we set the first pair to the bounds of the
> argv pointers and the second pair to the bounds of
> the argv strings.
>
> Remove arg_start/arg_end, replacing them with the standard
> argc/argv/envc/envp values. Retain arg_strings/env_strings.
"Retain arg_strings/env_strings with the meaning we were using
in elfload.c" ? (ie linuxload.c changes to that definition).
> Update linuxload.c, elfload.c, and arm-compat-semi.c to match.
>
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/714
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> --- a/linux-user/linuxload.c
> +++ b/linux-user/linuxload.c
> @@ -92,33 +92,35 @@ abi_ulong loader_build_argptr(int envc, int argc,
> abi_ulong sp,
> envp = sp;
> sp -= (argc + 1) * n;
> argv = sp;
> + ts->info->envp = envp;
> + ts->info->envc = envc;
> + ts->info->argv = argv;
> + ts->info->argc = argc;
> +
> if (push_ptr) {
> - /* FIXME - handle put_user() failures */
Why are you deleting all these FIXME comments? That seems like an
unrelated change.
Otherwise
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM