qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] rbd: shift byte count as a 64-bit value


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH] rbd: shift byte count as a 64-bit value
Date: Mon, 10 Oct 2016 15:16:40 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0

On 10/10/2016 03:00 PM, Paolo Bonzini wrote:
> Otherwise, reads of more than 2GB fail.  Until commit
> 7bbca9e290a9c7c217b5a24fc6094e91e54bd05d, reads of 2^41
> bytes succeeded at least theoretically.

I don't think the block layer ever passes a read request down to drivers
that large in the first place; we have a lot of code in io.c that
clamps/asserts things to be smaller than 2^31 (ie.
BDRV_REQUEST_MAX_SECTORS).  So this may just be cleaning up something
that would become latent with a future block change to support larger
sizes, rather than an actual bug fix today.  But it is worth making.

> In fact, pdiscard ought to receive a 64-bit integer as the
> count for the same reason.

Yes, auditing ALL of the block code for eliminating arbitrary 32-bit
limits would be a big project.

> 
> Reported by Coverity.
> 
> Fixes: 7bbca9e290a9c7c217b5a24fc6094e91e54bd05d
> Cc: address@hidden
> Cc: address@hidden
> Cc: address@hidden
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
>  block/rbd.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]