From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56674) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bO2zq-0003sB-2B for qemu-devel@nongnu.org; Fri, 15 Jul 2016 09:17:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bO2zn-00070q-NV for qemu-devel@nongnu.org; Fri, 15 Jul 2016 09:17:36 -0400 References: <1465921477-9005-1-git-send-email-berrange@redhat.com> From: Max Reitz Message-ID: <648bab11-e7b8-3b32-cddc-b2ce8547e380@redhat.com> Date: Fri, 15 Jul 2016 15:17:24 +0200 MIME-Version: 1.0 In-Reply-To: <1465921477-9005-1-git-send-email-berrange@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="45mPdUJVJnB5v8L6Svmb7ax1dWPU52m11" Subject: Re: [Qemu-devel] [PATCH v3 0/2] Report format specific info for LUKS block driver List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Eric Blake , Kevin Wolf This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --45mPdUJVJnB5v8L6Svmb7ax1dWPU52m11 From: Max Reitz To: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Eric Blake , Kevin Wolf Message-ID: <648bab11-e7b8-3b32-cddc-b2ce8547e380@redhat.com> Subject: Re: [PATCH v3 0/2] Report format specific info for LUKS block driver References: <1465921477-9005-1-git-send-email-berrange@redhat.com> In-Reply-To: <1465921477-9005-1-git-send-email-berrange@redhat.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable On 14.06.2016 18:24, Daniel P. Berrange wrote: > This is a followup to: >=20 > v1: https://lists.gnu.org/archive/html/qemu-devel/2016-06/msg01723.ht= ml > v2: https://lists.gnu.org/archive/html/qemu-devel/2016-06/msg03642.ht= ml >=20 > The 'qemu-img info' tool has ability to print format specific > information, eg with qcow2 it reports two extra items: >=20 > $ qemu-img info ~/VirtualMachines/demo.qcow2 > image: /home/berrange/VirtualMachines/demo.qcow2 > file format: qcow2 > virtual size: 3.0G (3221225472 bytes) > disk size: 140K > cluster_size: 65536 > Format specific information: > compat: 0.10 > refcount bits: 16 >=20 >=20 > This is not currently wired up for the LUKS driver. This patch > series adds that support so that we can report useful data about > the LUKS volume such as the crypto algorithm choices, key slot > usage and other volume metadata. >=20 > The first patch extends the crypto API to allow querying of the > format specific metadata >=20 > The second patches extends the block API to allow the LUKS driver > to report the format specific metadata. >=20 > $ qemu-img info ~/VirtualMachines/demo.luks > image: /home/berrange/VirtualMachines/demo.luks > file format: luks > virtual size: 98M (102760448 bytes) > disk size: 100M > encrypted: yes > Format specific information: > ivgen alg: plain64 > hash alg: sha1 > cipher alg: aes-128 > uuid: 6ddee74b-3a22-408c-8909-6789d4fa2594 > cipher mode: xts > slots: > [0]: > active: true > iters: 572706 > key offset: 4096 > stripes: 4000 > [1]: > active: false > key offset: 135168 > [2]: > active: false > key offset: 266240 > [3]: > active: false > key offset: 397312 > [4]: > active: false > key offset: 528384 > [5]: > active: false > key offset: 659456 > [6]: > active: false > key offset: 790528 > [7]: > active: false > key offset: 921600 > payload offset: 2097152 > master key iters: 142375 >=20 > Technically most of the code changes here are in the crypto > layer, rather than the block layer. I'm fine with both patches > going through the block maintainer tree, or can submit a both > patches myself as, for sake of simplicity of merge. >=20 > Changed in v3: >=20 > - Do full struct copy instead of field-by-field copy (Max) > - Simplify handling of linked list pointers (Max) > - Use g_strndup with uuid to guarantee null termination (Max) > - Misc typos (Max) >=20 > Changed in v2: >=20 > - Drop patches related to creating a text output visitor to > format the ImageInfoSpecific data. This will be continued > in a separate patch series > - Fix key offset to be in bytes instead of sectors > - Drop the duplicated ImageInfoSpecificLUKS type and just > directly use QCryptoBlockInfoLUKS type in block layer > - Skip reporting stripes/iters if keyslot is inactive > - Add missing QAPI schema docs >=20 >=20 >=20 > Daniel P. Berrange (2): > crypto: add support for querying parameters for block encryption > block: export LUKS specific data to qemu-img info >=20 > block/crypto.c | 49 ++++++++++++++++++++++++++++++++ > crypto/block-luks.c | 67 ++++++++++++++++++++++++++++++++++++++++++= ++ > crypto/block.c | 17 +++++++++++ > crypto/blockpriv.h | 4 +++ > include/crypto/block.h | 16 +++++++++++ > qapi/block-core.json | 6 +++- > qapi/crypto.json | 76 ++++++++++++++++++++++++++++++++++++++++++= ++++++++ > 7 files changed, 234 insertions(+), 1 deletion(-) Thanks, I've applied the series to my block branch: https://github.com/XanClic/qemu/commits/block Max --45mPdUJVJnB5v8L6Svmb7ax1dWPU52m11 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEvBAEBCAAZBQJXiOJkEhxtcmVpdHpAcmVkaGF0LmNvbQAKCRA7sUIC6DisrUpD CACMTq7Z4g98A+Yy3FNPrdoBgNVSoGHHENjGHd3CC8/uelMA/TJJqoeVpo1bpQmQ BTWSUWjVWJ5xZPY4mE2HGdgPcSS+lekQvPTJX2MtnsVAgEHP0I53M3ZryF+aWgvX V8t85fO/dXkFHLDBf29mVUiFt/jnG1NJPPUxswuPldKtlzIi49sSiY9msNeZlBpf C2UBYTohnXZwDeJV8xu91hOT51hHyQ2z9eIBun0Hc6MgXrg5HJq3ZQEONv0gErPB nhtq1Szf/em0soVrKxWWtC3IDzsBz+/iCt3G5tL7R7lpSbEILfMQYQ32DpZDMzT2 sDG8zUFo6Nu7dDNdFKC1vt4I =vNs5 -----END PGP SIGNATURE----- --45mPdUJVJnB5v8L6Svmb7ax1dWPU52m11--