qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Chenqun (kuhn)" <kuhn.chenqun@huawei.com>
To: Laurent Vivier <laurent@vivier.eu>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"qemu-trivial@nongnu.org" <qemu-trivial@nongnu.org>
Cc: "Daniel P. Berrangé" <berrange@redhat.com>,
	Zhanghailiang <zhang.zhanghailiang@huawei.com>,
	"Euler Robot" <euler.robot@huawei.com>
Subject: RE: [PATCH 3/3] crypto: Redundant type conversion for AES_KEY pointer
Date: Wed, 25 Mar 2020 10:06:51 +0000	[thread overview]
Message-ID: <7412CDE03601674DA8197E2EBD8937E83B6C24A6@dggemm511-mbx.china.huawei.com> (raw)
In-Reply-To: <f57b72eb-fdf8-b811-64d1-04d95a15f6e6@vivier.eu>

>-----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);
>>  }
>>
>>
>>


  reply	other threads:[~2020-03-25 10:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-25  9:21 [PATCH 0/3] Three trivial patchs Chen Qun
2020-03-25  9:21 ` [PATCH 1/3] gdbstub: prevent uninitialized warning Chen Qun
2020-03-25 12:56   ` Miroslav Rezanina
2020-03-27  9:12   ` Alex Bennée
2020-03-27  9:43     ` Chenqun (kuhn)
2020-03-25  9:21 ` [PATCH 2/3] virtio-crypto: fix 80-char limit violations in virtio_crypto_device_realize() Chen Qun
2020-03-25  9:21 ` [PATCH 3/3] crypto: Redundant type conversion for AES_KEY pointer Chen Qun
2020-03-25  9:45   ` Laurent Vivier
2020-03-25 10:06     ` Chenqun (kuhn) [this message]
2020-03-25 10:14       ` Laurent Vivier
2020-03-25  9:45   ` Daniel P. Berrangé
2020-04-03  8:47   ` Laurent Vivier
2020-05-04 12:36     ` Laurent Vivier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7412CDE03601674DA8197E2EBD8937E83B6C24A6@dggemm511-mbx.china.huawei.com \
    --to=kuhn.chenqun@huawei.com \
    --cc=berrange@redhat.com \
    --cc=euler.robot@huawei.com \
    --cc=laurent@vivier.eu \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=zhang.zhanghailiang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).