From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36152) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XW2nL-0001T3-Lz for qemu-devel@nongnu.org; Mon, 22 Sep 2014 08:32:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XW2nD-0006pR-9r for qemu-devel@nongnu.org; Mon, 22 Sep 2014 08:32:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30569) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XW2nD-0006nv-2j for qemu-devel@nongnu.org; Mon, 22 Sep 2014 08:32:35 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8MCWSQO029602 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 22 Sep 2014 08:32:29 -0400 Message-ID: <542016D8.9010905@redhat.com> Date: Mon, 22 Sep 2014 14:32:24 +0200 From: Max Reitz MIME-Version: 1.0 References: <1411370144-536-1-git-send-email-famz@redhat.com> In-Reply-To: <1411370144-536-1-git-send-email-famz@redhat.com> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4] vmdk: Fix integer overflow in offset calculation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng , qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi On 22.09.2014 09:15, Fam Zheng wrote: > This fixes the bug introduced by commit c6ac36e (vmdk: Optimize cluster > allocation). > > $ ~/build/master/qemu-io /stor/vm/arch.vmdk -c 'write 2G 1k' > write failed: Invalid argument > > Reported-by: Mark Cave-Ayland > Signed-off-by: Fam Zheng > > --- > v4: Fix typo in file header: 1014 -> 2014. > v3: A new case 105 instead of embedding in 005. (Max) > --- > block/vmdk.c | 2 +- > tests/qemu-iotests/105 | 70 ++++++++++++++++++++++++++++++++++++++++++++++ > tests/qemu-iotests/105.out | 21 ++++++++++++++ > 3 files changed, 92 insertions(+), 1 deletion(-) > create mode 100755 tests/qemu-iotests/105 > create mode 100644 tests/qemu-iotests/105.out I'm sorry, but you didn't add the respective line to the group file. Also, the reference output is wrong; for the latter two accesses, it should be "at offset 15393162788864" (14T) instead of "at offset 4398046511104" (4T). Those changes are trivial, though, so with an appropriate line in tests/qemu-iotests/group and %s/4398046511104/15393162788864/ in tests/qemu-iotests/105.out: Reviewed-by: Max Reitz