lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 23 Jul 2021 11:58:26 +0200
From:   Nicolas Ferre <nicolas.ferre@...rochip.com>
To:     Salah Triki <salah.triki@...il.com>, <herbert@...dor.apana.org.au>,
        <davem@...emloft.net>, <alexandre.belloni@...tlin.com>,
        <ludovic.desroches@...rochip.com>, <gregkh@...uxfoundation.org>,
        "Tudor Ambarus" <Tudor.Ambarus@...rochip.com>
CC:     <linux-crypto@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [RESEND] gpu: ipu-v3: use swap()

Wrong $subject then...

On 22/07/2021 at 18:59, Salah Triki wrote:
> Use swap() instead of implementing it in order to make code more clean.
> 
> Signed-off-by: Salah Triki <salah.triki@...il.com>
> ---
>   drivers/crypto/atmel-aes.c | 8 ++------
>   1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c
> index b1d286004295..60041022c4f5 100644
> --- a/drivers/crypto/atmel-aes.c
> +++ b/drivers/crypto/atmel-aes.c
> @@ -1819,12 +1819,8 @@ static int atmel_aes_xts_process_data(struct atmel_aes_dev *dd)
>           * the order of the ciphered tweak bytes need to be reversed before
>           * writing them into the ODATARx registers.
>           */
> -       for (i = 0; i < AES_BLOCK_SIZE/2; ++i) {
> -               u8 tmp = tweak_bytes[AES_BLOCK_SIZE - 1 - i];
> -
> -               tweak_bytes[AES_BLOCK_SIZE - 1 - i] = tweak_bytes[i];
> -               tweak_bytes[i] = tmp;
> -       }
> +       for (i = 0; i < AES_BLOCK_SIZE/2; ++i)
> +               swap(tweak_bytes[i], tweak_bytes[AES_BLOCK_SIZE - 1 - i]);
> 
>          /* Process the data. */
>          atmel_aes_write_ctrl(dd, use_dma, NULL);
> --
> 2.25.1
> 


-- 
Nicolas Ferre

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