Re: [Qemu-devel] [PATCH] linux-user: add option to intercept execve() syscalls

2016-01-27 Thread Petros Angelatos
All raised issues fixed, I just sent v2 :) On Fri, Jan 22, 2016 at 3:00 AM, Laurent Vivier wrote: > > > Le 22/01/2016 11:47, Peter Maydell a écrit : >> On 22 January 2016 at 10:33, Laurent Vivier wrote: >>> Le 22/01/2016 11:01, Petros Angelatos a écrit :

Re: [Qemu-devel] [PATCH] linux-user: add option to intercept execve() syscalls

2016-01-22 Thread Peter Maydell
On 22 January 2016 at 10:33, Laurent Vivier wrote: > Le 22/01/2016 11:01, Petros Angelatos a écrit : >> This was my initial approach too, but argv[0] can be just the filename >> like "qemu-arm-static". And while I could add extra logic to look this >> up in the PATH, someone

Re: [Qemu-devel] [PATCH] linux-user: add option to intercept execve() syscalls

2016-01-22 Thread Petros Angelatos
>> diff --git a/linux-user/main.c b/linux-user/main.c >> index ee12035..5951279 100644 >> --- a/linux-user/main.c >> +++ b/linux-user/main.c >> @@ -79,6 +79,7 @@ static void usage(int exitcode); >> >> static const char *interp_prefix = CONFIG_QEMU_INTERP_PREFIX; >> const char

Re: [Qemu-devel] [PATCH] linux-user: add option to intercept execve() syscalls

2016-01-22 Thread Laurent Vivier
Le 22/01/2016 11:01, Petros Angelatos a écrit : >>> diff --git a/linux-user/main.c b/linux-user/main.c >>> index ee12035..5951279 100644 >>> --- a/linux-user/main.c >>> +++ b/linux-user/main.c >>> @@ -79,6 +79,7 @@ static void usage(int exitcode); >>> >>> static const char *interp_prefix =

Re: [Qemu-devel] [PATCH] linux-user: add option to intercept execve() syscalls

2016-01-22 Thread Laurent Vivier
Le 22/01/2016 11:47, Peter Maydell a écrit : > On 22 January 2016 at 10:33, Laurent Vivier wrote: >> Le 22/01/2016 11:01, Petros Angelatos a écrit : >>> This was my initial approach too, but argv[0] can be just the filename >>> like "qemu-arm-static". And while I could add

Re: [Qemu-devel] [PATCH] linux-user: add option to intercept execve() syscalls

2016-01-21 Thread Laurent Vivier
Le 18/01/2016 05:33, Petros Angelatos a écrit : > From: Petros Angelatos > > In order for one to use QEMU user mode emulation under a chroot, it is > required to use binfmt_misc. This can be avoided by QEMU never doing a > raw execve() to the host system. > > Introduce a

Re: [Qemu-devel] [PATCH] linux-user: add option to intercept execve() syscalls

2016-01-20 Thread Petros Angelatos
Hi Laurent, > Are there some reasons to not use binfmt_misc when we are able to do > chroot ? > > Moreover binfmt_misc allows to execute binaries that cannot be read, I > think it is not possible with an userspace solution. And binfmt_misc > also allows to use credential and security tokens from

Re: [Qemu-devel] [PATCH] linux-user: add option to intercept execve() syscalls

2016-01-20 Thread Laurent Vivier
Hi Petros, Le 18/01/2016 05:33, Petros Angelatos a écrit : > From: Petros Angelatos > > In order for one to use QEMU user mode emulation under a chroot, it is > required to use binfmt_misc. This can be avoided by QEMU never doing a > raw execve() to the host system. Are

[Qemu-devel] [PATCH] linux-user: add option to intercept execve() syscalls

2016-01-17 Thread Petros Angelatos
From: Petros Angelatos In order for one to use QEMU user mode emulation under a chroot, it is required to use binfmt_misc. This can be avoided by QEMU never doing a raw execve() to the host system. Introduce a new option, -execve=path, that sets the absolute path to the QEMU