All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: Helge Deller <deller@gmx.de>,
	John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
	Laurent Vivier <laurent@vivier.eu>,
	qemu-devel@nongnu.org
Subject: Re: [PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag
Date: Mon, 22 Feb 2021 18:11:52 +0300	[thread overview]
Message-ID: <c36947bf-81e3-cc18-4b81-7a36cf5585fa@msgid.tls.msk.ru> (raw)
In-Reply-To: <e14413e5-af09-e101-6320-34e90811f414@gmx.de>

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 particular system, it relies on a
>> special name of its own argv[0] when registering the binfmt entry.  In order to
>> utilize it, we create a special-named symlink to qemu-foo and register that one
>> with the binfmt-misc subsystem, no matter if it is systemd or binfmt-support or
>> whatever else.
> 
> ... which is pretty hackish (although it apparently works; I haven't tested myself).

While it is hackish at first glance, the more I think about it the less hackish it
becomes.  The thing is - we're talking about different behavour of some program when
it sees different argv[0]. We can just as well use the same mechanism to support this.

> The big question remains:
> Is this "hack" just a temporary workaround which should be kept, or
> is the support via the kernel-patch from Laurent the long-term and better solution?

I don't care either way or the other, and I don't see the Laurent's one as better,
either. It's a long-term issue where quite some bullets has been spent already and
quite some spears has been broken. I come across a solution which actually works and
let others who waited for this issue to be solved to do their work.

At the very least, the one requiring kernel patch does not work on current distributions,
while my version works just fine, and we'll keep it in debian for now since it allows
to unbreak quite some other things. If qemu upstream will take another approach it is
entirely fine with me (after all that's why I sent an RFC in the first place, - to show
another (at least one) possible solution and to hear comments, and to develop something
which is good in the end). Hopefully we'll be able to switch to a better solution once
it's settled and will be available within current distributions.

Thanks,

/mjt


  reply	other threads:[~2021-02-22 15:19 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-22 10:50 [PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag Laurent Vivier
2021-02-22 10:57 ` no-reply
2021-02-22 10:58 ` John Paul Adrian Glaubitz
2021-02-22 12:21   ` Laurent Vivier
2021-02-22 14:38   ` Michael Tokarev
2021-02-22 14:43     ` John Paul Adrian Glaubitz
2021-02-22 14:46       ` Michael Tokarev
2021-02-22 14:54         ` John Paul Adrian Glaubitz
2021-02-22 14:58           ` Michael Tokarev
2021-02-22 15:02             ` Helge Deller
2021-02-22 15:11               ` Michael Tokarev [this message]
2021-02-22 15:09             ` John Paul Adrian Glaubitz
2021-02-22 15:15               ` Michael Tokarev
2021-03-01 10:35             ` John Paul Adrian Glaubitz
2021-03-01 10:40               ` Michael Tokarev
2021-03-01 11:07                 ` John Paul Adrian Glaubitz
2021-03-01 11:16                   ` Michael Tokarev
2021-03-01 11:35                     ` John Paul Adrian Glaubitz
2021-02-22 14:45 ` Michael Tokarev
2021-02-22 17:09   ` Laurent Vivier
2021-02-22 20:07     ` Michael Tokarev
2021-03-09 20:15 ` Laurent Vivier
2021-09-06 18:00 ` Michael Tokarev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c36947bf-81e3-cc18-4b81-7a36cf5585fa@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=deller@gmx.de \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=laurent@vivier.eu \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.