[PATCH v2 0/6] crypto: Accelerated AES/GCM stitched implementation

Danny Tsen posted 6 patches 2 years, 9 months ago
There is a newer version of this series
arch/powerpc/crypto/Kconfig            |   11 +
arch/powerpc/crypto/Makefile           |   10 +
arch/powerpc/crypto/aesp8-ppc.pl       | 3846 ++++++++++++++++++++++++
arch/powerpc/crypto/ghashp8-ppc.pl     |  370 +++
arch/powerpc/crypto/p10-aes-gcm-glue.c |  345 +++
arch/powerpc/crypto/p10_aes_gcm.S      | 1519 ++++++++++
arch/powerpc/crypto/ppc-xlate.pl       |  229 ++
7 files changed, 6330 insertions(+)
create mode 100644 arch/powerpc/crypto/aesp8-ppc.pl
create mode 100644 arch/powerpc/crypto/ghashp8-ppc.pl
create mode 100644 arch/powerpc/crypto/p10-aes-gcm-glue.c
create mode 100644 arch/powerpc/crypto/p10_aes_gcm.S
create mode 100644 arch/powerpc/crypto/ppc-xlate.pl
[PATCH v2 0/6] crypto: Accelerated AES/GCM stitched implementation
Posted by Danny Tsen 2 years, 9 months ago
This patch series enable an accelerated AES/GCM stitched implementation for
Power10+ CPU(ppc64le).  This module supports AEAD algorithm.  The stitched
implementation provides 3.5X+ better performance than the baseline.

This patch has been tested with the kernel crypto module tcrypt.ko and has
passed the selftest.  The patch is also tested with
CONFIG_CRYPTO_MANAGER_EXTRA_TESTS enabled

Danny Tsen (6):
  Patch1: Update Kconfig and Makefile.
  Patch2: Glue code for AES/GCM stitched implementation.
  Patch3: An accelerated AES/GCM stitched implementation.
  Patch4: Supporting functions for AES.
  Patch5: Supporting functions for ghash.
  Patch6: A perl script to process PowerPC assembler source.

 arch/powerpc/crypto/Kconfig            |   11 +
 arch/powerpc/crypto/Makefile           |   10 +
 arch/powerpc/crypto/aesp8-ppc.pl       | 3846 ++++++++++++++++++++++++
 arch/powerpc/crypto/ghashp8-ppc.pl     |  370 +++
 arch/powerpc/crypto/p10-aes-gcm-glue.c |  345 +++
 arch/powerpc/crypto/p10_aes_gcm.S      | 1519 ++++++++++
 arch/powerpc/crypto/ppc-xlate.pl       |  229 ++
 7 files changed, 6330 insertions(+)
 create mode 100644 arch/powerpc/crypto/aesp8-ppc.pl
 create mode 100644 arch/powerpc/crypto/ghashp8-ppc.pl
 create mode 100644 arch/powerpc/crypto/p10-aes-gcm-glue.c
 create mode 100644 arch/powerpc/crypto/p10_aes_gcm.S
 create mode 100644 arch/powerpc/crypto/ppc-xlate.pl

-- 
2.31.1
Re: [PATCH v2 0/6] crypto: Accelerated AES/GCM stitched implementation
Posted by Herbert Xu 2 years, 8 months ago
On Sun, Dec 04, 2022 at 07:34:52PM -0500, Danny Tsen wrote:
> This patch series enable an accelerated AES/GCM stitched implementation for
> Power10+ CPU(ppc64le).  This module supports AEAD algorithm.  The stitched
> implementation provides 3.5X+ better performance than the baseline.
> 
> This patch has been tested with the kernel crypto module tcrypt.ko and has
> passed the selftest.  The patch is also tested with
> CONFIG_CRYPTO_MANAGER_EXTRA_TESTS enabled
> 
> Danny Tsen (6):
>   Patch1: Update Kconfig and Makefile.
>   Patch2: Glue code for AES/GCM stitched implementation.
>   Patch3: An accelerated AES/GCM stitched implementation.
>   Patch4: Supporting functions for AES.
>   Patch5: Supporting functions for ghash.
>   Patch6: A perl script to process PowerPC assembler source.
> 
>  arch/powerpc/crypto/Kconfig            |   11 +
>  arch/powerpc/crypto/Makefile           |   10 +
>  arch/powerpc/crypto/aesp8-ppc.pl       | 3846 ++++++++++++++++++++++++
>  arch/powerpc/crypto/ghashp8-ppc.pl     |  370 +++
>  arch/powerpc/crypto/p10-aes-gcm-glue.c |  345 +++
>  arch/powerpc/crypto/p10_aes_gcm.S      | 1519 ++++++++++
>  arch/powerpc/crypto/ppc-xlate.pl       |  229 ++
>  7 files changed, 6330 insertions(+)
>  create mode 100644 arch/powerpc/crypto/aesp8-ppc.pl
>  create mode 100644 arch/powerpc/crypto/ghashp8-ppc.pl
>  create mode 100644 arch/powerpc/crypto/p10-aes-gcm-glue.c
>  create mode 100644 arch/powerpc/crypto/p10_aes_gcm.S
>  create mode 100644 arch/powerpc/crypto/ppc-xlate.pl

