From: Max Reitz <mreitz@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org, qemu-stable@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] qcow2: Avoid making the L1 table too big
Date: Wed, 6 Jul 2016 14:47:29 +0200 [thread overview]
Message-ID: <1a0e01ee-fdcd-3428-c2de-7ea8e50dc5a6@redhat.com> (raw)
In-Reply-To: <20160706084015.GF5233@noname.str.redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1021 bytes --]
On 06.07.2016 10:40, Kevin Wolf wrote:
> Am 15.06.2016 um 17:36 hat Max Reitz geschrieben:
>> We refuse to open images whose L1 table we deem "too big". Consequently,
>> we should not produce such images ourselves.
>>
>> Cc: qemu-stable@nongnu.org
>> Signed-off-by: Max Reitz <mreitz@redhat.com>
>> ---
>> block/qcow2-cluster.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c
>> index 893ddf6..335b9b0 100644
>> --- a/block/qcow2-cluster.c
>> +++ b/block/qcow2-cluster.c
>> @@ -65,7 +65,7 @@ int qcow2_grow_l1_table(BlockDriverState *bs, uint64_t min_size,
>> }
>> }
>>
>> - if (new_l1_size > INT_MAX / sizeof(uint64_t)) {
>> + if (new_l1_size > QCOW_MAX_L1_SIZE / sizeof(uint64_t)) {
>> return -EFBIG;
>> }
>
> Maybe add a QEMU_BUILD_BUG_ON(QCOW_MAX_L1_SIZE > INT_MAX)?
Good idea, did that. I changed it directly in my block branch, or do you
think a v2 mail necessary?
Max
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 498 bytes --]
next prev parent reply other threads:[~2016-07-06 12:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-15 15:36 [Qemu-devel] [PATCH 0/2] qcow2: Avoid making the L1 table too big Max Reitz
2016-06-15 15:36 ` [Qemu-devel] [PATCH 1/2] qemu-img: Use strerror() for generic resize error Max Reitz
2016-06-15 15:44 ` Eric Blake
2016-06-15 15:36 ` [Qemu-devel] [PATCH 2/2] qcow2: Avoid making the L1 table too big Max Reitz
2016-06-15 15:43 ` Eric Blake
2016-07-06 8:40 ` Kevin Wolf
2016-07-06 12:47 ` Max Reitz [this message]
2016-07-06 12:54 ` Kevin Wolf
2016-07-05 17:37 ` [Qemu-devel] [PATCH 0/2] " 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=1a0e01ee-fdcd-3428-c2de-7ea8e50dc5a6@redhat.com \
--to=mreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--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 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).