Le 16/09/2020 à 19:53, Michael Tokarev a écrit : > 16.09.2020 20:15, John Paul Adrian Glaubitz wrote: >> >>> On Sep 16, 2020, at 6:57 PM, Thorsten Glaser <t...@mirbsd.de> 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 "meow" >> >> That’s been fixed upstream and can be configured with the qemu-binfmt.sh >> script and the option “preserved=yes”. > > Where it's been fixed? current git version of scripts/qemu-binfmt-conf.sh > does not have 'preserved' option, and if the P flag is set when registering > binfmt, the kernel will _prepend_ additional argv[0] element which is not > expected by current linux-user/main.c code (so the tst.c example will be > running with 3 args, not 2).
Yes, it's not fixed. For 10 months I'm trying to have a patch merged into the kernel to be able to detect if PRESERVE flag is set or not. https://patchwork.kernel.org/patch/11354255/ Thanks, Laurent