I can't build this, it fails with

  LD [M]  arch/powerpc/crypto/p10-aes-gcm-crypto.o
powerpc64le-linux-gnu-ld: arch/powerpc/crypto/p10_aes_gcm.o: ABI version 2 is not compatible with ABI version 1 output
powerpc64le-linux-gnu-ld: failed to merge target specific data of file arch/powerpc/crypto/p10_aes_gcm.o

Cheers,
-- 
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
Re: [PATCH v2 0/6] crypto: Accelerated AES/GCM stitched implementation
Posted by Danny Tsen 2 years, 8 months ago
Hi Herbert,

Uh, I will fix it.  It was set to ABI v2 in assembly file.  Sorry about 
that.


Thanks.

-Danny

On 12/30/22 8:55 AM, Herbert Xu wrote:
> On Sun, Dec 04, 2022 at 07:34:52PM -0500, Danny Tsen wrote:
>> This patch series enable an accelerated AES/GCM stitched implementation for
>> Power10+ CPU(ppc64le).  This module supports AEAD algorithm.  The stitched
>> implementation provides 3.5X+ better performance than the baseline.
>>
>> This patch has been tested with the kernel crypto module tcrypt.ko and has
>> passed the selftest.  The patch is also tested with
>> CONFIG_CRYPTO_MANAGER_EXTRA_TESTS enabled
>>
>> Danny Tsen (6):
>>    Patch1: Update Kconfig and Makefile.
>>    Patch2: Glue code for AES/GCM stitched implementation.
>>    Patch3: An accelerated AES/GCM stitched implementation.
>>    Patch4: Supporting functions for AES.
>>    Patch5: Supporting functions for ghash.
>>    Patch6: A perl script to process PowerPC assembler source.
>>
>>   arch/powerpc/crypto/Kconfig            |   11 +
>>   arch/powerpc/crypto/Makefile           |   10 +
>>   arch/powerpc/crypto/aesp8-ppc.pl       | 3846 ++++++++++++++++++++++++
>>   arch/powerpc/crypto/ghashp8-ppc.pl     |  370 +++
>>   arch/powerpc/crypto/p10-aes-gcm-glue.c |  345 +++
>>   arch/powerpc/crypto/p10_aes_gcm.S      | 1519 ++++++++++
>>   arch/powerpc/crypto/ppc-xlate.pl       |  229 ++
>>   7 files changed, 6330 insertions(+)
>>   create mode 100644 arch/powerpc/crypto/aesp8-ppc.pl
>>   create mode 100644 arch/powerpc/crypto/ghashp8-ppc.pl
>>   create mode 100644 arch/powerpc/crypto/p10-aes-gcm-glue.c
>>   create mode 100644 arch/powerpc/crypto/p10_aes_gcm.S
>>   create mode 100644 arch/powerpc/crypto/ppc-xlate.pl
> I can't build this, it fails with
>
>    LD [M]  arch/powerpc/crypto/p10-aes-gcm-crypto.o
> powerpc64le-linux-gnu-ld: arch/powerpc/crypto/p10_aes_gcm.o: ABI version 2 is not compatible with ABI version 1 output
> powerpc64le-linux-gnu-ld: failed to merge target specific data of file arch/powerpc/crypto/p10_aes_gcm.o
>
> Cheers,
Re: [PATCH v2 0/6] crypto: Accelerated AES/GCM stitched implementation
Posted by Herbert Xu 2 years, 8 months ago
On Sun, Dec 04, 2022 at 07:34:52PM -0500, Danny Tsen wrote:
> This patch series enable an accelerated AES/GCM stitched implementation for
> Power10+ CPU(ppc64le).  This module supports AEAD algorithm.  The stitched
> implementation provides 3.5X+ better performance than the baseline.
> 
> This patch has been tested with the kernel crypto module tcrypt.ko and has
> passed the selftest.  The patch is also tested with
> CONFIG_CRYPTO_MANAGER_EXTRA_TESTS enabled
> 
> Danny Tsen (6):
>   Patch1: Update Kconfig and Makefile.
>   Patch2: Glue code for AES/GCM stitched implementation.
>   Patch3: An accelerated AES/GCM stitched implementation.
>   Patch4: Supporting functions for AES.
>   Patch5: Supporting functions for ghash.
>   Patch6: A perl script to process PowerPC assembler source.
> 
>  arch/powerpc/crypto/Kconfig            |   11 +
>  arch/powerpc/crypto/Makefile           |   10 +
>  arch/powerpc/crypto/aesp8-ppc.pl       | 3846 ++++++++++++++++++++++++
>  arch/powerpc/crypto/ghashp8-ppc.pl     |  370 +++
>  arch/powerpc/crypto/p10-aes-gcm-glue.c |  345 +++
>  arch/powerpc/crypto/p10_aes_gcm.S      | 1519 ++++++++++
>  arch/powerpc/crypto/ppc-xlate.pl       |  229 ++
>  7 files changed, 6330 insertions(+)
>  create mode 100644 arch/powerpc/crypto/aesp8-ppc.pl
>  create mode 100644 arch/powerpc/crypto/ghashp8-ppc.pl
>  create mode 100644 arch/powerpc/crypto/p10-aes-gcm-glue.c
>  create mode 100644 arch/powerpc/crypto/p10_aes_gcm.S
>  create mode 100644 arch/powerpc/crypto/ppc-xlate.pl
> 
> -- 
> 2.31.1

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
Re: [PATCH v2 0/6] crypto: Accelerated AES/GCM stitched implementation
Posted by Danny Tsen 2 years, 8 months ago
Great.  Thanks Herbert.

