qemu-trivial
[Top][All Lists]
Advanced

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

Re: [PATCH 3/3] crypto: Redundant type conversion for AES_KEY pointer


From: Laurent Vivier
Subject: Re: [PATCH 3/3] crypto: Redundant type conversion for AES_KEY pointer
Date: Wed, 25 Mar 2020 11:14:29 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0

Le 25/03/2020 à 11:06, Chenqun (kuhn) a écrit :
>> -----Original Message-----
>> From: Laurent Vivier [mailto:address@hidden]
>> Sent: Wednesday, March 25, 2020 5:45 PM
>> To: Chenqun (kuhn) <address@hidden>; address@hidden;
>> address@hidden
>> Cc: Zhanghailiang <address@hidden>; Euler Robot
>> <address@hidden>; Daniel P. Berrangé <address@hidden>
>> 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 <address@hidden>
>>> Signed-off-by: Chen Qun <address@hidden>
>>> ---
>>> Cc: "Daniel P. Berrangé" <address@hidden>
>>> ---
>>>  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 <address@hidden>



reply via email to

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