From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49493) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YuyCS-0008UP-Pq for qemu-devel@nongnu.org; Wed, 20 May 2015 03:13:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YuyCP-0008VH-K8 for qemu-devel@nongnu.org; Wed, 20 May 2015 03:13:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32915) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YuyCP-0008V5-Ct for qemu-devel@nongnu.org; Wed, 20 May 2015 03:13:53 -0400 Date: Wed, 20 May 2015 12:43:33 +0530 From: Amit Shah Message-ID: <20150520071333.GI15452@grmbl.mre> References: <1432034993-24431-1-git-send-email-dgilbert@redhat.com> <555B3FF1.6090205@redhat.com> <20150519140649.GB2127@work-vm> <555B4520.7000109@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <555B4520.7000109@redhat.com> Subject: Re: [Qemu-devel] [PATCH 0/4] Add section footers to detect corrupted migration streams List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: agraf@suse.de, quintela@redhat.com, "Dr. David Alan Gilbert" , qemu-devel@nongnu.org On (Tue) 19 May 2015 [08:13:52], Eric Blake wrote: > On 05/19/2015 08:06 AM, Dr. David Alan Gilbert wrote: > > >> Does it let us detect a corrupted > >> stream earlier in the process? Or is the main benefit that it gives > >> better error messages at the point corruption is first detected? > > > > Both; there are two cases that often happen; both triggered by a section > > reading too little or too much, and it gets back to the main loop and > > we read the next byte: > > 1) the next byte on the stream is a 0x00 - that's read as an end-of-migration > > marker, we start the VM and you get a hung VM with no errors. > > > > 2) the next byte is between 0x01..0x04 - and it looks like a section header, > > then we try and read the next few bytes to figure out which section; > > this could a) result in an error saying it's an unknown section or > > b) Happen to match a section ID and then get an error about a problem > > in that section. In either case you don't get an error pointing to > > the previous section which was the actual problem. > > Probably worth incorporating into the commit body then :) How about docs/migration.txt? The 00/NN message gets lost.. Amit