From: Markus Armbruster <armbru@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
"Gabriel L . Somlo" <somlo@cmu.edu>,
Laszlo Ersek <lersek@redhat.com>,
qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v3] fw_cfg: RFQDN rules, documentation
Date: Wed, 13 Apr 2016 10:59:35 +0200 [thread overview]
Message-ID: <8760vlq3yg.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <20160411142509-mutt-send-email-mst@redhat.com> (Michael S. Tsirkin's message of "Mon, 11 Apr 2016 14:31:21 +0300")
"Michael S. Tsirkin" <mst@redhat.com> writes:
> On Mon, Apr 11, 2016 at 01:04:14PM +0200, Markus Armbruster wrote:
>> My best guess
>> is you're referring to the part where I challenge mapping
>> /unsupported/root/FOO to FOO. I find that baroque. I can accept
>> baroque when I see a reason. That's why I asked for it. "I got ACKs
>> for it" is not a particular satisfying reason, but I figure you got
>> another one. Do tell :)
>
> The issue I am trying to address is that users can put stuff
> outside "opt/" without realizing they are violating any rules.
> I do not think printing a warning is sufficient for this:
> it is masked by tools too often.
> Thus, anything outside "opt/" must be forbidden and cause a failure.
I don't buy your "users who don't read warnings must be protected from
their own foolishness and/or the foolishness of their tools" logic.
Specifically, I don't buy the "must". If we can protect them without
complicating or breaking stuff, sure, why not. But not at all costs.
Before your patch, -fw_cfg's name parameter is the FW_CFG filename.
Your patch replaces this by a rather baroque mapping:
unsupported/root/FOO -> FOO
opt/FOO -> opt/FOO
anything else is an error
I object to complicating the user interface just to create some way for
the user to say "I mean it, now go out of my way already" to be
permitted to do things that might conceivably break some day. Even more
so when they can be expected to break cleanly.
Here's what happens when a -fw_cfg collides with QEMU's own usage:
$ upstream-qemu -nodefaults -S -display none -fw_cfg etc/boot-fail-wait,string=foo
upstream-qemu: -fw_cfg etc/boot-fail-wait,string=foo: warning: externally provided fw_cfg item names should be prefixed with "opt/"
upstream-qemu: -fw_cfg etc/boot-fail-wait,string=foo: duplicate fw_cfg file name: etc/boot-fail-wait
[Exit 1 ]
I have a hard time coming up with realistic unclean breakage. Here's my
best one: somebody picks an FW_CFG filename F unwisely, bakes it into
guests of kind A, and uses it with -fw_cfg. Does nothing for guests of
other kinds, but let's assume the user gives the -fw_cfg anyway. Then a
new QEMU version comes out that uses the same filename for some other
purpose, and guests of kind B use it. Now the existing use -fw_cfg
F,... with an old QEMU and a new guest of kind B doesn't do nothing
anymore.
Furthermore, -fw_cfg was added in 2.4.0, so this looks like an
incompatible change. We don't break backward compatibility just because
we fear some users can't be bothered to read warnings. We require hard
evidence of somebody suffering to a degree that clearly exceeds the
suffering caused by breaking prior usage through incompatible change.
> Gerd and others asked for a way to bypass this "for development"
> which presumably means they way a quick way to develop guest
> code interacting with QEMU without changing qemu proper,
> with the intent to merge support into QEMU a bit later.
>
> We could add a special flag for this instead but the mapping
> is a couple of lines of code, so seems easier,
> the point is to have "unsupported" there.
Honestly, I consider -fw_cfg misuse pretty much a non-issue. Quoting
myself:
We should definitely try not to trap the user. Obvious usage should
be as safe as we can make it. Risky usage should be marked in the
docs and/or warn on use.
However, we should not try to stop our users from doing stupid
things, as that would also stop them from doing clever things.
-fw_cfg is a "Debug/Expert" option. There is no obvious usage.
Protecting users from themselves 100% is a fool's errand. You're
welcome to try (I actually appreciate it), but it's insufficient
justification for backward incompatibility and for user interface
baroqueness.
To make forward progress, I recommend to split this patch into an
uncontroversial and a controversial part. The uncontroversial part are
the RFQDN rules.
next prev parent reply other threads:[~2016-04-13 8:59 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-08 7:54 [Qemu-devel] [PATCH v3] fw_cfg: RFQDN rules, documentation Michael S. Tsirkin
2016-04-08 16:31 ` Markus Armbruster
2016-04-09 17:05 ` Michael S. Tsirkin
2016-04-11 11:04 ` Markus Armbruster
2016-04-11 11:31 ` Michael S. Tsirkin
2016-04-13 8:59 ` Markus Armbruster [this message]
2016-04-13 11:00 ` Michael S. Tsirkin
2016-04-13 16:17 ` Markus Armbruster
2016-04-13 17:53 ` Michael S. Tsirkin
2016-04-14 7:36 ` Markus Armbruster
2016-04-14 8:10 ` Michael S. Tsirkin
2016-04-14 11:28 ` Markus Armbruster
2016-04-13 14:44 ` Michael S. Tsirkin
2016-04-13 16:19 ` Markus Armbruster
2016-04-13 17:53 ` Michael S. Tsirkin
2016-04-14 7:39 ` Markus Armbruster
2016-04-14 8:11 ` Michael S. Tsirkin
2016-04-14 11:29 ` Markus Armbruster
2016-04-14 12:13 ` Michael S. Tsirkin
2016-04-15 15:39 ` Markus Armbruster
2016-04-17 6:55 ` Michael S. Tsirkin
2016-04-18 16:42 ` Markus Armbruster
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=8760vlq3yg.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=kraxel@redhat.com \
--cc=lersek@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=somlo@cmu.edu \
/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.