[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH 05/13] qapi: Formalize qcow encrypt
From: |
Daniel P . Berrangé |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH 05/13] qapi: Formalize qcow encryption probing |
Date: |
Thu, 10 May 2018 15:32:23 +0100 |
User-agent: |
Mutt/1.9.3 (2018-01-21) |
On Thu, May 10, 2018 at 09:24:24AM -0500, Eric Blake wrote:
> On 05/09/2018 11:55 AM, Max Reitz wrote:
> > Currently, you can give no encryption format for a qcow file while still
> > passing a key-secret. That does not conform to the schema, so this
> > patch changes the schema to allow it.
> >
> > Signed-off-by: Max Reitz <address@hidden>
> > ---
>
> > ##
> > # @BlockdevQcowEncryptionFormat:
> > #
> > # @aes: AES-CBC with plain64 initialization vectors
> > #
> > +# @from-image: Determine the encryption format from the image
> > +# header. This only allows the use of the
> > +# key-secret option. (Since: 2.13)
> > +#
> > # Since: 2.10
> > ##
> > { 'enum': 'BlockdevQcowEncryptionFormat',
> > - 'data': [ 'aes' ] }
> > + 'data': [ 'aes', 'from-image' ] }
>
> Overkill. Why not just:
>
> > ##
> > # @BlockdevQcowEncryption:
> > @@ -2728,9 +2748,11 @@
> > # Since: 2.10
> > ##
> > { 'union': 'BlockdevQcowEncryption',
> > - 'base': { 'format': 'BlockdevQcowEncryptionFormat' },
> > + 'base': { '*format': 'BlockdevQcowEncryptionFormat' },
> > 'discriminator': 'format',
> > - 'data': { 'aes': 'QCryptoBlockOptionsQCow' } }
> > + 'default-variant': 'from-image',
>
> 'default-variant': 'aes'
>
> > + 'data': { 'aes': 'QCryptoBlockOptionsQCow',
>
> and call it good, because there are no other options to pick from, so
> 'from-image' would always resolve to 'aes' anyway.
Sounds reasonable because qcowv1 is a dead format we don't intend to
add more features to.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
- Re: [Qemu-block] [PATCH 02/13] docs/qapi: Document optional discriminators, (continued)
- [Qemu-block] [PATCH 03/13] tests: Add QAPI optional discriminator tests, Max Reitz, 2018/05/09
- [Qemu-block] [PATCH 04/13] qapi: Formalize qcow2 encryption probing, Max Reitz, 2018/05/09
- [Qemu-block] [PATCH 05/13] qapi: Formalize qcow encryption probing, Max Reitz, 2018/05/09
- [Qemu-block] [PATCH 07/13] qdict: Add qdict_stringify_for_keyval(), Max Reitz, 2018/05/09
- [Qemu-block] [PATCH 06/13] block: Add block-specific QDict header, Max Reitz, 2018/05/09
- [Qemu-block] [PATCH 08/13] tests: Add qdict_stringify_for_keyval() test, Max Reitz, 2018/05/09