From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35707) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNmow-00007s-VL for qemu-devel@nongnu.org; Wed, 12 Mar 2014 13:20:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WNmor-0004l7-W0 for qemu-devel@nongnu.org; Wed, 12 Mar 2014 13:19:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:19863) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNmor-0004ku-Nb for qemu-devel@nongnu.org; Wed, 12 Mar 2014 13:19:53 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s2CHJpno017503 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 12 Mar 2014 13:19:52 -0400 Message-ID: <53209736.30008@redhat.com> Date: Wed, 12 Mar 2014 11:19:50 -0600 From: Eric Blake MIME-Version: 1.0 References: <1394643643-27122-1-git-send-email-armbru@redhat.com> In-Reply-To: <1394643643-27122-1-git-send-email-armbru@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="8fWJXAgLl4C8PjfW1LH1gcHRrKfUtjUvV" Subject: Re: [Qemu-devel] [PATCH] blockdev: Refuse to open encrypted image unless paused List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , qemu-devel@nongnu.org Cc: kwolf@redhat.com, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --8fWJXAgLl4C8PjfW1LH1gcHRrKfUtjUvV Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/12/2014 11:00 AM, Markus Armbruster wrote: > Opening an encrypted image takes an additional step: setting the key. > Between open and the key set, the image must not be used. >=20 > We have some protection against accidental use in place: you can't > unpause a guest while we're missing keys. You can, however, hot-plug > block devices lacking keys into a running guest just fine, or insert > media lacking keys. In the latter case, notifying the guest of the > insert is delayed until the key is set, which may suffice to protect > at least some guests in common usage. >=20 > This patch makes the protection apply in more cases, in a rather > heavy-handed way: it doesn't let you open encrypted images unless > we're in a paused state. >=20 > It doesn't extend the protection to users other than the guest (block > jobs?). Use of runstate_check() from block.c is disgusting. Best I > can do right now. Better than what we had before, and worth having in 2.0 >=20 > Signed-off-by: Markus Armbruster > --- > block.c | 8 +++++++- > stubs/Makefile.objs | 1 + > stubs/runstate-check.c | 6 ++++++ > 3 files changed, 14 insertions(+), 1 deletion(-) > create mode 100644 stubs/runstate-check.c >=20 Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --8fWJXAgLl4C8PjfW1LH1gcHRrKfUtjUvV 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/ iQEcBAEBCAAGBQJTIJc2AAoJEKeha0olJ0NqhcUIAIBCXad57cTLzktQWbbNoQKw yZv2XNWmd/j2hdW1FpF3zyEonL4sJYG/RJCMdYzGiN2giyYs8CoxVn//ave0GntA kiiSTf1JT5xl3A73JB/a0+v0Z3TZ8nJS6BnXIEQ4dGIRnapuElj8E1MPepW3omZQ HJcRnig/ppl9Lc6rNmXIA0UcnsIG4tqbBWJW+Ea9pG6KHCAX69rfGXqaMlKKUGIE 7ZiHF0Q5EjntlSWfV2EONFUHKHqTOUhAeQaxuuhfE/nJAJjcvK4dAEi8NF4jO4vg 2p6PRxI6zlDnVmfiG0d5P2hS+tH4RE/YFK/TuZd79gW5enTPU5ftIBOyXOPuMgc= =VDHO -----END PGP SIGNATURE----- --8fWJXAgLl4C8PjfW1LH1gcHRrKfUtjUvV--