From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35153) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkvUH-0008Gt-LD for qemu-devel@nongnu.org; Thu, 15 May 2014 09:14:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkvUC-0003iQ-Oe for qemu-devel@nongnu.org; Thu, 15 May 2014 09:14:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56467) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkvUC-0003iK-Ez for qemu-devel@nongnu.org; Thu, 15 May 2014 09:14:12 -0400 Message-ID: <5374BDA1.4030909@redhat.com> Date: Thu, 15 May 2014 07:14:09 -0600 From: Eric Blake MIME-Version: 1.0 References: <50765faa0041d43d22dd14a0128d3b55850571ac.1400123059.git.jcody@redhat.com> <20140515122657.GH2812@irqsave.net> <5374B9A7.9040106@redhat.com> <20140515131016.GI8452@localhost.localdomain> In-Reply-To: <20140515131016.GI8452@localhost.localdomain> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="bFIM3kJC0qvmacwnU6vGg0ndsEucudfge" Subject: Re: [Qemu-devel] [PATCH 5/5] block: extend block-commit to accept a string for the backing file List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Cody Cc: =?UTF-8?B?QmVub8OudCBDYW5ldA==?= , kwolf@redhat.com, pkrempa@redhat.com, famz@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --bFIM3kJC0qvmacwnU6vGg0ndsEucudfge Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 05/15/2014 07:10 AM, Jeff Cody wrote: >> >> We are moving towards having qapi guarantee sane defaults for FOO when= >> has_FOO is false; but aren't there yet. You are correct that this nee= ds >> to guarantee that we aren't passing random memory. >> >=20 > The QAPI code generator for the QMP input marshaller initializes all > pointers to NULL, and all bools to false. If has_ is false, then the > associated pointer will also be NULL, so it is safe to just pass > backing_file. It didn't used to, and we still haven't documented that as being a reliable guarantee, nor does the testsuite cover that. It's still safer to not rely on that fact until we make it part of the contract of qapi. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --bFIM3kJC0qvmacwnU6vGg0ndsEucudfge 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 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTdL2hAAoJEKeha0olJ0NqCBwH/1U+WvUiBXPEOiAGoO+otRPN AadNORBHT0RpHhNSELaUyjTxGLYdbmVT9l8UDKPaDp16tupdo1tlS8nh9X0BxSLL c2fGzVV9sau4OO6WHa3kZmwao2TgvHEHKphRN5cA5FCFTNY/Y8o3gQ0yJ8AxSTWN KVdrBKuqQ/3g8Q6um+YNhI8FrcUTBM1vbzc/RUFgJLlnjiHjKlZfK4BgyDeNTQs0 +IMovz1pKhUHsa1l9KBXajqZiDBhh7nOG75fW98N5RInIZMUxu8Ofp5PiOuE69zn EGTpiUFg0/OT9AvVMndYJhzqO8SwVi0QDgv4oIv88WLaPcDAmUA1BK2Bxw6bjWw= =lT38 -----END PGP SIGNATURE----- --bFIM3kJC0qvmacwnU6vGg0ndsEucudfge--