Linux-Crypto Archive on lore.kernel.org
 help / color / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: linux-crypto@vger.kernel.org, ebiggers@kernel.org
Subject: Re: [PATCH v2 0/3] crypto: aegis128 followup
Date: Thu, 15 Aug 2019 22:08:17 +1000
Message-ID: <20190815120817.GJ29355@gondor.apana.org.au> (raw)
In-Reply-To: <20190811225912.19412-1-ard.biesheuvel@linaro.org>

On Mon, Aug 12, 2019 at 01:59:09AM +0300, Ard Biesheuvel wrote:
> This series resubmits the aegis128 SIMD patches that were reverted due to
> the fact that the compiler's optimization behavior wrt variables with static
> linkage does not turn out to guarantee that function calls that are
> conditional on the value of such a variable are optimized away if the value
> is a compile time constant and the condition evaluates to false at compile
> time as well.
> 
> Changes since v1:
> - minor tweaks to #2 to drop a memset() invocation from the decrypt path,
>   and some temp vars in various places
> - update the NEON code in #3 so it builds with Clang as well as GCC (and
>   drop the RFC annotation)
> 
> Patch #1 reintroduces the changes to the generic code to permit SIMD
> routines to be attached to the aegis128 driver. This time, the conditional
> check is pulled into a helper function which collapses to 'return false'
> if the CONFIG_CRYPTO_AEGIS128_SIMD Kconfig symbol is not set. (This has
> been confirmed by one of the reporters of the original issue as sufficient
> to address the problem).
> 
> Patch #2 is mostly unchanged wrt the version that got reverted, only some
> inline annotations were added back.
> 
> Patch #3 is new and implements the SIMD routines for arm64 without using
> the optional AES instructions, but using plain SIMD arithmetic instead.
> This is much slower than AES instructions, but still substantially more
> efficient than table based scalar AES on systems where memory accesses are
> expensive, such as the Raspberry Pi 3 (which does not implement the AES
> instructions)
> 
> Ard Biesheuvel (3):
>   crypto: aegis128 - add support for SIMD acceleration
>   crypto: aegis128 - provide a SIMD implementation based on NEON
>     intrinsics
>   crypto: arm64/aegis128 - implement plain NEON version
> 
>  crypto/Kconfig                         |   5 +
>  crypto/Makefile                        |  20 ++
>  crypto/{aegis128.c => aegis128-core.c} |  52 ++++-
>  crypto/aegis128-neon-inner.c           | 212 ++++++++++++++++++++
>  crypto/aegis128-neon.c                 |  49 +++++
>  5 files changed, 334 insertions(+), 4 deletions(-)
>  rename crypto/{aegis128.c => aegis128-core.c} (89%)
>  create mode 100644 crypto/aegis128-neon-inner.c
>  create mode 100644 crypto/aegis128-neon.c

All applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

      parent reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-11 22:59 Ard Biesheuvel
2019-08-11 22:59 ` [PATCH v2 1/3] crypto: aegis128 - add support for SIMD acceleration Ard Biesheuvel
2019-08-11 22:59 ` [PATCH v2 2/3] crypto: aegis128 - provide a SIMD implementation based on NEON intrinsics Ard Biesheuvel
2019-08-11 22:59 ` [PATCH v2 3/3] crypto: arm64/aegis128 - implement plain NEON version Ard Biesheuvel
2019-08-12 16:50   ` Nick Desaulniers
2019-08-12 17:22     ` Ard Biesheuvel
2019-08-12 17:31       ` Nick Desaulniers
2019-08-12 18:14         ` Ard Biesheuvel
2019-08-15 12:08 ` Herbert Xu [this message]

Reply instructions:

You may reply publically 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=20190815120817.GJ29355@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=ard.biesheuvel@linaro.org \
    --cc=ebiggers@kernel.org \
    --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

Linux-Crypto Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-crypto/0 linux-crypto/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-crypto linux-crypto/ https://lore.kernel.org/linux-crypto \
		linux-crypto@vger.kernel.org
	public-inbox-index linux-crypto

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-crypto


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git