All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-stable <qemu-stable@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 1/2] qcow2: Fix refcount table size calculation
Date: Sat, 27 Oct 2012 13:57:26 +0400	[thread overview]
Message-ID: <508BB006.9020900@msgid.tls.msk.ru> (raw)
In-Reply-To: <1351280528-21889-2-git-send-email-kwolf@redhat.com>

On 26.10.2012 23:42, Kevin Wolf wrote:
> A missing factor for the refcount table entry size in the calculation
> could mean that too little memory was allocated for the in-memory
> representation of the table, resulting in a buffer overflow.
> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>

Reviewed-and-tested-by: Michael Tokarev <mjt@tls.msk.ru>

(but the thing is rather trivial and obvious :)
(this fixes https://bugs.launchpad.net/qemu/+bug/1071236 fwiw --
maybe we should add some references to bugs when the work/patch
is after a bugreport)

This fix is applicable to -stable, at least to 1.2 and 1.1 versions.
For 0.15, while the patch applies, qcow2 driver has other bug(s)
which prevents the testcase (with qemu-img create) from working:

 $ ./qemu-img-0.15 create -f qcow2 -o cluster_size=512,preallocation=metadata disk.img 4G
 Formatting 'disk.img', fmt=qcow2 size=4294967296 encryption=off cluster_size=512 preallocation='metadata'
 qemu-img: disk.img: error while creating qcow2: Unknown error 1652533248

Thanks,

/mjt

  reply	other threads:[~2012-10-27  9:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-26 19:42 [Qemu-devel] [PATCH 0/2] qcow2: Fix refcount table size calculation Kevin Wolf
2012-10-26 19:42 ` [Qemu-devel] [PATCH 1/2] " Kevin Wolf
2012-10-27  9:57   ` Michael Tokarev [this message]
2012-10-26 19:42 ` [Qemu-devel] [PATCH 2/2] qemu-iotests: qcow2: Test growing large refcount table 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=508BB006.9020900@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@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 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.