qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Eric Blake <eblake@redhat.com>
Cc: Bug 1474263 <1474263@bugs.launchpad.net>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Bug 1474263] Re: "Image format was not specified" warning should be suppressed for the vvfat (and probably nbd) driver
Date: Thu, 16 Jul 2015 14:29:17 +0100	[thread overview]
Message-ID: <20150716132917.GD16984@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <55A69057.9080704@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1759 bytes --]

On Wed, Jul 15, 2015 at 10:54:47AM -0600, Eric Blake wrote:
> On 07/15/2015 09:42 AM, Max Reitz wrote:
> > Hi,
> > 
> > Indeed using non-raw images should not be used over NBD. The warning
> > however is not superfluous, since qemu does indeed probe the image
> > format, so a malicious guest might write a qcow2 header into the raw
> > image, thus making qemu probe a qcow2 image the next time the same
> > configuration is used. The problem would be solved by not making qemu
> > probe the image format over NBD, but always assume raw; but I guess this
> > will break existing use cases, even though they were wrong from the
> > start. Anyway, this is solved by explicitly specifying the image format
> > to be raw, which is what the warning says.
> 
> I could actually see the use of non-raw over NBD.  We support nested
> protocols (where you can use qcow2->qcow2->file), that is, where a file
> contains a qcow2 file whose contents are themselves a qcow2 image.
> (Perhaps useful in nested guests, where the outer qcow2 layer serves a
> disk to an L0 guest, which in turn uses the inner layer to present a
> disk to an L1 guest).  In such a case, opening just one layer of qcow2
> for service over NBD will expose the inner qcow2 image, and connecting
> qemu as an NBD client with format=raw will directly manipulate the qcow2
> data seen by the L0 guest, while connecting as an NBD client with
> format=qcow2 will see the raw data seen by the L1 guest.
> 
> But it's more likely to encounter this scenario with NBD, and not with
> vvfat.

I agree that it's perfectly okay to use non-raw on top of NBD.

We allow image formats on host block devices and iSCSI LUNs.  Why
shouldn't they be allowed on NBD exports?

Stefan

[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2015-07-16 13:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-14  8:57 [Qemu-devel] [Bug 1474263] [NEW] "Image format was not specified" warning should be suppressed for the vvfat (and probably nbd) driver felix
2015-07-15 15:42 ` [Qemu-devel] [Bug 1474263] " Max Reitz
2015-07-15 16:54   ` Eric Blake
2015-07-16 13:29     ` Stefan Hajnoczi [this message]
2016-07-05  7:19 ` felix
2018-07-11  7:10 ` Thomas Huth
2018-07-11 11:18 ` Max Reitz

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=20150716132917.GD16984@stefanha-thinkpad.redhat.com \
    --to=stefanha@gmail.com \
    --cc=1474263@bugs.launchpad.net \
    --cc=eblake@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).