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

2016-02-14 Thread Petros Angelatos
-by: Petros Angelatos Tested-by: Laurent Vivier Reviewed-by: Laurent Vivier --- v3 changes: - rebase the patchset against current code linux-user/main.c| 36 linux-user/qemu.h| 1 + linux-user/syscall.c | 117

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 : >>>&

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

2016-01-27 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, that uses the current QEMU interpreter to intercept execve

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 *qemu_uname_release;

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 t

[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 interpreter and