qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Joel Holdsworth <joel.holdsworth@vcatechnology.com>
To: Laurent Vivier <laurent@vivier.eu>, qemu-devel@nongnu.org
Cc: riku.voipio@iki.fi, Vasileios.Kalintiris@imgtec.com
Subject: Re: [Qemu-devel] [PATCH v2 3/4] linux-user: pass elf interpreter prefix in execve
Date: Mon, 20 Jun 2016 20:57:22 +0100	[thread overview]
Message-ID: <57684AA2.20503@vcatechnology.com> (raw)
In-Reply-To: <44f0f73f-3630-5047-1d31-d7dff8a842c4@vivier.eu>

On 15/06/16 21:06, Laurent Vivier wrote:
> More details: why do we need this?
>
> Add your Signed-off-by.
>
> Le 14/06/2016 à 21:26, Joel Holdsworth a écrit :
>> ---
>>   linux-user/syscall.c | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
>> index 440986e..1513f0f 100644
>> --- a/linux-user/syscall.c
>> +++ b/linux-user/syscall.c
>> @@ -6667,7 +6667,7 @@ static abi_long qemu_execve(char *filename, char *argv[],
>>       char *i_arg = NULL, *i_name = NULL;
>>       char **qemu_argp, **argp;
>>       int i, j;
>> -    size_t qemu_argc = 3, argc, host_envc, envpc;
>> +    size_t qemu_argc = 5, argc, host_envc, envpc;
>>       int fd, ret;
>>       char *cp;
>>       size_t def_envc = 0, undef_envc = 0;
>> @@ -6782,6 +6782,8 @@ static abi_long qemu_execve(char *filename, char *argv[],
>>   
>>       /* set up the qemu arguments */
>>       *argp++ = strdup(qemu_execve_path);
>> +    *argp++ = strdup("-L");
>> +    *argp++ = strdup(path("/"));
> why "/"?
>
> You should propagate the one from the parent (if != NULL).

path("/") seems to be the easiest way to get access to 'static struct 
pathelem *base' in util/path.c, which is set from the parent's -L<path> 
in init_paths.

  reply	other threads:[~2016-06-20 19:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-14 19:26 [Qemu-devel] linux-user: add option to intercept execve() syscalls Joel Holdsworth
2016-06-14 19:26 ` [Qemu-devel] [PATCH v2 1/4] " Joel Holdsworth
2016-06-15 19:31   ` Laurent Vivier
2016-06-20 20:04     ` Joel Holdsworth
2016-06-14 19:26 ` [Qemu-devel] [PATCH v2 2/4] linux-user: pass environment arguments in execve Joel Holdsworth
2016-06-15 19:59   ` Laurent Vivier
2016-06-20 19:51     ` Joel Holdsworth
2016-06-20 20:29       ` Laurent Vivier
2016-06-20 21:27         ` Joel Holdsworth
2016-06-20 21:40           ` Peter Maydell
2016-06-20 22:15             ` Joel Holdsworth
2016-06-20 22:54               ` Peter Maydell
2016-06-14 19:26 ` [Qemu-devel] [PATCH v2 3/4] linux-user: pass elf interpreter prefix " Joel Holdsworth
2016-06-15 20:06   ` Laurent Vivier
2016-06-20 19:57     ` Joel Holdsworth [this message]
2016-06-14 19:26 ` [Qemu-devel] [PATCH v2 4/4] linux-user: pass strace argument " Joel Holdsworth
2016-06-15 20:37   ` Laurent Vivier
2016-06-20 20:02     ` Joel Holdsworth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57684AA2.20503@vcatechnology.com \
    --to=joel.holdsworth@vcatechnology.com \
    --cc=Vasileios.Kalintiris@imgtec.com \
    --cc=laurent@vivier.eu \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).