qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Chunqiang Tang <ctang@us.ibm.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] QCOW2: bug fix - read base image beyond its	size
Date: Mon, 07 Feb 2011 14:48:47 +0100	[thread overview]
Message-ID: <4D4FF83F.4000309@redhat.com> (raw)
In-Reply-To: <1296745969-28287-1-git-send-email-ctang@us.ibm.com>

Am 03.02.2011 16:12, schrieb Chunqiang Tang:
> This patch fixes the following bug in QCOW2. For a QCOW2 image that is larger
> than its base image, when handling a read request straddling over the end of the
> base image, the QCOW2 driver attempts to read beyond the end of the base image
> and the request would fail.
> 
> This bug was found by Fast Virtual Disk (FVD)'s fully automated testing tool.
> The following test triggered the bug.
> 
> dd if=/dev/zero of=/var/ramdisk/truth.raw count=0 bs=1 seek=1098561536
> dd if=/dev/zero of=/var/ramdisk/zero-500M.raw count=0 bs=1 seek=593099264
> ./qemu-img create -f qcow2 -ocluster_size=65536,backing_fmt=blksim -b /var/ramdisk/zero-500M.raw /var/ramdisk/test.qcow2 1098561536
> ./qemu-io --auto --seed=30477694 --truth=/var/ramdisk/truth.raw --format=qcow2 --test=blksim:/var/ramdisk/test.qcow2 --verify_write=true --compare_before=false --compare_after=true --round=100000 --parallel=100 --io_size=10485760 --fail_prob=0 --cancel_prob=0 --instant_qemubh=true
> 
> Signed-off-by: Chunqiang Tang <ctang@us.ibm.com>

Thanks, fixed up the coding style (whitespace) and applied to the block
branch.

However, I wonder if we can't share some code between
qemu_iovec_memset_skip and qemu_iovec_copy. I think a cleanup patch
would be possible there.

Kevin

      reply	other threads:[~2011-02-07 13:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-03 15:12 [Qemu-devel] [PATCH] QCOW2: bug fix - read base image beyond its size Chunqiang Tang
2011-02-07 13:48 ` Kevin Wolf [this message]

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=4D4FF83F.4000309@redhat.com \
    --to=kwolf@redhat.com \
    --cc=ctang@us.ibm.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).