linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nathan Chancellor <natechancellor@gmail.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: linux-crypto@vger.kernel.org, herbert@gondor.apana.org.au
Subject: Re: [PATCH] crypto: arm64/aegis128 - use explicit vector load for permute vectors
Date: Mon, 19 Aug 2019 08:44:57 -0700	[thread overview]
Message-ID: <20190819154457.GA108768@archlinux-threadripper> (raw)
In-Reply-To: <20190819141500.1070-1-ard.biesheuvel@linaro.org>

On Mon, Aug 19, 2019 at 05:15:00PM +0300, Ard Biesheuvel wrote:
> When building the new aegis128 NEON code in big endian mode, Clang
> complains about the const uint8x16_t permute vectors in the following
> way:
> 
>   crypto/aegis128-neon-inner.c:58:40: warning: vector initializers are not
>       compatible with NEON intrinsics in big endian mode
>       [-Wnonportable-vector-initialization]
>                 static const uint8x16_t shift_rows = {
>                                                      ^
>   crypto/aegis128-neon-inner.c:58:40: note: consider using vld1q_u8() to
>       initialize a vector from memory, or vcombine_u8(vcreate_u8(), vcreate_u8())
>       to initialize from integer constants
> 
> Since the same issue applies to the uint8x16x4_t loads of the AES Sbox,
> update those references as well. However, since GCC does not implement
> the vld1q_u8_x4() intrinsic, switch from IS_ENABLED() to a preprocessor
> conditional to conditionally include this code.
> 
> Reported-by: Nathan Chancellor <natechancellor@gmail.com>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

I am not familiar enough with vectors and such to confidently give a
review but I can say this fixes the warning and doesn't introduce any
new ones. Thank you for the fix!

Tested-by: Nathan Chancellor <natechancellor@gmail.com>

  reply	other threads:[~2019-08-19 15:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-19 14:15 [PATCH] crypto: arm64/aegis128 - use explicit vector load for permute vectors Ard Biesheuvel
2019-08-19 15:44 ` Nathan Chancellor [this message]
2019-08-30  8:14 ` Herbert Xu

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=20190819154457.GA108768@archlinux-threadripper \
    --to=natechancellor@gmail.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    /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).