From: Eric Blake <eblake@redhat.com>
To: Alberto Garcia <berto@igalia.com>, qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, Kevin Wolf <kwolf@redhat.com>,
Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [for 3.1? PATCH] qcow2: Assert that refcount block offsets fit in the refcount table
Date: Tue, 13 Nov 2018 11:06:54 -0600 [thread overview]
Message-ID: <bf4041ab-7288-53fc-055c-1c7c7a607d42@redhat.com> (raw)
In-Reply-To: <20181113164544.9906-1-berto@igalia.com>
On 11/13/18 10:45 AM, Alberto Garcia wrote:
> Refcount table entries have a field to store the offset of the
> refcount block. The rest of the bits of the entry are currently
> reserved.
>
> The offset is always taken from the entry using REFT_OFFSET_MASK to
> ensure that we only use the bits that belong to that field.
>
> While that mask is used every time we read from the refcount table, it
> is never used when we write to it. Due to the other constraints of the
> qcow2 format QEMU can never produce refcount block offsets that don't
> fit in that field so any such offset when allocating a refcount block
> would indicate a bug in QEMU.
> ---
> block/qcow2-refcount.c | 3 +++
> 1 file changed, 3 insertions(+)
>
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2018-11-13 17:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-13 16:45 [Qemu-devel] [PATCH] qcow2: Assert that refcount block offsets fit in the refcount table Alberto Garcia
2018-11-13 17:06 ` Eric Blake [this message]
2018-11-14 7:10 ` [Qemu-devel] [for 3.1? PATCH] " Alberto Garcia
2018-11-14 10:49 ` Kevin Wolf
2018-11-14 14:40 ` Alberto Garcia
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=bf4041ab-7288-53fc-055c-1c7c7a607d42@redhat.com \
--to=eblake@redhat.com \
--cc=berto@igalia.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--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).