* [PULL 0/2] Misc next patches
@ 2023-07-25 16:23 Daniel P. Berrangé
2023-07-25 16:23 ` [PULL 1/2] crypto: Always initialize splitkeylen Daniel P. Berrangé
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Daniel P. Berrangé @ 2023-07-25 16:23 UTC (permalink / raw)
To: qemu-devel
Cc: Canokeys.org, Gerd Hoffmann, Hongren (Zenithal) Zheng,
Daniel P. Berrangé
The following changes since commit a279ca4ea07383314b2d2b2f1d550be9482f148e:
Merge tag 'pull-target-arm-20230725' of https://git.linaro.org/people/pmaydell/qemu-arm into staging (2023-07-25 12:44:39 +0100)
are available in the Git repository at:
https://gitlab.com/berrange/qemu tags/misc-next-pull-request
for you to fetch changes up to 095be0910b89b5d156e20641bd65ac6cab3f8305:
hw/usb/canokey: change license to GPLv2+ (2023-07-25 17:15:59 +0100)
----------------------------------------------------------------
Miscellaneous fixes
* Switch canokey device license from Apache to GPLv2+
* Fix uninitialized variable warning in LUKS code
----------------------------------------------------------------
Akihiko Odaki (1):
crypto: Always initialize splitkeylen
Hongren (Zenithal) Zheng (1):
hw/usb/canokey: change license to GPLv2+
crypto/block-luks.c | 4 ++--
hw/usb/canokey.c | 2 +-
hw/usb/canokey.h | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
--
2.41.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PULL 1/2] crypto: Always initialize splitkeylen
2023-07-25 16:23 [PULL 0/2] Misc next patches Daniel P. Berrangé
@ 2023-07-25 16:23 ` Daniel P. Berrangé
2023-07-25 16:23 ` [PULL 2/2] hw/usb/canokey: change license to GPLv2+ Daniel P. Berrangé
2023-07-26 16:22 ` [PULL 0/2] Misc next patches Richard Henderson
2 siblings, 0 replies; 6+ messages in thread
From: Daniel P. Berrangé @ 2023-07-25 16:23 UTC (permalink / raw)
To: qemu-devel
Cc: Canokeys.org, Gerd Hoffmann, Hongren (Zenithal) Zheng,
Daniel P. Berrangé, Akihiko Odaki
From: Akihiko Odaki <akihiko.odaki@daynix.com>
When _FORTIFY_SOURCE=2, glibc version is 2.35, and GCC version is
12.1.0, the compiler complains as follows:
In file included from /usr/include/string.h:535,
from /home/alarm/q/var/qemu/include/qemu/osdep.h:99,
from ../crypto/block-luks.c:21:
In function 'memset',
inlined from 'qcrypto_block_luks_store_key' at ../crypto/block-luks.c:843:9:
/usr/include/bits/string_fortified.h:59:10: error: 'splitkeylen' may be used uninitialized [-Werror=maybe-uninitialized]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
../crypto/block-luks.c: In function 'qcrypto_block_luks_store_key':
../crypto/block-luks.c:699:12: note: 'splitkeylen' was declared here
699 | size_t splitkeylen;
| ^~~~~~~~~~~
It seems the compiler cannot see that splitkeylen will not be used
when splitkey is NULL. Suppress the warning by initializing splitkeylen
even when splitkey stays NULL.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
crypto/block-luks.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/crypto/block-luks.c b/crypto/block-luks.c
index 5688783ab1..2f59c3a625 100644
--- a/crypto/block-luks.c
+++ b/crypto/block-luks.c
@@ -706,14 +706,14 @@ qcrypto_block_luks_store_key(QCryptoBlock *block,
assert(slot_idx < QCRYPTO_BLOCK_LUKS_NUM_KEY_SLOTS);
slot = &luks->header.key_slots[slot_idx];
+ splitkeylen = luks->header.master_key_len * slot->stripes;
+
if (qcrypto_random_bytes(slot->salt,
QCRYPTO_BLOCK_LUKS_SALT_LEN,
errp) < 0) {
goto cleanup;
}
- splitkeylen = luks->header.master_key_len * slot->stripes;
-
/*
* Determine how many iterations are required to
* hash the user password while consuming 1 second of compute
--
2.41.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PULL 2/2] hw/usb/canokey: change license to GPLv2+
2023-07-25 16:23 [PULL 0/2] Misc next patches Daniel P. Berrangé
2023-07-25 16:23 ` [PULL 1/2] crypto: Always initialize splitkeylen Daniel P. Berrangé
@ 2023-07-25 16:23 ` Daniel P. Berrangé
2023-07-26 16:22 ` [PULL 0/2] Misc next patches Richard Henderson
2 siblings, 0 replies; 6+ messages in thread
From: Daniel P. Berrangé @ 2023-07-25 16:23 UTC (permalink / raw)
To: qemu-devel
Cc: Canokeys.org, Gerd Hoffmann, Hongren (Zenithal) Zheng,
Daniel P. Berrangé, Philippe Mathieu-Daudé,
YuanYang Meng
From: "Hongren (Zenithal) Zheng" <i@zenithal.me>
Apache license is considered by some to be not compatible
with GPLv2+. Since QEMU as combined work is GPLv2-only,
these two files should be made compatible.
Reported-by: "Daniel P. Berrangé" <berrange@redhat.com>
Link: https://lore.kernel.org/qemu-devel/ZEpKXncC%2Fe6FKRe9@redhat.com/
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-By: canokeys.org<http://canokeys.org><contact@canokeys.org>
Acked-by: YuanYang Meng <mkfssion@mkfssion.com>
Signed-off-by: Hongren (Zenithal) Zheng <i@zenithal.me>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
hw/usb/canokey.c | 2 +-
hw/usb/canokey.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/usb/canokey.c b/hw/usb/canokey.c
index bbc5da07b5..b306eeb20e 100644
--- a/hw/usb/canokey.c
+++ b/hw/usb/canokey.c
@@ -4,7 +4,7 @@
* Copyright (c) 2021-2022 Canokeys.org <contact@canokeys.org>
* Written by Hongren (Zenithal) Zheng <i@zenithal.me>
*
- * This code is licensed under the Apache-2.0.
+ * This code is licensed under the GPL v2 or later.
*/
#include "qemu/osdep.h"
diff --git a/hw/usb/canokey.h b/hw/usb/canokey.h
index 24cf304203..e528889d33 100644
--- a/hw/usb/canokey.h
+++ b/hw/usb/canokey.h
@@ -4,7 +4,7 @@
* Copyright (c) 2021-2022 Canokeys.org <contact@canokeys.org>
* Written by Hongren (Zenithal) Zheng <i@zenithal.me>
*
- * This code is licensed under the Apache-2.0.
+ * This code is licensed under the GPL v2 or later.
*/
#ifndef CANOKEY_H
--
2.41.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PULL 0/2] Misc next patches
2023-07-25 16:23 [PULL 0/2] Misc next patches Daniel P. Berrangé
2023-07-25 16:23 ` [PULL 1/2] crypto: Always initialize splitkeylen Daniel P. Berrangé
2023-07-25 16:23 ` [PULL 2/2] hw/usb/canokey: change license to GPLv2+ Daniel P. Berrangé
@ 2023-07-26 16:22 ` Richard Henderson
2 siblings, 0 replies; 6+ messages in thread
From: Richard Henderson @ 2023-07-26 16:22 UTC (permalink / raw)
To: Daniel P. Berrangé, qemu-devel
Cc: Canokeys.org, Gerd Hoffmann, Hongren (Zenithal) Zheng
On 7/25/23 09:23, Daniel P. Berrangé wrote:
> The following changes since commit a279ca4ea07383314b2d2b2f1d550be9482f148e:
>
> Merge tag 'pull-target-arm-20230725' ofhttps://git.linaro.org/people/pmaydell/qemu-arm into staging (2023-07-25 12:44:39 +0100)
>
> are available in the Git repository at:
>
> https://gitlab.com/berrange/qemu tags/misc-next-pull-request
>
> for you to fetch changes up to 095be0910b89b5d156e20641bd65ac6cab3f8305:
>
> hw/usb/canokey: change license to GPLv2+ (2023-07-25 17:15:59 +0100)
>
> ----------------------------------------------------------------
> Miscellaneous fixes
>
> * Switch canokey device license from Apache to GPLv2+
> * Fix uninitialized variable warning in LUKS code
Applied, thanks. Please update https://wiki.qemu.org/ChangeLog/8.1 as appropriate.
r~
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PULL 0/2] Misc next patches
@ 2023-07-25 16:24 Daniel P. Berrangé
2023-07-25 19:11 ` Peter Maydell
0 siblings, 1 reply; 6+ messages in thread
From: Daniel P. Berrangé @ 2023-07-25 16:24 UTC (permalink / raw)
To: qemu-devel
Cc: Canokeys.org, Gerd Hoffmann, Daniel P. Berrangé,
Hongren (Zenithal) Zheng
The following changes since commit a279ca4ea07383314b2d2b2f1d550be9482f148e:
Merge tag 'pull-target-arm-20230725' of https://git.linaro.org/people/pmaydell/qemu-arm into staging (2023-07-25 12:44:39 +0100)
are available in the Git repository at:
https://gitlab.com/berrange/qemu tags/misc-next-pull-request
for you to fetch changes up to 0e6b20b9656174e815751cf8b21f5e326148bb99:
hw/usb/canokey: change license to GPLv2+ (2023-07-25 17:24:12 +0100)
----------------------------------------------------------------
Miscellaneous fixes
* Switch canokey license from Apache to GPLv2+
* Fix uninitialized variable in LUKS driver
----------------------------------------------------------------
Akihiko Odaki (1):
crypto: Always initialize splitkeylen
Hongren (Zenithal) Zheng (1):
hw/usb/canokey: change license to GPLv2+
crypto/block-luks.c | 4 ++--
hw/usb/canokey.c | 2 +-
hw/usb/canokey.h | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
--
2.41.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PULL 0/2] Misc next patches
2023-07-25 16:24 Daniel P. Berrangé
@ 2023-07-25 19:11 ` Peter Maydell
0 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2023-07-25 19:11 UTC (permalink / raw)
To: Daniel P. Berrangé
Cc: qemu-devel, Canokeys.org, Gerd Hoffmann, Hongren (Zenithal) Zheng
On Tue, 25 Jul 2023 at 17:26, Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> The following changes since commit a279ca4ea07383314b2d2b2f1d550be9482f148e:
>
> Merge tag 'pull-target-arm-20230725' of https://git.linaro.org/people/pmaydell/qemu-arm into staging (2023-07-25 12:44:39 +0100)
>
> are available in the Git repository at:
>
> https://gitlab.com/berrange/qemu tags/misc-next-pull-request
>
> for you to fetch changes up to 0e6b20b9656174e815751cf8b21f5e326148bb99:
>
> hw/usb/canokey: change license to GPLv2+ (2023-07-25 17:24:12 +0100)
>
> ----------------------------------------------------------------
> Miscellaneous fixes
>
> * Switch canokey license from Apache to GPLv2+
> * Fix uninitialized variable in LUKS driver
FYI, this just missed rc1, but will go into rc2.
-- PMM
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-07-26 16:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-25 16:23 [PULL 0/2] Misc next patches Daniel P. Berrangé
2023-07-25 16:23 ` [PULL 1/2] crypto: Always initialize splitkeylen Daniel P. Berrangé
2023-07-25 16:23 ` [PULL 2/2] hw/usb/canokey: change license to GPLv2+ Daniel P. Berrangé
2023-07-26 16:22 ` [PULL 0/2] Misc next patches Richard Henderson
-- strict thread matches above, loose matches on Subject: below --
2023-07-25 16:24 Daniel P. Berrangé
2023-07-25 19:11 ` Peter Maydell
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).