From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0qPq-0006Va-P0 for qemu-devel@nongnu.org; Mon, 23 Nov 2015 07:40:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a0qPk-0006Ia-MU for qemu-devel@nongnu.org; Mon, 23 Nov 2015 07:40:18 -0500 Date: Mon, 23 Nov 2015 12:40:01 +0000 From: "Daniel P. Berrange" Message-ID: <20151123124001.GG18085@redhat.com> References: <1448042670-17433-1-git-send-email-berrange@redhat.com> <1448042670-17433-5-git-send-email-berrange@redhat.com> <564F9B7F.2020101@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <564F9B7F.2020101@redhat.com> Subject: Re: [Qemu-devel] [PATCH WIP 04/30] qcow2: add a 'keyid' parameter to qcow2 options Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org On Fri, Nov 20, 2015 at 03:15:27PM -0700, Eric Blake wrote: > On 11/20/2015 11:04 AM, Daniel P. Berrange wrote: > > Add a 'keyid' parameter that refers to the ID of a > > QCryptoSecret instance that provides the encryption key. > > > > $QEMU \ > > -object secret,id=sec0,filename=/home/berrange/encrypted.pw \ > > -drive file=/home/berrange/encrypted.qcow2,keyid=sec0 > > > > Signed-off-by: Daniel P. Berrange > > --- > > block/qcow2.c | 80 +++++++++++++++++++++++++++++++++++++--------------- > > block/qcow2.h | 1 + > > qapi/block-core.json | 8 ++++-- > > 3 files changed, 64 insertions(+), 25 deletions(-) > > > +++ b/qapi/block-core.json > > @@ -1698,7 +1698,7 @@ > > # Driver specific block device options for qcow. > > # > > # @keyid: #optional ID of the "secret" object providing the > > -# AES decryption key. > > +# AES decryption key (since 2.5) > > # > > # Since: 2.5 > > I already pointed this out on the previous post, but this hunk is wrong > (since the entire BlockdevOptionsQcow struct is new); it instead belongs... > > > ## > > @@ -1742,6 +1742,9 @@ > > # caches. The interval is in seconds. The default value > > # is 0 and it disables this feature (since 2.5) > > # > > +# @keyid: #optional ID of the "secret" object providing the > > +# AES decryption key. > > ...here as part of BlockdevOptionsQcow2. Also, I wonder if inheriting > from BlockdevOptionsQcow is any easier here than just declaring keyid > directly. When I fully integrate LUKS support in qcow2, there will be several more parameters added to this struct, which I won't be adding to qcow, since I don't fancy doing any work on qcow code to improve its encryption, since its essentially obsolte. So on this basis, I don't think inheriting BlockdevOptionsQcow will have tangible benefit. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|