qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [Bug 1474263] Re: "Image format was not specified" warning


From: Max Reitz
Subject: [Qemu-devel] [Bug 1474263] Re: "Image format was not specified" warning should be suppressed for the vvfat (and probably nbd) driver
Date: Wed, 15 Jul 2015 15:42:36 -0000

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.

When it comes to vvfat, we might actually put up another warning saying
that vvfat is deprecated, but anyway: Here, too, the warning is
suppressed by doing what the warning says. Use -drive
format=raw,file.driver=vvfat,file.dir=. and the warning disappears (or
driver=raw instead of format=raw, it's the same).

Concluding: Doing what the warning says makes it disappear (-drive
format=raw,…), which is, not coincidentally, the warning's purpose,
actually. If we want to do something about this, we would have to allow
protocols like NBD and vvfat be able to force the default image format
used on top of them (i.e. raw). But this may break existing use cases,
at least for NBD, so I'd be wary about that.

Max

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1474263

Title:
  "Image format was not specified" warning should be suppressed for the
  vvfat (and probably nbd) driver

Status in QEMU:
  New

Bug description:
  Running

  qemu -drive file.driver=vvfat,file.dir=.

  displays

  WARNING: Image format was not specified for 'json:{"dir": ".", "driver": 
"vvfat"}' and probing guessed raw.
           Automatically detecting the format is dangerous for raw images, 
write operations on block 0 will be restricted.
           Specify the 'raw' format explicitly to remove the restrictions.

  However, since "images" provided by the vvfat driver are always raw
  (and the first sector isn't writeable in any case), this warning is
  superfluous and should not be displayed.

  A similar warning is displayed for NBD devices; I suspect it should be
  also disabled for similar reasons, but I'm not sure if serving non-raw
  images is actually a violation of the protocol. qemu-nbd translates
  them to raw images, for what it's worth, even if it may be suppressed
  with -f raw.

  Noticed on 2.3.0; the code that causes this behaviour is still
  apparently present in today's git master
  (f3a1b5068cea303a55e2a21a97e66d057eaae638). Speaking of versions: you
  may want to update the copyright notice that qemu -version displays.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1474263/+subscriptions



reply via email to

[Prev in Thread] Current Thread [Next in Thread]