Re: Bug#970460: qemu-user: trashes argv[0] breaking multi-call binaries

2020-09-17 Thread Michael Tokarev
17.09.2020 10:56, John Paul Adrian Glaubitz wrote: > On 9/17/20 9:49 AM, Michael Tokarev wrote: >> You should not use upstream git of qemu, since it too lacks >> important patches like this, - please don't suggest people >> to use outdated sources.. :) > > I think

Re: Bug#970460: qemu-user: trashes argv[0] breaking multi-call binaries

2020-09-17 Thread Michael Tokarev
17.09.2020 10:08, John Paul Adrian Glaubitz wrote: > On 9/16/20 8:42 PM, Thorsten Glaser wrote: >> John Paul Adrian Glaubitz dixit: >> >>> That’s been fixed upstream and can be configured with the >>> qemu-binfmt.sh script and the option “preserved=yes”. >> >> $ locate qemu-binfmt.sh | wc >>

Re: Bug#970460: qemu-user: trashes argv[0] breaking multi-call binaries

2020-09-16 Thread Michael Tokarev
16.09.2020 22:55, John Paul Adrian Glaubitz wrote: > It's called "--persistent yes", not preserve, my bad. It is entirely different thing, --persistent (or --fix-binary. F flag) is here for quite some time and helps with chroots and the like. BTW, it turned out not that simple as I thought, the

Re: Bug#970460: qemu-user: trashes argv[0] breaking multi-call binaries

2020-09-16 Thread Michael Tokarev
16.09.2020 20:15, John Paul Adrian Glaubitz wrote: > >> On Sep 16, 2020, at 6:57 PM, Thorsten Glaser wrote: >> >> I’m attaching a test program that does the following: >> >> • if argv[1] is "-" it just outputs argv[0] and argv[1] >> • otherwise it also execve(2)s argv[1] with its argv[0] set to "