qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: pkrempa@redhat.com, qemu-block@nongnu.org, kchamart@redhat.com,
	libvir-list@redhat.com, qemu-devel@nongnu.org, mreitz@redhat.com
Subject: Re: [PATCH v6 08/10] iotests: Specify explicit backing format where sensible
Date: Tue, 7 Jul 2020 14:57:04 -0500	[thread overview]
Message-ID: <8cef9936-4373-db92-90f0-ee208b203a47@redhat.com> (raw)
In-Reply-To: <20200707160701.GE7002@linux.fritz.box>

On 7/7/20 11:07 AM, Kevin Wolf wrote:
> Am 06.07.2020 um 22:39 hat Eric Blake geschrieben:
>> There are many existing qcow2 images that specify a backing file but
>> no format.  This has been the source of CVEs in the past, but has
>> become more prominent of a problem now that libvirt has switched to
>> -blockdev.  With older -drive, at least the probing was always done by
>> qemu (so the only risk of a changed format between successive boots of
>> a guest was if qemu was upgraded and probed differently).  But with
>> newer -blockdev, libvirt must specify a format; if libvirt guesses raw
>> where the image was formatted, this results in data corruption visible
>> to the guest; conversely, if libvirt guesses qcow2 where qemu was
>> using raw, this can result in potential security holes, so modern
>> libvirt instead refuses to use images without explicit backing format.
>>
>> The change in libvirt to reject images without explicit backing format
>> has pointed out that a number of tools have been far too reliant on
>> probing in the past.  It's time to set a better example in our own
>> iotests of properly setting this parameter.
>>
>> iotest calls to create, rebase, and convert are all impacted to some
>> degree.  It's a bit annoying that we are inconsistent on command line
>> - while all of those accept -o backing_file=...,backing_fmt=..., the
>> shortcuts are different: create and rebase have -b and -F, while
>> convert has -B but no -F.  (amend has no shortcuts, but the previous
>> patch just deprecated the use of amend to change backing chains).
>>
>> Signed-off-by: Eric Blake <eblake@redhat.com>
> 
> This breaks at least 024 and 043 for qed because qemu-img info can't
> print the backing file format there (qed only saves a flag whether it's
> raw or non-raw).

Shoot.  I tend to avoid tests of qed and qcow (because they take so 
long), so while I may have tested them around v1 or v2 of the series, 
all the rebasing has changed the results by now.  Such is life.

> 
> We can fix the output filtering during the freeze, though.

Yes indeed, and I'll post such patches soon, now that you've pointed it out.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



  reply	other threads:[~2020-07-07 19:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-06 20:39 [PATCH v6 00/10] Tighten qemu-img rules on missing backing format Eric Blake
2020-07-06 20:39 ` [PATCH v6 01/10] qemu-img: Flush stdout before before potential stderr messages Eric Blake
2020-07-13  9:22   ` Max Reitz
2020-07-06 20:39 ` [PATCH v6 02/10] block: Finish deprecation of 'qemu-img convert -n -o' Eric Blake
2020-07-06 20:39 ` [PATCH v6 03/10] sheepdog: Add trivial backing_fmt support Eric Blake
2020-07-06 20:39 ` [PATCH v6 04/10] vmdk: " Eric Blake
2020-07-06 20:39 ` [PATCH v6 05/10] qcow: Tolerate backing_fmt= Eric Blake
2020-07-06 20:39 ` [PATCH v6 06/10] block: Error if backing file fails during creation without -u Eric Blake
2020-07-06 20:39 ` [PATCH v6 07/10] qcow2: Deprecate use of qemu-img amend to change backing file Eric Blake
2020-07-06 20:39 ` [PATCH v6 08/10] iotests: Specify explicit backing format where sensible Eric Blake
2020-07-07 16:07   ` Kevin Wolf
2020-07-07 19:57     ` Eric Blake [this message]
2020-07-06 20:39 ` [PATCH v6 09/10] block: Add support to warn on backing file change without format Eric Blake
2020-07-06 20:39 ` [PATCH v6 10/10] qemu-img: Deprecate use of -b without -F Eric Blake
2020-07-07 16:08 ` [PATCH v6 00/10] Tighten qemu-img rules on missing backing format Kevin Wolf

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=8cef9936-4373-db92-90f0-ee208b203a47@redhat.com \
    --to=eblake@redhat.com \
    --cc=kchamart@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=libvir-list@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=pkrempa@redhat.com \
    --cc=qemu-block@nongnu.org \
    --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).