qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Tuguoyi <tu.guoyi@h3c.com>,
	Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	"kwolf@redhat.com" <kwolf@redhat.com>,
	"qemu-block@nongnu.org" <qemu-block@nongnu.org>
Cc: Chengchiwen <chengchiwen@h3c.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"qemu-stable@nongnu.org" <qemu-stable@nongnu.org>,
	Wangyongqing <w_yongqing@h3c.com>,
	Changlimin <changlimin@h3c.com>, Gaoliang <liang_gao@h3c.com>,
	Wangyong <wang.yongD@h3c.com>
Subject: Re: [PATCH v4] qcow2-bitmap: Fix uint64_t left-shift overflow
Date: Tue, 5 Nov 2019 17:24:37 +0100	[thread overview]
Message-ID: <47cf7ed6-e2ad-251a-8fcd-8049ced04108@redhat.com> (raw)
In-Reply-To: <4ba40cd1e7ee4a708b40899952e49f22@h3c.com>


[-- Attachment #1.1: Type: text/plain, Size: 839 bytes --]

On 01.11.19 08:37, Tuguoyi wrote:
> There are two issues in In check_constraints_on_bitmap(),
> 1) The sanity check on the granularity will cause uint64_t
> integer left-shift overflow when cluster_size is 2M and the
> granularity is BIGGER than 32K.
> 2) The way to calculate image size that the maximum bitmap
> supported can map to is a bit incorrect.
> This patch fix it by add a helper function to calculate the
> number of bytes needed by a normal bitmap in image and compare
> it to the maximum bitmap bytes supported by qemu.
> 
> Fixes: 5f72826e7fc62167cf3a
> Signed-off-by: Guoyi Tu <tu.guoyi@h3c.com>
> ---
>  block/qcow2-bitmap.c | 14 +++++++++++---
>  1 file changed, 11 insertions(+), 3 deletions(-)

Thanks, applied to my block branch:

https://git.xanclic.moe/XanClic/qemu/commits/branch/block

Max


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      parent reply	other threads:[~2019-11-05 16:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-01  7:37 [PATCH v4] qcow2-bitmap: Fix uint64_t left-shift overflow Tuguoyi
2019-11-01  9:21 ` Vladimir Sementsov-Ogievskiy
2019-11-01  9:34   ` Tuguoyi
2019-11-01 10:09     ` Vladimir Sementsov-Ogievskiy
2019-11-02  2:27       ` Tuguoyi
2019-11-05 16:24 ` Max Reitz [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=47cf7ed6-e2ad-251a-8fcd-8049ced04108@redhat.com \
    --to=mreitz@redhat.com \
    --cc=changlimin@h3c.com \
    --cc=chengchiwen@h3c.com \
    --cc=kwolf@redhat.com \
    --cc=liang_gao@h3c.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=tu.guoyi@h3c.com \
    --cc=vsementsov@virtuozzo.com \
    --cc=w_yongqing@h3c.com \
    --cc=wang.yongD@h3c.com \
    /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).