Re: [PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag

2021-09-06 Thread Michael Tokarev
> Add --preserve-argv0 in qemu-binfmt-conf.sh to configure the preserve-argv0 > flag. ... > diff --git a/linux-user/main.c b/linux-user/main.c > @@ -697,6 +707,20 @@ int main(int argc, char **argv, char **envp) > } > } > > +/* > + * get binfmt_misc flags > + */ > +pr

Re: [PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag

2021-03-09 Thread Laurent Vivier
Le 22/02/2021 à 11:50, Laurent Vivier a écrit : > Add --preserve-argv0 in qemu-binfmt-conf.sh to configure the preserve-argv0 > flag. > > This patch allows to use new flag in AT_FLAGS to detect if > preserve-argv0 is configured for this interpreter: > argv[0] (the full pathname provided by binfmt-

Re: [PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag

2021-03-01 Thread John Paul Adrian Glaubitz
On 3/1/21 12:16 PM, Michael Tokarev wrote: > Oh. You tried to use qemu-user, not qemu-user-static.. > Well. I tried both packages. I also tried systemd-binfmt and binfmt-support, neither worked. > This is all about how qemu-user works, be it debian or > any other distribution, - it is basically t

Re: [PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag

2021-03-01 Thread Michael Tokarev
01.03.2021 14:07, John Paul Adrian Glaubitz wrote: On 3/1/21 11:40 AM, Michael Tokarev wrote: 01.03.2021 13:35, John Paul Adrian Glaubitz wrote: .. I have been trying to get qemu-user working with sbuild as it is shipped in Debian unstable now but I didn't have any success. Do you have some i

Re: [PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag

2021-03-01 Thread John Paul Adrian Glaubitz
On 3/1/21 11:40 AM, Michael Tokarev wrote: > 01.03.2021 13:35, John Paul Adrian Glaubitz wrote: > .. >> I have been trying to get qemu-user working with sbuild as it is shipped in >> Debian >> unstable now but I didn't have any success. >> >> Do you have some instructions somewhere how to get qemu

Re: [PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag

2021-03-01 Thread Michael Tokarev
01.03.2021 13:35, John Paul Adrian Glaubitz wrote: .. I have been trying to get qemu-user working with sbuild as it is shipped in Debian unstable now but I didn't have any success. Do you have some instructions somewhere how to get qemu-user working with sbuild? Have you seen #983087 which I

Re: [PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag

2021-03-01 Thread John Paul Adrian Glaubitz
Hi Michael! On 2/22/21 3:58 PM, Michael Tokarev wrote: > 22.02.2021 17:54, John Paul Adrian Glaubitz wrote: > >> OK, gotcha. Is it supposed to work with systemd-binfmt? It looks like it >> depends >> on the old binfmt-support package. > > the qemu 4-line patch does not depend on any particular

Re: [PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag

2021-02-22 Thread Michael Tokarev
22.02.2021 20:09, Laurent Vivier wrote: Here it is: https://lists.gnu.org/archive/html/qemu-devel/2021-02/msg04639.html In this case, we don't want to modify QEMU to manage special case based on the binary name but instead use a wrapper: A wrapper immediately defeats the purpose of the fix-

Re: [PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag

2021-02-22 Thread Laurent Vivier
Le 22/02/2021 à 15:45, Michael Tokarev a écrit : > 22.02.2021 13:50, Laurent Vivier wrote: >> Add --preserve-argv0 in qemu-binfmt-conf.sh to configure the preserve-argv0 >> flag. >> >> This patch allows to use new flag in AT_FLAGS to detect if >> preserve-argv0 is configured for this interpreter: >

Re: [PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag

2021-02-22 Thread Michael Tokarev
22.02.2021 18:09, John Paul Adrian Glaubitz wrote: OK, I was wondering this because qemu-user-static still pulls in the binfmt-support package: sure. Debian does not _depend_ on systemd still (I don't want this flamewar). To me it is binfmt-support which should adopt to systemd-binfmt, trans

Re: [PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag

2021-02-22 Thread John Paul Adrian Glaubitz
On 2/22/21 3:58 PM, Michael Tokarev wrote: > 22.02.2021 17:54, John Paul Adrian Glaubitz wrote: > >> OK, gotcha. Is it supposed to work with systemd-binfmt? It looks like it >> depends >> on the old binfmt-support package. > > the qemu 4-line patch does not depend on any particular system, it re

Re: [PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag

2021-02-22 Thread Michael Tokarev
22.02.2021 18:02, Helge Deller wrote: On 2/22/21 3:58 PM, Michael Tokarev wrote: 22.02.2021 17:54, John Paul Adrian Glaubitz wrote: OK, gotcha. Is it supposed to work with systemd-binfmt? It looks like it depends on the old binfmt-support package. the qemu 4-line patch does not depend on any

Re: [PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag

2021-02-22 Thread Helge Deller
On 2/22/21 3:58 PM, Michael Tokarev wrote: 22.02.2021 17:54, John Paul Adrian Glaubitz wrote: OK, gotcha. Is it supposed to work with systemd-binfmt? It looks like it depends on the old binfmt-support package. the qemu 4-line patch does not depend on any particular system, it relies on a spec

Re: [PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag

2021-02-22 Thread Michael Tokarev
22.02.2021 17:54, John Paul Adrian Glaubitz wrote: OK, gotcha. Is it supposed to work with systemd-binfmt? It looks like it depends on the old binfmt-support package. the qemu 4-line patch does not depend on any particular system, it relies on a special name of its own argv[0] when registering

Re: [PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag

2021-02-22 Thread Michael Tokarev
22.02.2021 17:43, John Paul Adrian Glaubitz wrote: On 2/22/21 3:38 PM, Michael Tokarev wrote: It's been fixed a week or so ago. Doesn't the patch require a kernel fix which is only present in Linux 5.12? No it does not. My approach does not require kernel support but it relies on special

Re: [PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag

2021-02-22 Thread John Paul Adrian Glaubitz
On 2/22/21 3:46 PM, Michael Tokarev wrote: > 22.02.2021 17:43, John Paul Adrian Glaubitz wrote: >> On 2/22/21 3:38 PM, Michael Tokarev wrote: > >>> >>> It's been fixed a week or so ago. >> >> Doesn't the patch require a kernel fix which is only present in Linux 5.12? > > No it does not. My approa

Re: [PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag

2021-02-22 Thread John Paul Adrian Glaubitz
On 2/22/21 3:38 PM, Michael Tokarev wrote: > 22.02.2021 13:58, John Paul Adrian Glaubitz wrote: >> Hi Laurent! >> >> On 2/22/21 11:50 AM, Laurent Vivier wrote: >>> Add --preserve-argv0 in qemu-binfmt-conf.sh to configure the preserve-argv0 >>> flag. >>> >>> This patch allows to use new flag in AT_F

Re: [PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag

2021-02-22 Thread Michael Tokarev
22.02.2021 13:50, Laurent Vivier wrote: Add --preserve-argv0 in qemu-binfmt-conf.sh to configure the preserve-argv0 flag. This patch allows to use new flag in AT_FLAGS to detect if preserve-argv0 is configured for this interpreter: argv[0] (the full pathname provided by binfmt-misc) is removed a

Re: [PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag

2021-02-22 Thread Michael Tokarev
22.02.2021 13:58, John Paul Adrian Glaubitz wrote: Hi Laurent! On 2/22/21 11:50 AM, Laurent Vivier wrote: Add --preserve-argv0 in qemu-binfmt-conf.sh to configure the preserve-argv0 flag. This patch allows to use new flag in AT_FLAGS to detect if preserve-argv0 is configured for this interpret

Re: [PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag

2021-02-22 Thread Laurent Vivier
Le 22/02/2021 à 11:58, John Paul Adrian Glaubitz a écrit : > Hi Laurent! > > On 2/22/21 11:50 AM, Laurent Vivier wrote: >> Add --preserve-argv0 in qemu-binfmt-conf.sh to configure the preserve-argv0 >> flag. >> >> This patch allows to use new flag in AT_FLAGS to detect if >> preserve-argv0 is conf

Re: [PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag

2021-02-22 Thread John Paul Adrian Glaubitz
Hi Laurent! On 2/22/21 11:50 AM, Laurent Vivier wrote: > Add --preserve-argv0 in qemu-binfmt-conf.sh to configure the preserve-argv0 > flag. > > This patch allows to use new flag in AT_FLAGS to detect if > preserve-argv0 is configured for this interpreter: > argv[0] (the full pathname provided by

Re: [PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag

2021-02-22 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210222105004.1642234-1-laur...@vivier.eu/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210222105004.1642234-1-laur...@vivier.eu Subject: [PATCH] linux-user: manage binfmt

[PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag

2021-02-22 Thread Laurent Vivier
Add --preserve-argv0 in qemu-binfmt-conf.sh to configure the preserve-argv0 flag. This patch allows to use new flag in AT_FLAGS to detect if preserve-argv0 is configured for this interpreter: argv[0] (the full pathname provided by binfmt-misc) is removed and replaced by argv[1] (the original argv[