* [PATCH 3/3] crypto: Redundant type conversion for AES_KEY pointer
@ 2020-03-25 9:21 ` Chen Qun
0 siblings, 0 replies; 25+ messages in thread
From: Chen Qun @ 2020-03-25 9:21 UTC (permalink / raw)
To: qemu-devel, qemu-trivial
Cc: Chen Qun, Euler Robot, Daniel P. Berrangé,
zhang.zhanghailiang, laurent
Fix: eaec903c5b8
Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
---
Cc: "Daniel P. Berrangé" <berrange@redhat.com>
---
crypto/cipher-builtin.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/crypto/cipher-builtin.c b/crypto/cipher-builtin.c
index bf8413e71a..99d6280a16 100644
--- a/crypto/cipher-builtin.c
+++ b/crypto/cipher-builtin.c
@@ -133,8 +133,7 @@ static void qcrypto_cipher_aes_xts_encrypt(const void *ctx,
{
const QCryptoCipherBuiltinAESContext *aesctx = ctx;
- qcrypto_cipher_aes_ecb_encrypt((AES_KEY *)&aesctx->enc,
- src, dst, length);
+ qcrypto_cipher_aes_ecb_encrypt(&aesctx->enc, src, dst, length);
}
@@ -145,8 +144,7 @@ static void qcrypto_cipher_aes_xts_decrypt(const void *ctx,
{
const QCryptoCipherBuiltinAESContext *aesctx = ctx;
- qcrypto_cipher_aes_ecb_decrypt((AES_KEY *)&aesctx->dec,
- src, dst, length);
+ qcrypto_cipher_aes_ecb_decrypt(&aesctx->dec, src, dst, length);
}
--
2.23.0
^ permalink raw reply related [flat|nested] 25+ messages in thread* Re: [PATCH 3/3] crypto: Redundant type conversion for AES_KEY pointer
2020-03-25 9:21 ` Chen Qun
@ 2020-03-25 9:45 ` Laurent Vivier
-1 siblings, 0 replies; 25+ messages in thread
From: Laurent Vivier @ 2020-03-25 9:45 UTC (permalink / raw)
To: Chen Qun, qemu-devel, qemu-trivial
Cc: zhang.zhanghailiang, Euler Robot, Daniel P. Berrangé
Le 25/03/2020 à 10:21, Chen Qun a écrit :
> Fix: eaec903c5b8
>
Did you run the coccinelle script scripts/coccinelle/typecast.cocci ?
Thanks,
Laurent
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
> ---
> Cc: "Daniel P. Berrangé" <berrange@redhat.com>
> ---
> crypto/cipher-builtin.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/crypto/cipher-builtin.c b/crypto/cipher-builtin.c
> index bf8413e71a..99d6280a16 100644
> --- a/crypto/cipher-builtin.c
> +++ b/crypto/cipher-builtin.c
> @@ -133,8 +133,7 @@ static void qcrypto_cipher_aes_xts_encrypt(const void *ctx,
> {
> const QCryptoCipherBuiltinAESContext *aesctx = ctx;
>
> - qcrypto_cipher_aes_ecb_encrypt((AES_KEY *)&aesctx->enc,
> - src, dst, length);
> + qcrypto_cipher_aes_ecb_encrypt(&aesctx->enc, src, dst, length);
> }
>
>
> @@ -145,8 +144,7 @@ static void qcrypto_cipher_aes_xts_decrypt(const void *ctx,
> {
> const QCryptoCipherBuiltinAESContext *aesctx = ctx;
>
> - qcrypto_cipher_aes_ecb_decrypt((AES_KEY *)&aesctx->dec,
> - src, dst, length);
> + qcrypto_cipher_aes_ecb_decrypt(&aesctx->dec, src, dst, length);
> }
>
>
>
^ permalink raw reply [flat|nested] 25+ messages in thread* Re: [PATCH 3/3] crypto: Redundant type conversion for AES_KEY pointer
@ 2020-03-25 9:45 ` Laurent Vivier
0 siblings, 0 replies; 25+ messages in thread
From: Laurent Vivier @ 2020-03-25 9:45 UTC (permalink / raw)
To: Chen Qun, qemu-devel, qemu-trivial
Cc: Daniel P. Berrangé, zhang.zhanghailiang, Euler Robot
Le 25/03/2020 à 10:21, Chen Qun a écrit :
> Fix: eaec903c5b8
>
Did you run the coccinelle script scripts/coccinelle/typecast.cocci ?
Thanks,
Laurent
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
> ---
> Cc: "Daniel P. Berrangé" <berrange@redhat.com>
> ---
> crypto/cipher-builtin.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/crypto/cipher-builtin.c b/crypto/cipher-builtin.c
> index bf8413e71a..99d6280a16 100644
> --- a/crypto/cipher-builtin.c
> +++ b/crypto/cipher-builtin.c
> @@ -133,8 +133,7 @@ static void qcrypto_cipher_aes_xts_encrypt(const void *ctx,
> {
> const QCryptoCipherBuiltinAESContext *aesctx = ctx;
>
> - qcrypto_cipher_aes_ecb_encrypt((AES_KEY *)&aesctx->enc,
> - src, dst, length);
> + qcrypto_cipher_aes_ecb_encrypt(&aesctx->enc, src, dst, length);
> }
>
>
> @@ -145,8 +144,7 @@ static void qcrypto_cipher_aes_xts_decrypt(const void *ctx,
> {
> const QCryptoCipherBuiltinAESContext *aesctx = ctx;
>
> - qcrypto_cipher_aes_ecb_decrypt((AES_KEY *)&aesctx->dec,
> - src, dst, length);
> + qcrypto_cipher_aes_ecb_decrypt(&aesctx->dec, src, dst, length);
> }
>
>
>
^ permalink raw reply [flat|nested] 25+ messages in thread* RE: [PATCH 3/3] crypto: Redundant type conversion for AES_KEY pointer
2020-03-25 9:45 ` Laurent Vivier
@ 2020-03-25 10:06 ` Chenqun (kuhn)
-1 siblings, 0 replies; 25+ messages in thread
From: Chenqun (kuhn) @ 2020-03-25 10:06 UTC (permalink / raw)
To: Laurent Vivier, qemu-devel@nongnu.org, qemu-trivial@nongnu.org
Cc: Zhanghailiang, Euler Robot, Daniel P. Berrangé
>-----Original Message-----
>From: Laurent Vivier [mailto:laurent@vivier.eu]
>Sent: Wednesday, March 25, 2020 5:45 PM
>To: Chenqun (kuhn) <kuhn.chenqun@huawei.com>; qemu-devel@nongnu.org;
>qemu-trivial@nongnu.org
>Cc: Zhanghailiang <zhang.zhanghailiang@huawei.com>; Euler Robot
><euler.robot@huawei.com>; Daniel P. Berrangé <berrange@redhat.com>
>Subject: Re: [PATCH 3/3] crypto: Redundant type conversion for AES_KEY pointer
>
>Le 25/03/2020 à 10:21, Chen Qun a écrit :
>> Fix: eaec903c5b8
>>
>
>Did you run the coccinelle script scripts/coccinelle/typecast.cocci ?
>
Yes, I run it and plan to integrate it into EulerRobot so that similar issues can be discovered sooner.
Thanks.
>
>> Reported-by: Euler Robot <euler.robot@huawei.com>
>> Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
>> ---
>> Cc: "Daniel P. Berrangé" <berrange@redhat.com>
>> ---
>> crypto/cipher-builtin.c | 6 ++----
>> 1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/crypto/cipher-builtin.c b/crypto/cipher-builtin.c index
>> bf8413e71a..99d6280a16 100644
>> --- a/crypto/cipher-builtin.c
>> +++ b/crypto/cipher-builtin.c
>> @@ -133,8 +133,7 @@ static void qcrypto_cipher_aes_xts_encrypt(const
>> void *ctx, {
>> const QCryptoCipherBuiltinAESContext *aesctx = ctx;
>>
>> - qcrypto_cipher_aes_ecb_encrypt((AES_KEY *)&aesctx->enc,
>> - src, dst, length);
>> + qcrypto_cipher_aes_ecb_encrypt(&aesctx->enc, src, dst, length);
>> }
>>
>>
>> @@ -145,8 +144,7 @@ static void qcrypto_cipher_aes_xts_decrypt(const
>> void *ctx, {
>> const QCryptoCipherBuiltinAESContext *aesctx = ctx;
>>
>> - qcrypto_cipher_aes_ecb_decrypt((AES_KEY *)&aesctx->dec,
>> - src, dst, length);
>> + qcrypto_cipher_aes_ecb_decrypt(&aesctx->dec, src, dst, length);
>> }
>>
>>
>>
^ permalink raw reply [flat|nested] 25+ messages in thread* RE: [PATCH 3/3] crypto: Redundant type conversion for AES_KEY pointer
@ 2020-03-25 10:06 ` Chenqun (kuhn)
0 siblings, 0 replies; 25+ messages in thread
From: Chenqun (kuhn) @ 2020-03-25 10:06 UTC (permalink / raw)
To: Laurent Vivier, qemu-devel@nongnu.org, qemu-trivial@nongnu.org
Cc: Daniel P. Berrangé, Zhanghailiang, Euler Robot
>-----Original Message-----
>From: Laurent Vivier [mailto:laurent@vivier.eu]
>Sent: Wednesday, March 25, 2020 5:45 PM
>To: Chenqun (kuhn) <kuhn.chenqun@huawei.com>; qemu-devel@nongnu.org;
>qemu-trivial@nongnu.org
>Cc: Zhanghailiang <zhang.zhanghailiang@huawei.com>; Euler Robot
><euler.robot@huawei.com>; Daniel P. Berrangé <berrange@redhat.com>
>Subject: Re: [PATCH 3/3] crypto: Redundant type conversion for AES_KEY pointer
>
>Le 25/03/2020 à 10:21, Chen Qun a écrit :
>> Fix: eaec903c5b8
>>
>
>Did you run the coccinelle script scripts/coccinelle/typecast.cocci ?
>
Yes, I run it and plan to integrate it into EulerRobot so that similar issues can be discovered sooner.
Thanks.
>
>> Reported-by: Euler Robot <euler.robot@huawei.com>
>> Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
>> ---
>> Cc: "Daniel P. Berrangé" <berrange@redhat.com>
>> ---
>> crypto/cipher-builtin.c | 6 ++----
>> 1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/crypto/cipher-builtin.c b/crypto/cipher-builtin.c index
>> bf8413e71a..99d6280a16 100644
>> --- a/crypto/cipher-builtin.c
>> +++ b/crypto/cipher-builtin.c
>> @@ -133,8 +133,7 @@ static void qcrypto_cipher_aes_xts_encrypt(const
>> void *ctx, {
>> const QCryptoCipherBuiltinAESContext *aesctx = ctx;
>>
>> - qcrypto_cipher_aes_ecb_encrypt((AES_KEY *)&aesctx->enc,
>> - src, dst, length);
>> + qcrypto_cipher_aes_ecb_encrypt(&aesctx->enc, src, dst, length);
>> }
>>
>>
>> @@ -145,8 +144,7 @@ static void qcrypto_cipher_aes_xts_decrypt(const
>> void *ctx, {
>> const QCryptoCipherBuiltinAESContext *aesctx = ctx;
>>
>> - qcrypto_cipher_aes_ecb_decrypt((AES_KEY *)&aesctx->dec,
>> - src, dst, length);
>> + qcrypto_cipher_aes_ecb_decrypt(&aesctx->dec, src, dst, length);
>> }
>>
>>
>>
^ permalink raw reply [flat|nested] 25+ messages in thread* Re: [PATCH 3/3] crypto: Redundant type conversion for AES_KEY pointer
2020-03-25 10:06 ` Chenqun (kuhn)
@ 2020-03-25 10:14 ` Laurent Vivier
-1 siblings, 0 replies; 25+ messages in thread
From: Laurent Vivier @ 2020-03-25 10:14 UTC (permalink / raw)
To: Chenqun (kuhn), qemu-devel@nongnu.org, qemu-trivial@nongnu.org
Cc: Zhanghailiang, Euler Robot, Daniel P. Berrangé
Le 25/03/2020 à 11:06, Chenqun (kuhn) a écrit :
>> -----Original Message-----
>> From: Laurent Vivier [mailto:laurent@vivier.eu]
>> Sent: Wednesday, March 25, 2020 5:45 PM
>> To: Chenqun (kuhn) <kuhn.chenqun@huawei.com>; qemu-devel@nongnu.org;
>> qemu-trivial@nongnu.org
>> Cc: Zhanghailiang <zhang.zhanghailiang@huawei.com>; Euler Robot
>> <euler.robot@huawei.com>; Daniel P. Berrangé <berrange@redhat.com>
>> Subject: Re: [PATCH 3/3] crypto: Redundant type conversion for AES_KEY pointer
>>
>> Le 25/03/2020 à 10:21, Chen Qun a écrit :
>>> Fix: eaec903c5b8
>>>
>>
>> Did you run the coccinelle script scripts/coccinelle/typecast.cocci ?
>>
> Yes, I run it and plan to integrate it into EulerRobot so that similar issues can be discovered sooner.
>
> Thanks.
>>
>>> Reported-by: Euler Robot <euler.robot@huawei.com>
>>> Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
>>> ---
>>> Cc: "Daniel P. Berrangé" <berrange@redhat.com>
>>> ---
>>> crypto/cipher-builtin.c | 6 ++----
>>> 1 file changed, 2 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/crypto/cipher-builtin.c b/crypto/cipher-builtin.c index
>>> bf8413e71a..99d6280a16 100644
>>> --- a/crypto/cipher-builtin.c
>>> +++ b/crypto/cipher-builtin.c
>>> @@ -133,8 +133,7 @@ static void qcrypto_cipher_aes_xts_encrypt(const
>>> void *ctx, {
>>> const QCryptoCipherBuiltinAESContext *aesctx = ctx;
>>>
>>> - qcrypto_cipher_aes_ecb_encrypt((AES_KEY *)&aesctx->enc,
>>> - src, dst, length);
>>> + qcrypto_cipher_aes_ecb_encrypt(&aesctx->enc, src, dst, length);
>>> }
>>>
>>>
>>> @@ -145,8 +144,7 @@ static void qcrypto_cipher_aes_xts_decrypt(const
>>> void *ctx, {
>>> const QCryptoCipherBuiltinAESContext *aesctx = ctx;
>>>
>>> - qcrypto_cipher_aes_ecb_decrypt((AES_KEY *)&aesctx->dec,
>>> - src, dst, length);
>>> + qcrypto_cipher_aes_ecb_decrypt(&aesctx->dec, src, dst, length);
>>> }
>>>
>>>
>>>
>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
^ permalink raw reply [flat|nested] 25+ messages in thread* Re: [PATCH 3/3] crypto: Redundant type conversion for AES_KEY pointer
@ 2020-03-25 10:14 ` Laurent Vivier
0 siblings, 0 replies; 25+ messages in thread
From: Laurent Vivier @ 2020-03-25 10:14 UTC (permalink / raw)
To: Chenqun (kuhn), qemu-devel@nongnu.org, qemu-trivial@nongnu.org
Cc: Daniel P. Berrangé, Zhanghailiang, Euler Robot
Le 25/03/2020 à 11:06, Chenqun (kuhn) a écrit :
>> -----Original Message-----
>> From: Laurent Vivier [mailto:laurent@vivier.eu]
>> Sent: Wednesday, March 25, 2020 5:45 PM
>> To: Chenqun (kuhn) <kuhn.chenqun@huawei.com>; qemu-devel@nongnu.org;
>> qemu-trivial@nongnu.org
>> Cc: Zhanghailiang <zhang.zhanghailiang@huawei.com>; Euler Robot
>> <euler.robot@huawei.com>; Daniel P. Berrangé <berrange@redhat.com>
>> Subject: Re: [PATCH 3/3] crypto: Redundant type conversion for AES_KEY pointer
>>
>> Le 25/03/2020 à 10:21, Chen Qun a écrit :
>>> Fix: eaec903c5b8
>>>
>>
>> Did you run the coccinelle script scripts/coccinelle/typecast.cocci ?
>>
> Yes, I run it and plan to integrate it into EulerRobot so that similar issues can be discovered sooner.
>
> Thanks.
>>
>>> Reported-by: Euler Robot <euler.robot@huawei.com>
>>> Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
>>> ---
>>> Cc: "Daniel P. Berrangé" <berrange@redhat.com>
>>> ---
>>> crypto/cipher-builtin.c | 6 ++----
>>> 1 file changed, 2 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/crypto/cipher-builtin.c b/crypto/cipher-builtin.c index
>>> bf8413e71a..99d6280a16 100644
>>> --- a/crypto/cipher-builtin.c
>>> +++ b/crypto/cipher-builtin.c
>>> @@ -133,8 +133,7 @@ static void qcrypto_cipher_aes_xts_encrypt(const
>>> void *ctx, {
>>> const QCryptoCipherBuiltinAESContext *aesctx = ctx;
>>>
>>> - qcrypto_cipher_aes_ecb_encrypt((AES_KEY *)&aesctx->enc,
>>> - src, dst, length);
>>> + qcrypto_cipher_aes_ecb_encrypt(&aesctx->enc, src, dst, length);
>>> }
>>>
>>>
>>> @@ -145,8 +144,7 @@ static void qcrypto_cipher_aes_xts_decrypt(const
>>> void *ctx, {
>>> const QCryptoCipherBuiltinAESContext *aesctx = ctx;
>>>
>>> - qcrypto_cipher_aes_ecb_decrypt((AES_KEY *)&aesctx->dec,
>>> - src, dst, length);
>>> + qcrypto_cipher_aes_ecb_decrypt(&aesctx->dec, src, dst, length);
>>> }
>>>
>>>
>>>
>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 3/3] crypto: Redundant type conversion for AES_KEY pointer
2020-03-25 9:21 ` Chen Qun
@ 2020-03-25 9:45 ` Daniel P. Berrangé
-1 siblings, 0 replies; 25+ messages in thread
From: Daniel P. Berrangé @ 2020-03-25 9:45 UTC (permalink / raw)
To: Chen Qun
Cc: qemu-devel, qemu-trivial, zhang.zhanghailiang, laurent,
Euler Robot
On Wed, Mar 25, 2020 at 05:21:37PM +0800, Chen Qun wrote:
> Fix: eaec903c5b8
>
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
> ---
> Cc: "Daniel P. Berrangé" <berrange@redhat.com>
> ---
> crypto/cipher-builtin.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
Acked-by: Daniel P. Berrangé <berrange@redhat.com>
>
> diff --git a/crypto/cipher-builtin.c b/crypto/cipher-builtin.c
> index bf8413e71a..99d6280a16 100644
> --- a/crypto/cipher-builtin.c
> +++ b/crypto/cipher-builtin.c
> @@ -133,8 +133,7 @@ static void qcrypto_cipher_aes_xts_encrypt(const void *ctx,
> {
> const QCryptoCipherBuiltinAESContext *aesctx = ctx;
>
> - qcrypto_cipher_aes_ecb_encrypt((AES_KEY *)&aesctx->enc,
> - src, dst, length);
> + qcrypto_cipher_aes_ecb_encrypt(&aesctx->enc, src, dst, length);
> }
>
>
> @@ -145,8 +144,7 @@ static void qcrypto_cipher_aes_xts_decrypt(const void *ctx,
> {
> const QCryptoCipherBuiltinAESContext *aesctx = ctx;
>
> - qcrypto_cipher_aes_ecb_decrypt((AES_KEY *)&aesctx->dec,
> - src, dst, length);
> + qcrypto_cipher_aes_ecb_decrypt(&aesctx->dec, src, dst, length);
> }
>
>
> --
> 2.23.0
>
>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 25+ messages in thread* Re: [PATCH 3/3] crypto: Redundant type conversion for AES_KEY pointer
@ 2020-03-25 9:45 ` Daniel P. Berrangé
0 siblings, 0 replies; 25+ messages in thread
From: Daniel P. Berrangé @ 2020-03-25 9:45 UTC (permalink / raw)
To: Chen Qun
Cc: qemu-trivial, laurent, Euler Robot, qemu-devel,
zhang.zhanghailiang
On Wed, Mar 25, 2020 at 05:21:37PM +0800, Chen Qun wrote:
> Fix: eaec903c5b8
>
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
> ---
> Cc: "Daniel P. Berrangé" <berrange@redhat.com>
> ---
> crypto/cipher-builtin.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
Acked-by: Daniel P. Berrangé <berrange@redhat.com>
>
> diff --git a/crypto/cipher-builtin.c b/crypto/cipher-builtin.c
> index bf8413e71a..99d6280a16 100644
> --- a/crypto/cipher-builtin.c
> +++ b/crypto/cipher-builtin.c
> @@ -133,8 +133,7 @@ static void qcrypto_cipher_aes_xts_encrypt(const void *ctx,
> {
> const QCryptoCipherBuiltinAESContext *aesctx = ctx;
>
> - qcrypto_cipher_aes_ecb_encrypt((AES_KEY *)&aesctx->enc,
> - src, dst, length);
> + qcrypto_cipher_aes_ecb_encrypt(&aesctx->enc, src, dst, length);
> }
>
>
> @@ -145,8 +144,7 @@ static void qcrypto_cipher_aes_xts_decrypt(const void *ctx,
> {
> const QCryptoCipherBuiltinAESContext *aesctx = ctx;
>
> - qcrypto_cipher_aes_ecb_decrypt((AES_KEY *)&aesctx->dec,
> - src, dst, length);
> + qcrypto_cipher_aes_ecb_decrypt(&aesctx->dec, src, dst, length);
> }
>
>
> --
> 2.23.0
>
>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 3/3] crypto: Redundant type conversion for AES_KEY pointer
2020-03-25 9:21 ` Chen Qun
@ 2020-04-03 8:47 ` Laurent Vivier
-1 siblings, 0 replies; 25+ messages in thread
From: Laurent Vivier @ 2020-04-03 8:47 UTC (permalink / raw)
To: Chen Qun, qemu-devel, qemu-trivial
Cc: Euler Robot, Daniel P. Berrangé, zhang.zhanghailiang
Le 25/03/2020 à 10:21, Chen Qun a écrit :
> Fix: eaec903c5b8
>
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
> ---
> Cc: "Daniel P. Berrangé" <berrange@redhat.com>
> ---
> crypto/cipher-builtin.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/crypto/cipher-builtin.c b/crypto/cipher-builtin.c
> index bf8413e71a..99d6280a16 100644
> --- a/crypto/cipher-builtin.c
> +++ b/crypto/cipher-builtin.c
> @@ -133,8 +133,7 @@ static void qcrypto_cipher_aes_xts_encrypt(const void *ctx,
> {
> const QCryptoCipherBuiltinAESContext *aesctx = ctx;
>
> - qcrypto_cipher_aes_ecb_encrypt((AES_KEY *)&aesctx->enc,
> - src, dst, length);
> + qcrypto_cipher_aes_ecb_encrypt(&aesctx->enc, src, dst, length);
> }
>
>
> @@ -145,8 +144,7 @@ static void qcrypto_cipher_aes_xts_decrypt(const void *ctx,
> {
> const QCryptoCipherBuiltinAESContext *aesctx = ctx;
>
> - qcrypto_cipher_aes_ecb_decrypt((AES_KEY *)&aesctx->dec,
> - src, dst, length);
> + qcrypto_cipher_aes_ecb_decrypt(&aesctx->dec, src, dst, length);
> }
>
>
>
Applied to my trivial-patches-for-5.1 branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 25+ messages in thread* Re: [PATCH 3/3] crypto: Redundant type conversion for AES_KEY pointer
@ 2020-04-03 8:47 ` Laurent Vivier
0 siblings, 0 replies; 25+ messages in thread
From: Laurent Vivier @ 2020-04-03 8:47 UTC (permalink / raw)
To: Chen Qun, qemu-devel, qemu-trivial
Cc: Daniel P. Berrangé, zhang.zhanghailiang, Euler Robot
Le 25/03/2020 à 10:21, Chen Qun a écrit :
> Fix: eaec903c5b8
>
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
> ---
> Cc: "Daniel P. Berrangé" <berrange@redhat.com>
> ---
> crypto/cipher-builtin.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/crypto/cipher-builtin.c b/crypto/cipher-builtin.c
> index bf8413e71a..99d6280a16 100644
> --- a/crypto/cipher-builtin.c
> +++ b/crypto/cipher-builtin.c
> @@ -133,8 +133,7 @@ static void qcrypto_cipher_aes_xts_encrypt(const void *ctx,
> {
> const QCryptoCipherBuiltinAESContext *aesctx = ctx;
>
> - qcrypto_cipher_aes_ecb_encrypt((AES_KEY *)&aesctx->enc,
> - src, dst, length);
> + qcrypto_cipher_aes_ecb_encrypt(&aesctx->enc, src, dst, length);
> }
>
>
> @@ -145,8 +144,7 @@ static void qcrypto_cipher_aes_xts_decrypt(const void *ctx,
> {
> const QCryptoCipherBuiltinAESContext *aesctx = ctx;
>
> - qcrypto_cipher_aes_ecb_decrypt((AES_KEY *)&aesctx->dec,
> - src, dst, length);
> + qcrypto_cipher_aes_ecb_decrypt(&aesctx->dec, src, dst, length);
> }
>
>
>
Applied to my trivial-patches-for-5.1 branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 25+ messages in thread* Re: [PATCH 3/3] crypto: Redundant type conversion for AES_KEY pointer
2020-04-03 8:47 ` Laurent Vivier
(?)
@ 2020-05-04 12:36 ` Laurent Vivier
-1 siblings, 0 replies; 25+ messages in thread
From: Laurent Vivier @ 2020-05-04 12:36 UTC (permalink / raw)
To: Chen Qun, qemu-devel, qemu-trivial
Cc: Daniel P. Berrangé, zhang.zhanghailiang, Euler Robot
Le 03/04/2020 à 10:47, Laurent Vivier a écrit :
> Le 25/03/2020 à 10:21, Chen Qun a écrit :
>> Fix: eaec903c5b8
>>
>> Reported-by: Euler Robot <euler.robot@huawei.com>
>> Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
>> ---
>> Cc: "Daniel P. Berrangé" <berrange@redhat.com>
>> ---
>> crypto/cipher-builtin.c | 6 ++----
>> 1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/crypto/cipher-builtin.c b/crypto/cipher-builtin.c
>> index bf8413e71a..99d6280a16 100644
>> --- a/crypto/cipher-builtin.c
>> +++ b/crypto/cipher-builtin.c
>> @@ -133,8 +133,7 @@ static void qcrypto_cipher_aes_xts_encrypt(const void *ctx,
>> {
>> const QCryptoCipherBuiltinAESContext *aesctx = ctx;
>>
>> - qcrypto_cipher_aes_ecb_encrypt((AES_KEY *)&aesctx->enc,
>> - src, dst, length);
>> + qcrypto_cipher_aes_ecb_encrypt(&aesctx->enc, src, dst, length);
>> }
>>
>>
>> @@ -145,8 +144,7 @@ static void qcrypto_cipher_aes_xts_decrypt(const void *ctx,
>> {
>> const QCryptoCipherBuiltinAESContext *aesctx = ctx;
>>
>> - qcrypto_cipher_aes_ecb_decrypt((AES_KEY *)&aesctx->dec,
>> - src, dst, length);
>> + qcrypto_cipher_aes_ecb_decrypt(&aesctx->dec, src, dst, length);
>> }
>>
>>
>>
>
> Applied to my trivial-patches-for-5.1 branch.
Removed from the queue because of build errors:
https://travis-ci.com/github/vivier/qemu/jobs/327261040
In file included from /home/travis/build/vivier/qemu/crypto/cipher.c:157:0:
1251/home/travis/build/vivier/qemu/crypto/cipher-builtin.c: In function
‘qcrypto_cipher_aes_xts_encrypt’:
1252/home/travis/build/vivier/qemu/crypto/cipher-builtin.c:136:36:
error: passing argument 1 of ‘qcrypto_cipher_aes_ecb_encrypt’ discards
‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
1253 qcrypto_cipher_aes_ecb_encrypt(&aesctx->enc, src, dst, length);
1254 ^
1255/home/travis/build/vivier/qemu/crypto/cipher-builtin.c:77:13: note:
expected ‘AES_KEY * {aka struct aes_key_st *}’ but argument is of type
‘const AES_KEY * {aka const struct aes_key_st *}’
1256 static void qcrypto_cipher_aes_ecb_encrypt(AES_KEY *key,
1257 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1258/home/travis/build/vivier/qemu/crypto/cipher-builtin.c: In function
‘qcrypto_cipher_aes_xts_decrypt’:
1259/home/travis/build/vivier/qemu/crypto/cipher-builtin.c:147:36:
error: passing argument 1 of ‘qcrypto_cipher_aes_ecb_decrypt’ discards
‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
1260 qcrypto_cipher_aes_ecb_decrypt(&aesctx->dec, src, dst, length);
1261 ^
1262/home/travis/build/vivier/qemu/crypto/cipher-builtin.c:103:13: note:
expected ‘AES_KEY * {aka struct aes_key_st *}’ but argument is of type
‘const AES_KEY * {aka const struct aes_key_st *}’
1263 static void qcrypto_cipher_aes_ecb_decrypt(AES_KEY *key,
1264 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1265cc1: all warnings being treated as errors
1266/home/travis/build/vivier/qemu/rules.mak:69: recipe for target
'crypto/cipher.o' failed
1267make: *** [crypto/cipher.o] Error 1
1268make: *** Waiting for unfinished jobs....
^ permalink raw reply [flat|nested] 25+ messages in thread