Skip to content
Snippets Groups Projects
  1. Oct 29, 2020
  2. Jun 12, 2019
  3. Dec 12, 2018
  4. Oct 19, 2018
  5. Nov 08, 2017
    • Thomas Huth's avatar
      tests: Run the luks tests in test-crypto-block only if encryption is available · b417a762
      Thomas Huth authored
      
      The test-crypto-block currently fails if encryption has not been
      compiled into QEMU:
      
      TEST: tests/test-crypto-block... (pid=22231)
        /crypto/block/qcow:                                                  OK
        /crypto/block/luks/default:
        Unexpected error in qcrypto_pbkdf2() at qemu/crypto/pbkdf-stub.c:41:
      FAIL
      GTester: last random seed: R02Sbbb5b6f299c6727f41bb50ba4aa6ef5c
      (pid=22237)
        /crypto/block/luks/aes-256-cbc-plain64:
        Unexpected error in qcrypto_pbkdf2() at qemu/crypto/pbkdf-stub.c:41:
      FAIL
      GTester: last random seed: R02S3e27992a5ab4cc95e141c4ed3c7f0d2e
      (pid=22239)
        /crypto/block/luks/aes-256-cbc-essiv:
        Unexpected error in qcrypto_pbkdf2() at qemu/crypto/pbkdf-stub.c:41:
      FAIL
      GTester: last random seed: R02S51b52bb02a66c42d8b331fd305384f53
      (pid=22241)
      FAIL: tests/test-crypto-block
      
      So run the luks test only if the required encryption support is available.
      
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      Signed-off-by: default avatarDaniel P. Berrange <berrange@redhat.com>
      b417a762
  6. Jul 11, 2017
  7. May 09, 2017
  8. Apr 24, 2017
  9. Sep 23, 2016
  10. Mar 22, 2016
    • Markus Armbruster's avatar
      include/qemu/osdep.h: Don't include qapi/error.h · da34e65c
      Markus Armbruster authored
      
      Commit 57cb38b3 included qapi/error.h into qemu/osdep.h to get the
      Error typedef.  Since then, we've moved to include qemu/osdep.h
      everywhere.  Its file comment explains: "To avoid getting into
      possible circular include dependencies, this file should not include
      any other QEMU headers, with the exceptions of config-host.h,
      compiler.h, os-posix.h and os-win32.h, all of which are doing a
      similar job to this file and are under similar constraints."
      qapi/error.h doesn't do a similar job, and it doesn't adhere to
      similar constraints: it includes qapi-types.h.  That's in excess of
      100KiB of crap most .c files don't actually need.
      
      Add the typedef to qemu/typedefs.h, and include that instead of
      qapi/error.h.  Include qapi/error.h in .c files that need it and don't
      get it now.  Include qapi-types.h in qom/object.h for uint16List.
      
      Update scripts/clean-includes accordingly.  Update it further to match
      reality: replace config.h by config-target.h, add sysemu/os-posix.h,
      sysemu/os-win32.h.  Update the list of includes in the qemu/osdep.h
      comment quoted above similarly.
      
      This reduces the number of objects depending on qapi/error.h from "all
      of them" to less than a third.  Unfortunately, the number depending on
      qapi-types.h shrinks only a little.  More work is needed for that one.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      [Fix compilation without the spice devel packages. - Paolo]
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      da34e65c
  11. Mar 17, 2016
    • Daniel P. Berrangé's avatar
      crypto: implement the LUKS block encryption format · 3e308f20
      Daniel P. Berrangé authored
      
      Provide a block encryption implementation that follows the
      LUKS/dm-crypt specification.
      
      This supports all combinations of hash, cipher algorithm,
      cipher mode and iv generator that are implemented by the
      current crypto layer.
      
      There is support for opening existing volumes formatted
      by dm-crypt, and for formatting new volumes. In the latter
      case it will only use key slot 0.
      
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Signed-off-by: default avatarDaniel P. Berrange <berrange@redhat.com>
      3e308f20
    • Daniel P. Berrangé's avatar
      crypto: add block encryption framework · 7d969014
      Daniel P. Berrangé authored
      
      Add a generic framework for supporting different block encryption
      formats. Upon instantiating a QCryptoBlock object, it will read
      the encryption header and extract the encryption keys. It is
      then possible to call methods to encrypt/decrypt data buffers.
      
      There is also a mode whereby it will create/initialize a new
      encryption header on a previously unformatted volume.
      
      The initial framework comes with support for the legacy QCow
      AES based encryption. This enables code in the QCow driver to
      be consolidated later.
      
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Signed-off-by: default avatarDaniel P. Berrange <berrange@redhat.com>
      7d969014
Loading