qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 569644: crypto: fix getter of a QCryptoSecret


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 569644: crypto: fix getter of a QCryptoSecret's property
Date: Thu, 07 May 2020 08:30:30 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 569644f761f704901b70bd259762c60b7cb28634
      
https://github.com/qemu/qemu/commit/569644f761f704901b70bd259762c60b7cb28634
  Author: Tong Ho <address@hidden>
  Date:   2020-05-07 (Thu, 07 May 2020)

  Changed paths:
    M crypto/secret.c

  Log Message:
  -----------
  crypto: fix getter of a QCryptoSecret's property

This fixes the condition-check done by the "loaded" property
getter, such that the property returns true even when the
secret is loaded by the 'file' option.

Signed-off-by: Tong Ho <address@hidden>
Signed-off-by: Daniel P. Berrangé <address@hidden>


  Commit: 861c50bf5db3c18f5cd74ea929d4e018fdcedc64
      
https://github.com/qemu/qemu/commit/861c50bf5db3c18f5cd74ea929d4e018fdcedc64
  Author: Alexey Krasikov <address@hidden>
  Date:   2020-05-07 (Thu, 07 May 2020)

  Changed paths:
    M crypto/secret.c

  Log Message:
  -----------
  crypto/secret: fix inconsequential errors.

Change condition from QCRYPTO_SECRET_FORMAT_RAW
to QCRYPTO_SECRET_FORMAT_BASE64 in if-operator, because
this is potential error if you add another format value.

Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Alexey Krasikov <address@hidden>
Signed-off-by: Daniel P. Berrangé <address@hidden>


  Commit: ccebb5f3735edcbcbf9429b605fcb9399a0dd72c
      
https://github.com/qemu/qemu/commit/ccebb5f3735edcbcbf9429b605fcb9399a0dd72c
  Author: Chen Qun <address@hidden>
  Date:   2020-05-07 (Thu, 07 May 2020)

  Changed paths:
    M crypto/cipher-builtin.c

  Log Message:
  -----------
  crypto: Redundant type conversion for AES_KEY pointer

We can delete the redundant type conversion if
we set the the AES_KEY parameter with 'const' in
qcrypto_cipher_aes_ecb_(en|de)crypt() function.

Reported-by: Euler Robot <address@hidden>
Signed-off-by: Chen Qun <address@hidden>
Signed-off-by: Daniel P. Berrangé <address@hidden>


  Commit: 3d1900a471c89ebdd9ea7f3582fe487e2f494419
      
https://github.com/qemu/qemu/commit/3d1900a471c89ebdd9ea7f3582fe487e2f494419
  Author: Maxim Levitsky <address@hidden>
  Date:   2020-05-07 (Thu, 07 May 2020)

  Changed paths:
    M block/crypto.c

  Log Message:
  -----------
  block: luks: better error message when creating too large files

Currently if you attampt to create too large file with luks you
get the following error message:

Formatting 'test.luks', fmt=luks size=17592186044416 key-secret=sec0
qemu-img: test.luks: Could not resize file: File too large

While for raw format the error message is
qemu-img: test.img: The image size is too large for file format 'raw'

The reason for this is that qemu-img checks for errono of the failure,
and presents the later error when it is -EFBIG

However crypto generic code 'swallows' the errno and replaces it
with -EIO.

As an attempt to make it better, we can make luks driver,
detect -EFBIG and in this case present a better error message,
which is what this patch does

The new error message is:

qemu-img: error creating test.luks: The requested file size is too large

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1534898
Signed-off-by: Maxim Levitsky <address@hidden>
Signed-off-by: Daniel P. Berrangé <address@hidden>


  Commit: 6022e15d146d8bba9610a9d134afa4bc6e5d9275
      
https://github.com/qemu/qemu/commit/6022e15d146d8bba9610a9d134afa4bc6e5d9275
  Author: Daniel P. Berrangé <address@hidden>
  Date:   2020-05-07 (Thu, 07 May 2020)

  Changed paths:
    M tests/benchmark-crypto-hash.c

  Log Message:
  -----------
  crypto: extend hash benchmark to cover more algorithms

Extend the hash benchmark so that it can validate all algorithms
supported by QEMU instead of being limited to sha256.

Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Daniel P. Berrangé <address@hidden>


  Commit: 3c7adbc67d9a5c3e992a4dd13b8704464daaad5b
      
https://github.com/qemu/qemu/commit/3c7adbc67d9a5c3e992a4dd13b8704464daaad5b
  Author: Peter Maydell <address@hidden>
  Date:   2020-05-07 (Thu, 07 May 2020)

  Changed paths:
    M block/crypto.c
    M crypto/cipher-builtin.c
    M crypto/secret.c
    M tests/benchmark-crypto-hash.c

  Log Message:
  -----------
  Merge remote-tracking branch 
'remotes/berrange/tags/qcrypto-next-pull-request' into staging

Misc crypto subsystem fixes

* Improve error message for large files when creating LUKS volumes
* Expand crypto hash benchmark coverage
* Misc code refactoring with no functional change

# gpg: Signature made Thu 07 May 2020 12:57:02 BST
# gpg:                using RSA key DAF3A6FDB26B62912D0E8E3FBE86EBB415104FDF
# gpg: Good signature from "Daniel P. Berrange <address@hidden>" [full]
# gpg:                 aka "Daniel P. Berrange <address@hidden>" [full]
# Primary key fingerprint: DAF3 A6FD B26B 6291 2D0E  8E3F BE86 EBB4 1510 4FDF

* remotes/berrange/tags/qcrypto-next-pull-request:
  crypto: extend hash benchmark to cover more algorithms
  block: luks: better error message when creating too large files
  crypto: Redundant type conversion for AES_KEY pointer
  crypto/secret: fix inconsequential errors.
  crypto: fix getter of a QCryptoSecret's property

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/b894c6ed4a38...3c7adbc67d9a



reply via email to

[Prev in Thread] Current Thread [Next in Thread]