Re: [Qemu-devel] [PATCH 2/2] linux-user: manage binfmt-misc preserve-arg[0] flag

2019-07-30 Thread Peter Maydell
On Wed, 17 Jul 2019 at 11:07, Laurent Vivier wrote: > QEMU is not able to detect if it has been started by binfmt_misc with > the preserve-arg[0] enabled or not, so it can't adapt the args analysis > to get the correct list. If the kernel provided a more useful interface (for instance telling us

Re: [Qemu-devel] [PATCH 2/2] linux-user: manage binfmt-misc preserve-arg[0] flag

2019-07-30 Thread John Paul Adrian Glaubitz
Hi! Sorry for the late reply! On 7/17/19 12:07 PM, Laurent Vivier wrote: > And I don't like to break existing things... > > What I can propose: > > 1- modify this patch to add a configure option: > >by default qemu will need the QEMU_ARGV0 but we will be able to > define at configure time

Re: [Qemu-devel] [PATCH 2/2] linux-user: manage binfmt-misc preserve-arg[0] flag

2019-07-17 Thread Laurent Vivier
Le 14/07/2019 à 18:19, John Paul Adrian Glaubitz a écrit : > Hi! > >> On Jul 14, 2019, at 3:40 PM, Laurent Vivier wrote: >> >> Add --preserve-arg0 in qemu-binfmt-conf.sh to configure the preserve-arg0 >> flag. >> >> Now, if QEMU is started with -0 or QEMU_ARGV0 and an empty parameter >> argv[0] (

Re: [Qemu-devel] [PATCH 2/2] linux-user: manage binfmt-misc preserve-arg[0] flag

2019-07-14 Thread John Paul Adrian Glaubitz
Hi! > On Jul 14, 2019, at 3:40 PM, Laurent Vivier wrote: > > Add --preserve-arg0 in qemu-binfmt-conf.sh to configure the preserve-arg0 > flag. > > Now, if QEMU is started with -0 or QEMU_ARGV0 and an empty parameter > argv[0] (the full pathname provided by binfmt-misc) is removed and > replaced

[Qemu-devel] [PATCH 2/2] linux-user: manage binfmt-misc preserve-arg[0] flag

2019-07-14 Thread Laurent Vivier
Add --preserve-arg0 in qemu-binfmt-conf.sh to configure the preserve-arg0 flag. Now, if QEMU is started with -0 or QEMU_ARGV0 and an empty parameter argv[0] (the full pathname provided by binfmt-misc) is removed and replaced by argv[1] (the original argv[0] provided by binfmt-misc when 'P'/preserv