Received: from eggs.gnu.org ([2001:4830:134:3::10]:47737) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bth0C-0003dt-Cd for qemu-devel@nongnu.org; Mon, 10 Oct 2016 16:16:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bth0B-0004vJ-5x for qemu-devel@nongnu.org; Mon, 10 Oct 2016 16:16:48 -0400 References: <1476129608-13652-1-git-send-email-pbonzini@redhat.com> From: Eric Blake Message-ID: <9dbe8d64-3bfd-847a-c570-933355eb114c@redhat.com> Date: Mon, 10 Oct 2016 15:16:40 -0500 MIME-Version: 1.0 In-Reply-To: <1476129608-13652-1-git-send-email-pbonzini@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2kW5OqUUdOFSA7sCLE9pFNehXqVGO1w9q" Subject: Re: [Qemu-devel] [PATCH] rbd: shift byte count as a 64-bit value List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-stable@nongnu.org, kwolf@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --2kW5OqUUdOFSA7sCLE9pFNehXqVGO1w9q From: Eric Blake To: Paolo Bonzini , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-stable@nongnu.org, kwolf@redhat.com Message-ID: <9dbe8d64-3bfd-847a-c570-933355eb114c@redhat.com> Subject: Re: [PATCH] rbd: shift byte count as a 64-bit value References: <1476129608-13652-1-git-send-email-pbonzini@redhat.com> In-Reply-To: <1476129608-13652-1-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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. >=20 > Reported by Coverity. >=20 > Fixes: 7bbca9e290a9c7c217b5a24fc6094e91e54bd05d > Cc: qemu-stable@nongnu.org > Cc: kwolf@redhat.com > Cc: eblake@redhat.com > Signed-off-by: Paolo Bonzini > --- > block/rbd.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --2kW5OqUUdOFSA7sCLE9pFNehXqVGO1w9q Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJX+/coAAoJEKeha0olJ0NqsfoH/R8pmP9KJ1Cj0W2u4VxknPie gHgD65ryOggzxMfKez0wX73tlDl6qDdm/fP+RvSVy2zpDyZAXg+MR98arEgCEcbZ h04AmI9TxNuoREI1RsPe2W0XuTZnwNKHnRcs0FqInUrlLfSvfvR46hvz14LIgFoS d2+JCmjEIaR2GBtDnV/x1RFoZsvkvE3oUbz/zpK2clOE5/D4JnAvRgjaUoB46XUr JxohMg2pU4OTc0MNOIw3KOECnN/AeSzgnzTCOJD0PBNhWd1BM/mgrr6eEWNa9InK 7XP6Ei5X3UF85FtSfDV49LTnCLmXk3NmnfaMv2H4QGF4f9lh/wE4NRxpNePHW3c= =3TUE -----END PGP SIGNATURE----- --2kW5OqUUdOFSA7sCLE9pFNehXqVGO1w9q--