Received: from eggs.gnu.org ([2001:4830:134:3::10]:36699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWFJI-0007Nd-Fs for qemu-devel@nongnu.org; Mon, 22 Sep 2014 21:54:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWFJD-00008F-Cq for qemu-devel@nongnu.org; Mon, 22 Sep 2014 21:54:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24380) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWFJD-000072-4t for qemu-devel@nongnu.org; Mon, 22 Sep 2014 21:54:27 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8N1sLoB017204 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 22 Sep 2014 21:54:21 -0400 Date: Tue, 23 Sep 2014 09:54:20 +0800 From: Fam Zheng Message-ID: <20140923015420.GC22678@fam-t430.nay.redhat.com> References: <1411370144-536-1-git-send-email-famz@redhat.com> <542016D8.9010905@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <542016D8.9010905@redhat.com> 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: Max Reitz Cc: Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi On Mon, 09/22 14:32, Max Reitz wrote: > 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). Oops I saw a no-op when running check, but thought it passed! > > 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: Thanks so much for your careful reviewing! I am fixing this and picking up your rev-by line in v5. Fam > > Reviewed-by: Max Reitz