From: "Michael S. Tsirkin" <mst@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2] vl.c: disallow command line fw cfg without opt/
Date: Wed, 16 Mar 2016 18:50:57 +0200 [thread overview]
Message-ID: <20160316183327-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <87egbao07a.fsf@blackfin.pond.sub.org>
On Wed, Mar 16, 2016 at 05:29:45PM +0100, Markus Armbruster wrote:
> "Michael S. Tsirkin" <mst@redhat.com> writes:
>
> > Allowing arbitary file names on command line is setting us up for
> > failure: future guests will look for a specific QEMU-specified name and
> > will get confused finding a user file there.
> >
> > We do warn but people are conditioned to ignore warnings by now,
> > so at best that will help users debug problem, not avoid it.
> >
> > Disable this by default, so distros don't get to deal with it,
> > but leave an option for developers to configure this in,
> > with scary warnings so people only do it if they know
> > what they are doing.
> >
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>
> I'm having a hard time to see the point.
Frankly, I am having a hard time to see the point of exposing fw cfg to
users at all. It was designed as an internal interface between QEMU PC
hardware and firmware. As a PC maintainer, I do not like it that users
get to poke at PC internals.
So it is yet another way to pass binaries to Linux guests. Don't we
have enough of these? But Gerd likes it for some reason, and merged it.
OK.
But please find a way to make sure it does not conflict with its current
usage in PC. Asking that all files have an "opt/" prefix is one way
but only if it is enforced.
This is polluting global namespace.
> There are *countless* ways
> users can mess up their guests from the command line or the monitor.
> Yet we get so hung up on this rather obscure one to attempt to catch
> some (but far from all) misuses that may trigger it, and then, because
> that interferes with debugging, add a *configure* option to suppress it
> again.
In fact, how does it interfere with debugging? debugging what? by whom?
I think we should figure that out instead of carrying more opaque binaries
around.
E.g. if people want to replace built-in ACPI tables, say so,
and we'll look at sane ways to do this that do not
involve poking at acpi internals.
> Misuse of -fw_cfg isn't even a molehill, but adding a configure option
> *is* making a mountain out of it.
>
Yea. That configure hack is an attempt at a compromise.
But maybe the real fix is to rip fw cfg tweaking from
command line out completely, at least for 2.6.
> If you know what "fw cfg" is (few users do), and know how to put the
> user-specified fw cfg files feature to use (even fewer), you're damn
> well expected to know to stick to /opt or else. We already print a
> reminder. That's as far as I'd want us to go.
What happens is that inevitable someone finds a bug, and then
finds a work around, and blog posts spring up advertising
the fix, and you can never go back again.
Or a tool uses this, no one notices for years,
and after an update someone gets to debug it
until finally the warning is noticed.
Or more likely it all ends up in the launchpad/bugzilla,
with yet another useful tool broken for no good reason.
--
MST
next prev parent reply other threads:[~2016-03-16 16:51 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-15 14:47 [Qemu-devel] [PATCH v2] vl.c: disallow command line fw cfg without opt/ Michael S. Tsirkin
2016-03-16 16:29 ` Markus Armbruster
2016-03-16 16:50 ` Michael S. Tsirkin [this message]
2016-03-16 18:15 ` Gabriel L. Somlo
2016-03-16 18:35 ` Laszlo Ersek
2016-03-16 18:43 ` Michael S. Tsirkin
2016-03-16 19:15 ` Laszlo Ersek
2016-03-16 20:22 ` Michael S. Tsirkin
2016-03-16 20:24 ` Michael S. Tsirkin
2016-03-16 20:31 ` Michael S. Tsirkin
2016-03-17 8:49 ` Laszlo Ersek
2016-03-17 9:40 ` Paolo Bonzini
2016-03-17 11:32 ` Michael S. Tsirkin
2016-03-17 13:12 ` Paolo Bonzini
2016-03-17 13:15 ` Michael S. Tsirkin
2016-03-17 8:42 ` Gerd Hoffmann
2016-03-17 9:43 ` Laszlo Ersek
2016-03-17 10:22 ` Gerd Hoffmann
2016-03-17 13:28 ` Laszlo Ersek
2016-03-17 13:35 ` Michael S. Tsirkin
2016-03-17 13:37 ` Paolo Bonzini
2016-03-17 16:59 ` Gerd Hoffmann
2016-03-17 13:23 ` Michael S. Tsirkin
2016-03-17 9:49 ` Laszlo Ersek
2016-03-17 10:09 ` Markus Armbruster
2016-03-17 13:13 ` Michael S. Tsirkin
2016-03-17 13:30 ` Paolo Bonzini
2016-03-17 13:49 ` Laszlo Ersek
2016-03-17 13:49 ` Michael S. Tsirkin
2016-03-17 13:55 ` Paolo Bonzini
2016-03-17 14:17 ` Michael S. Tsirkin
2016-03-17 14:50 ` Paolo Bonzini
2016-03-17 15:40 ` Michael S. Tsirkin
2016-03-17 17:17 ` Gerd Hoffmann
2016-03-17 19:35 ` Paolo Bonzini
2016-03-17 19:55 ` Michael S. Tsirkin
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=20160316183327-mutt-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=armbru@redhat.com \
--cc=kraxel@redhat.com \
--cc=pbonzini@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).