-Danny

On 1/12/23 10:12 PM, Herbert Xu wrote:
> On Sun, Dec 04, 2022 at 07:34:52PM -0500, Danny Tsen wrote:
>> This patch series enable an accelerated AES/GCM stitched implementation for
>> Power10+ CPU(ppc64le).  This module supports AEAD algorithm.  The stitched
>> implementation provides 3.5X+ better performance than the baseline.
>>
>> This patch has been tested with the kernel crypto module tcrypt.ko and has
>> passed the selftest.  The patch is also tested with
>> CONFIG_CRYPTO_MANAGER_EXTRA_TESTS enabled
>>
>> Danny Tsen (6):
>>    Patch1: Update Kconfig and Makefile.
>>    Patch2: Glue code for AES/GCM stitched implementation.
>>    Patch3: An accelerated AES/GCM stitched implementation.
>>    Patch4: Supporting functions for AES.
>>    Patch5: Supporting functions for ghash.
>>    Patch6: A perl script to process PowerPC assembler source.
>>
>>   arch/powerpc/crypto/Kconfig            |   11 +
>>   arch/powerpc/crypto/Makefile           |   10 +
>>   arch/powerpc/crypto/aesp8-ppc.pl       | 3846 ++++++++++++++++++++++++
>>   arch/powerpc/crypto/ghashp8-ppc.pl     |  370 +++
>>   arch/powerpc/crypto/p10-aes-gcm-glue.c |  345 +++
>>   arch/powerpc/crypto/p10_aes_gcm.S      | 1519 ++++++++++
>>   arch/powerpc/crypto/ppc-xlate.pl       |  229 ++
>>   7 files changed, 6330 insertions(+)
>>   create mode 100644 arch/powerpc/crypto/aesp8-ppc.pl
>>   create mode 100644 arch/powerpc/crypto/ghashp8-ppc.pl
>>   create mode 100644 arch/powerpc/crypto/p10-aes-gcm-glue.c
>>   create mode 100644 arch/powerpc/crypto/p10_aes_gcm.S
>>   create mode 100644 arch/powerpc/crypto/ppc-xlate.pl
>>
>> -- 
>> 2.31.1
> All applied.  Thanks.