From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43202) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yuhw0-0007kY-KR for qemu-devel@nongnu.org; Tue, 19 May 2015 09:51:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yuhvw-0004jI-IB for qemu-devel@nongnu.org; Tue, 19 May 2015 09:51:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52251) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yuhvw-0004jC-BF for qemu-devel@nongnu.org; Tue, 19 May 2015 09:51:48 -0400 Message-ID: <555B3FF1.6090205@redhat.com> Date: Tue, 19 May 2015 07:51:45 -0600 From: Eric Blake MIME-Version: 1.0 References: <1432034993-24431-1-git-send-email-dgilbert@redhat.com> In-Reply-To: <1432034993-24431-1-git-send-email-dgilbert@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="B9M1lAgH37TbUPf85e8jFw5mkw6D8ok5M" 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: "Dr. David Alan Gilbert (git)" , qemu-devel@nongnu.org Cc: amit.shah@redhat.com, agraf@suse.de, quintela@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --B9M1lAgH37TbUPf85e8jFw5mkw6D8ok5M Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/19/2015 05:29 AM, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" >=20 > Badly formatted migration streams can go undetected or produce > misleading errors due to a lock of checking at the end of sections. > In particular a section that adds an extra 0x00 at the end > causes what looks like a normal end of stream and thus doesn't produce > any errors, and something that ends in a 0x01..0x04 kind of look > like real section headers and then fail when the section parser tries > to figure out which section they are. This is made worse by the > choice of 0x00..0x04 being small numbers that are particularly common > in normal section data. >=20 > This patch series adds a section footer consisting of a marker (0x7e - = ~) > followed by the section-id that was also sent in the header. If > they mismatch then it throws an error explaining which section was > being loaded. Good idea. Is it redundant with the recent addition of self-describing json that newer machine types send? 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? >=20 > The footers are tied to new machine types (on both pc types). Good that you tied it to machine type, but is it enough? When we added the optional section for giving the json representation of the stream, we ended up having to add a knob to turn off that section, so that backwards migration from a new qemu to an older one did not send it. I'm wondering if we'll need to expose a knob to turn off footers, again for the sake of backwards migration in downstream distros. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --B9M1lAgH37TbUPf85e8jFw5mkw6D8ok5M 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/ iQEcBAEBCAAGBQJVWz/xAAoJEKeha0olJ0Nqa4kIAJD0msyi5+knuUCMNcEjUzkf tVB10Qt8ZyKsaFB3MGc/mxkGwUQVhW8zfXI5QJ51JVySMsOVibgP7SXS8GsF+/1B 4lPtcPvFh8bgnRd8dNYPPeY0wyE9J6xjEU5pYblegkr9gPLIoXEFEJqPvN0VCYY7 KLAXqFwFVMGvSFOcTpu+4+OFQaDgGLF9E3mZArCKeQ0EUrYzSxcqhlQN3jT6tQSE E5bsC1pymqpAczlJfsCsoJ6olsE+cbIZqhdENZBC+NwfNkh6UKzuVtswT0Rjih1o SFeTPfAOqu0RHQwSJj4lZ99Phc4zGtRGIzCbsSuvMTW+LyVRBFqZqJW5s0vyLDU= =BqHp -----END PGP SIGNATURE----- --B9M1lAgH37TbUPf85e8jFw5mkw6D8ok5M--