mbox series

[0/2] crypto: arm64 - expose PMULL variants as separate algos

Message ID 20190125093627.14288-1-ard.biesheuvel@linaro.org
Headers show
Series crypto: arm64 - expose PMULL variants as separate algos | expand

Message

Ard Biesheuvel Jan. 25, 2019, 9:36 a.m. UTC
Both the GHASH and the CRC-T10DIF SIMD routines are based on 64-bit
polynomial multiplication, but fall back to the slower 8-bit polynomial
instructions if the optional 64-bit PMULL instruction is not implemented.

This means we can only ever test one of the two on a single system,
which is unfortunate. So instead, register both versions on hardware
that supports them, and let the crypto API decide which is the preferred
one based on priorities. That way, both will be tested, but only the
fastest available one will be used.

Ard Biesheuvel (2):
  crypto: arm64/crct10dif - register PMULL variants as separate algos
  crypto: arm64/ghash - register PMULL variants as separate algos

 arch/arm64/crypto/crct10dif-ce-glue.c |  54 +++++++--
 arch/arm64/crypto/ghash-ce-glue.c     | 118 +++++++++++++++-----
 2 files changed, 132 insertions(+), 40 deletions(-)

-- 
2.17.1

Comments

Herbert Xu Feb. 1, 2019, 6:51 a.m. UTC | #1
On Fri, Jan 25, 2019 at 10:36:25AM +0100, Ard Biesheuvel wrote:
> Both the GHASH and the CRC-T10DIF SIMD routines are based on 64-bit

> polynomial multiplication, but fall back to the slower 8-bit polynomial

> instructions if the optional 64-bit PMULL instruction is not implemented.

> 

> This means we can only ever test one of the two on a single system,

> which is unfortunate. So instead, register both versions on hardware

> that supports them, and let the crypto API decide which is the preferred

> one based on priorities. That way, both will be tested, but only the

> fastest available one will be used.

> 

> Ard Biesheuvel (2):

>   crypto: arm64/crct10dif - register PMULL variants as separate algos

>   crypto: arm64/ghash - register PMULL variants as separate algos

> 

>  arch/arm64/crypto/crct10dif-ce-glue.c |  54 +++++++--

>  arch/arm64/crypto/ghash-ce-glue.c     | 118 +++++++++++++++-----

>  2 files changed, 132 insertions(+), 40 deletions(-)


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