From: Maxim Levitsky <mlevitsk@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Kevin Wolf" <kwolf@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
qemu-block@nongnu.org, "John Snow" <jsnow@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Max Reitz" <mreitz@redhat.com>,
"Maxim Levitsky" <mlevitsk@redhat.com>
Subject: [PATCH v6 00/14] LUKS: encryption slot management using amend interface
Date: Sun, 10 May 2020 16:40:23 +0300 [thread overview]
Message-ID: <20200510134037.18487-1-mlevitsk@redhat.com> (raw)
Hi!
Here is the updated series of my patches, incorporating all the feedback I received.
This implements the API interface that we agreed upon except that I merged the
LUKSKeyslotActive/LUKSKeyslotInactive union into a struct because otherwise
I need nested unions which are not supported currently by QAPI parser.
This didn't change the API and thus once support for nested unions is there,
it can always be implemented in backward compatible way.
I hope that this series will finally be considered for merging, since I am somewhat running
out of time to finish this task.
Patches are strictly divided by topic to 3 groups, and each group depends on former groups.
* Patches 1,2 implement qcrypto generic amend interface, including definition
of structs used in crypto.json and implement this in luks crypto driver
Nothing is exposed to the user at this stage
* Patches 3-9 use the code from patches 1,2 to implement qemu-img amend based encryption slot management
for luks and for qcow2, and add a bunch of iotests to cover that.
* Patches 10-13 add x-blockdev-amend (I'll drop the -x prefix if you like), and wire it
to luks and qcow2 driver to implement qmp based encryption slot management also using
the code from patches 1,2, and also add a bunch of iotests to cover this.
Tested with -raw,-qcow2,-nbd and -luks iotests and 'make check'
Changes from V4:
* Addresed feedback on patch 2 from Daniel (thanks!)
* Gave real numbers to the tests
* Updated the copyright in amend.c to RedHat
* Rebased and adjusted the python iotests to latest changes in iotest infrastructure
Changes from V5:
* Updated all QMP docs to state that all added QMP features are since 5.1
* Rebased to latest master
Best regards,
Maxim Levitsky
clone of "luks-keymgmnt-v2"
Maxim Levitsky (14):
qcrypto/core: add generic infrastructure for crypto options amendment
qcrypto/luks: implement encryption key management
block/amend: add 'force' option
block/amend: separate amend and create options for qemu-img
block/amend: refactor qcow2 amend options
block/crypto: rename two functions
block/crypto: implement the encryption key management
block/qcow2: extend qemu-img amend interface with crypto options
iotests: filter few more luks specific create options
iotests: qemu-img tests for luks key management
block/core: add generic infrastructure for x-blockdev-amend qmp
command
block/crypto: implement blockdev-amend
block/qcow2: implement blockdev-amend
iotests: add tests for blockdev-amend
block.c | 4 +-
block/Makefile.objs | 2 +-
block/amend.c | 108 +++++++++
block/crypto.c | 203 ++++++++++++++--
block/crypto.h | 37 +++
block/qcow2.c | 306 ++++++++++++++----------
crypto/block-luks.c | 395 ++++++++++++++++++++++++++++++-
crypto/block.c | 29 +++
crypto/blockpriv.h | 8 +
docs/tools/qemu-img.rst | 5 +-
include/block/block.h | 1 +
include/block/block_int.h | 24 +-
include/crypto/block.h | 22 ++
qapi/block-core.json | 68 ++++++
qapi/crypto.json | 75 +++++-
qapi/job.json | 4 +-
qemu-img-cmds.hx | 4 +-
qemu-img.c | 44 +++-
tests/qemu-iotests/049.out | 102 ++++----
tests/qemu-iotests/061.out | 12 +-
tests/qemu-iotests/079.out | 18 +-
tests/qemu-iotests/082.out | 176 ++++----------
tests/qemu-iotests/085.out | 38 +--
tests/qemu-iotests/087.out | 6 +-
tests/qemu-iotests/115.out | 2 +-
tests/qemu-iotests/121.out | 4 +-
tests/qemu-iotests/125.out | 192 +++++++--------
tests/qemu-iotests/134.out | 2 +-
tests/qemu-iotests/144.out | 4 +-
tests/qemu-iotests/158.out | 4 +-
tests/qemu-iotests/182.out | 2 +-
tests/qemu-iotests/185.out | 8 +-
tests/qemu-iotests/188.out | 2 +-
tests/qemu-iotests/189.out | 4 +-
tests/qemu-iotests/198.out | 4 +-
tests/qemu-iotests/243.out | 16 +-
tests/qemu-iotests/250.out | 2 +-
tests/qemu-iotests/255.out | 8 +-
tests/qemu-iotests/259.out | 2 +-
tests/qemu-iotests/263.out | 4 +-
tests/qemu-iotests/274.out | 46 ++--
tests/qemu-iotests/280.out | 2 +-
tests/qemu-iotests/284.out | 6 +-
tests/qemu-iotests/293 | 207 ++++++++++++++++
tests/qemu-iotests/293.out | 99 ++++++++
tests/qemu-iotests/294 | 90 +++++++
tests/qemu-iotests/294.out | 30 +++
tests/qemu-iotests/295 | 279 ++++++++++++++++++++++
tests/qemu-iotests/295.out | 40 ++++
tests/qemu-iotests/296 | 234 ++++++++++++++++++
tests/qemu-iotests/296.out | 33 +++
tests/qemu-iotests/common.filter | 6 +-
tests/qemu-iotests/group | 4 +
53 files changed, 2494 insertions(+), 533 deletions(-)
create mode 100644 block/amend.c
create mode 100755 tests/qemu-iotests/293
create mode 100644 tests/qemu-iotests/293.out
create mode 100755 tests/qemu-iotests/294
create mode 100644 tests/qemu-iotests/294.out
create mode 100755 tests/qemu-iotests/295
create mode 100644 tests/qemu-iotests/295.out
create mode 100755 tests/qemu-iotests/296
create mode 100644 tests/qemu-iotests/296.out
--
2.17.2
next reply other threads:[~2020-05-10 13:42 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-10 13:40 Maxim Levitsky [this message]
2020-05-10 13:40 ` [PATCH v6 01/14] qcrypto/core: add generic infrastructure for crypto options amendment Maxim Levitsky
2020-05-10 13:40 ` [PATCH v6 02/14] qcrypto/luks: implement encryption key management Maxim Levitsky
2020-05-14 11:56 ` Max Reitz
2020-05-17 8:13 ` Maxim Levitsky
2020-05-10 13:40 ` [PATCH v6 03/14] block/amend: add 'force' option Maxim Levitsky
2020-05-14 12:18 ` Max Reitz
2020-05-17 8:15 ` Maxim Levitsky
2020-05-10 13:40 ` [PATCH v6 04/14] block/amend: separate amend and create options for qemu-img Maxim Levitsky
2020-05-14 12:28 ` Max Reitz
2020-05-14 16:10 ` Eric Blake
2020-05-15 6:22 ` Max Reitz
2020-05-15 17:24 ` Eric Blake
2020-05-17 8:47 ` Maxim Levitsky
2020-05-17 8:54 ` Maxim Levitsky
2020-05-10 13:40 ` [PATCH v6 05/14] block/amend: refactor qcow2 amend options Maxim Levitsky
2020-05-14 13:36 ` Max Reitz
2020-05-17 17:52 ` Maxim Levitsky
2020-05-10 13:40 ` [PATCH v6 06/14] block/crypto: rename two functions Maxim Levitsky
2020-05-10 13:40 ` [PATCH v6 07/14] block/crypto: implement the encryption key management Maxim Levitsky
2020-05-14 14:09 ` Max Reitz
2020-05-14 14:14 ` Daniel P. Berrangé
2020-05-14 14:32 ` Max Reitz
2020-05-17 17:56 ` Maxim Levitsky
2020-05-10 13:40 ` [PATCH v6 08/14] block/qcow2: extend qemu-img amend interface with crypto options Maxim Levitsky
2020-05-14 14:30 ` Max Reitz
2020-05-17 18:03 ` Maxim Levitsky
2020-05-10 13:40 ` [PATCH v6 09/14] iotests: filter few more luks specific create options Maxim Levitsky
2020-05-14 14:49 ` Max Reitz
2020-05-17 18:50 ` Maxim Levitsky
2020-05-10 13:40 ` [PATCH v6 10/14] iotests: qemu-img tests for luks key management Maxim Levitsky
2020-05-10 13:40 ` [PATCH v6 11/14] block/core: add generic infrastructure for x-blockdev-amend qmp command Maxim Levitsky
2020-05-14 15:47 ` Max Reitz
2020-05-18 10:48 ` Maxim Levitsky
2020-05-10 13:40 ` [PATCH v6 12/14] block/crypto: implement blockdev-amend Maxim Levitsky
2020-05-14 16:05 ` Max Reitz
2020-05-10 13:40 ` [PATCH v6 13/14] block/qcow2: " Maxim Levitsky
2020-05-14 16:05 ` Max Reitz
2020-05-10 13:40 ` [PATCH v6 14/14] iotests: add tests for blockdev-amend Maxim Levitsky
2020-05-10 14:37 ` [PATCH v6 00/14] LUKS: encryption slot management using amend interface no-reply
2020-05-10 15:14 ` no-reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200510134037.18487-1-mlevitsk@redhat.com \
--to=mlevitsk@redhat.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).