From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44876) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFPab-0001Xj-9r for qemu-devel@nongnu.org; Fri, 30 Aug 2013 10:22:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VFPaV-0007DM-Jw for qemu-devel@nongnu.org; Fri, 30 Aug 2013 10:22:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9554) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFPaV-0007DG-Bf for qemu-devel@nongnu.org; Fri, 30 Aug 2013 10:22:11 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r7UEMAxO024332 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 30 Aug 2013 10:22:10 -0400 Message-ID: <5220AA92.3060301@redhat.com> Date: Fri, 30 Aug 2013 08:22:10 -0600 From: Eric Blake MIME-Version: 1.0 References: <1377866071-27611-1-git-send-email-mreitz@redhat.com> <1377866071-27611-3-git-send-email-mreitz@redhat.com> In-Reply-To: <1377866071-27611-3-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="PAJBF7jKnB59sfqx6mioTmiXD2ILajKEC" Subject: Re: [Qemu-devel] [PATCH v4 2/8] qcow2: Metadata overlap checks List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --PAJBF7jKnB59sfqx6mioTmiXD2ILajKEC Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 08/30/2013 06:34 AM, Max Reitz wrote: > Two new functions are added; the first one checks a given range in the > image file for overlaps with metadata (main header, L1 tables, L2 > tables, refcount table and blocks). >=20 > The second one should be used immediately before writing to the image > file as it calls the first function and, upon collision, marks the > image as corrupt and makes the BDS unusable, thereby preventing > further access. >=20 > Both functions take a bitmask argument specifying the structures which > should be checked for overlaps, making it possible to also check > metadata writes against colliding with other structures. >=20 > Signed-off-by: Max Reitz > --- > block/qcow2-refcount.c | 172 ++++++++++++++++++++++++++++++++++++++= ++++++++ > block/qcow2.h | 39 +++++++++++ > include/monitor/monitor.h | 1 + > monitor.c | 1 + > 4 files changed, 213 insertions(+) I know this is already in the QMP queue, but... > +++ b/include/monitor/monitor.h > @@ -48,6 +48,7 @@ typedef enum MonitorEvent { > QEVENT_BALLOON_CHANGE, > QEVENT_SPICE_MIGRATE_COMPLETED, > QEVENT_GUEST_PANICKED, > + QEVENT_BLOCK_IMAGE_CORRUPTED, > =20 > /* Add to 'monitor_event_names' array in monitor.c when > * defining new events here */ > diff --git a/monitor.c b/monitor.c > index ee9744c..2c542e1 100644 > --- a/monitor.c > +++ b/monitor.c > @@ -504,6 +504,7 @@ static const char *monitor_event_names[] =3D { > [QEVENT_BALLOON_CHANGE] =3D "BALLOON_CHANGE", > [QEVENT_SPICE_MIGRATE_COMPLETED] =3D "SPICE_MIGRATE_COMPLETED", > [QEVENT_GUEST_PANICKED] =3D "GUEST_PANICKED", > + [QEVENT_BLOCK_IMAGE_CORRUPTED] =3D "BLOCK_IMAGE_CORRUPTED", > }; You are missing documentation for this new event. Please provide a followup patch to qmp-events.txt. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --PAJBF7jKnB59sfqx6mioTmiXD2ILajKEC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSIKqSAAoJEKeha0olJ0NqIQQH/0LK3vDhmDz8tG1Di4Q2QSad PJvV0VJt+pOJSMc1l/JvDVZc/FJC/UW90FKlWewFvkC5pHLjn1jGzDlx5nEyGKv0 GZsCLUvN2/wR1D/FJoTnxXau+4TlLDmAVN4AsDVZ1PFbSaTj045VV6mF0dTkjCUZ q4ATG26hHlU/GmAoDfBonLDUlJd1wvW5QLVD53cd9Nkx8j5QiboEmaC3x2njsB9s jjrkYfw7Fz/fNiBjDl161el/Sy7kQqU8GoSeGPrk/Pe1whTGjuBRpLI3zIr/6xtS CMRk1ai/tTLjnrHAsDCGeW+v+tIj9/6LRkQHUThgb91L9OXDDesOBnl8xEov/VQ= =nbjv -----END PGP SIGNATURE----- --PAJBF7jKnB59sfqx6mioTmiXD2ILajKEC--