[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 4/4] Support for probing qed image metadata

On 11/19/2010 09:18 AM, Adam Litke wrote:
> Implement getBackingStore() for QED images.  The header format is defined in
> the QED spec: http://wiki.qemu.org/Features/QED .

> +    if (offset + size > buf_size || offset + size < offset)
> +        return BACKING_STORE_INVALID;

As currently coded, buf_size is at most STORAGE_MAX_HEAD (20*512).
QED does not appear to have any maximum header size (other than the fact
that header size is a multiple of cluster size), and permits a cluster
size of 2**26.

I don't see anything on the QED file format that requires the
backing_filename to occur within the header clusters (that is, shouldn't
QED add a file format restriction that
backing_filename_offset+backing_filename_size must be less than the
start of the first regular cluster?).

More worrying, I don't see anything in QED that requires the filename to
occur within the first 10K bytes.  Do we need to add another enum value
to libvirt's backing store callback routine, to be used when the header
requests data that lies beyond buf_size but is still feasibly valid, for
the case where QED designates a backing store location that is beyond
10k but still before the start of the first cluster, rather than the
current approach of just treating it as BACKING_STORE_INVALID?

Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]