Message ID | 20230220204224.4907-2-dtsen@linux.ibm.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Herbert Xu |
Headers | show |
Series | crypto: Accelerated AES/GCM stitched implementation | expand |
On Mon, Feb 20, 2023 at 03:42:19PM -0500, Danny Tsen wrote: > Defined CRYPTO_AES_GCM_P10 in Kconfig to support AES/GCM > stitched implementation for Power10 or later CPU. > > Added a new module driver aes-gcm-p10-crypto. > > Signed-off-by: Danny Tsen <dtsen@linux.ibm.com> > --- > arch/powerpc/crypto/Kconfig | 17 +++++++++++++++++ > arch/powerpc/crypto/Makefile | 13 +++++++++++++ > 2 files changed, 30 insertions(+) Stephen mentioned this before, your patches must compile one-by-one. This patch doesn't build by itself so you should fix it. Thanks,
Hi Herbert, I am not sure why my patch has to build one-by-one? I compiled with one make. Here is the output. CALL scripts/checksyscalls.sh DESCEND objtool CC [M] arch/powerpc/crypto/aes-gcm-p10-glue.o AS [M] arch/powerpc/crypto/aes-gcm-p10.o AS [M] arch/powerpc/crypto/ghashp8-ppc.o AS [M] arch/powerpc/crypto/aesp8-ppc.o LD [M] arch/powerpc/crypto/aes-gcm-p10-crypto.o CHK kernel/kheaders_data.tar.xz MODPOST Module.symvers CC [M] arch/powerpc/crypto/aes-gcm-p10-crypto.mod.o LD [M] arch/powerpc/crypto/aes-gcm-p10-crypto.ko Can Stephen explain why he is compiling one-by-one? Any output I can see. Thanks. -Danny On 2/20/23 8:45 PM, Herbert Xu wrote: > On Mon, Feb 20, 2023 at 03:42:19PM -0500, Danny Tsen wrote: >> Defined CRYPTO_AES_GCM_P10 in Kconfig to support AES/GCM >> stitched implementation for Power10 or later CPU. >> >> Added a new module driver aes-gcm-p10-crypto. >> >> Signed-off-by: Danny Tsen <dtsen@linux.ibm.com> >> --- >> arch/powerpc/crypto/Kconfig | 17 +++++++++++++++++ >> arch/powerpc/crypto/Makefile | 13 +++++++++++++ >> 2 files changed, 30 insertions(+) > Stephen mentioned this before, your patches must compile one-by-one. > This patch doesn't build by itself so you should fix it. > > Thanks,
On Mon, Feb 20, 2023 at 08:57:24PM -0600, Danny Tsen wrote: > Hi Herbert, > > I am not sure why my patch has to build one-by-one? I compiled with one > make. Here is the output. > > CALL scripts/checksyscalls.sh > DESCEND objtool > CC [M] arch/powerpc/crypto/aes-gcm-p10-glue.o > AS [M] arch/powerpc/crypto/aes-gcm-p10.o > AS [M] arch/powerpc/crypto/ghashp8-ppc.o > AS [M] arch/powerpc/crypto/aesp8-ppc.o > LD [M] arch/powerpc/crypto/aes-gcm-p10-crypto.o > CHK kernel/kheaders_data.tar.xz > MODPOST Module.symvers > CC [M] arch/powerpc/crypto/aes-gcm-p10-crypto.mod.o > LD [M] arch/powerpc/crypto/aes-gcm-p10-crypto.ko > > Can Stephen explain why he is compiling one-by-one? Any output I can see. Your patch-series should be bisectable. That is, if I apply only the first patch, it should still build in all configurations. Your first patch only adds the Kconfig option and Makefile rules without any actual code. So it will fail to build because the code is simply not there. Normally we put the Kconfig/Makefile update at the end of the series to prevent this. Cheers,
Hi Herbert, Thanks for the explanation. Will re-post the patch series. Thanks. -Danny On 2/20/23 8:59 PM, Herbert Xu wrote: > On Mon, Feb 20, 2023 at 08:57:24PM -0600, Danny Tsen wrote: >> Hi Herbert, >> >> I am not sure why my patch has to build one-by-one? I compiled with one >> make. Here is the output. >> >> CALL scripts/checksyscalls.sh >> DESCEND objtool >> CC [M] arch/powerpc/crypto/aes-gcm-p10-glue.o >> AS [M] arch/powerpc/crypto/aes-gcm-p10.o >> AS [M] arch/powerpc/crypto/ghashp8-ppc.o >> AS [M] arch/powerpc/crypto/aesp8-ppc.o >> LD [M] arch/powerpc/crypto/aes-gcm-p10-crypto.o >> CHK kernel/kheaders_data.tar.xz >> MODPOST Module.symvers >> CC [M] arch/powerpc/crypto/aes-gcm-p10-crypto.mod.o >> LD [M] arch/powerpc/crypto/aes-gcm-p10-crypto.ko >> >> Can Stephen explain why he is compiling one-by-one? Any output I can see. > Your patch-series should be bisectable. That is, if I apply > only the first patch, it should still build in all configurations. > > Your first patch only adds the Kconfig option and Makefile rules > without any actual code. So it will fail to build because the > code is simply not there. > > Normally we put the Kconfig/Makefile update at the end of the > series to prevent this. > > Cheers,
diff --git a/arch/powerpc/crypto/Kconfig b/arch/powerpc/crypto/Kconfig index c1b964447401..1f8f02b494e1 100644 --- a/arch/powerpc/crypto/Kconfig +++ b/arch/powerpc/crypto/Kconfig @@ -94,4 +94,21 @@ config CRYPTO_AES_PPC_SPE architecture specific assembler implementations that work on 1KB tables or 256 bytes S-boxes. +config CRYPTO_AES_GCM_P10 + tristate "Stitched AES/GCM acceleration support on P10 or later CPU (PPC)" + depends on PPC64 && POWER10_CPU && CPU_LITTLE_ENDIAN + select CRYPTO_LIB_AES + select CRYPTO_ALGAPI + select CRYPTO_AEAD + default m + help + AEAD cipher: AES cipher algorithms (FIPS-197) + GCM (Galois/Counter Mode) authenticated encryption mode (NIST SP800-38D) + Architecture: powerpc64 using: + - little-endian + - Power10 or later features + + Support for cryptographic acceleration instructions on Power10 or + later CPU. This module supports stitched acceleration for AES/GCM. + endmenu diff --git a/arch/powerpc/crypto/Makefile b/arch/powerpc/crypto/Makefile index 4808d97fede5..05c7486f42c5 100644 --- a/arch/powerpc/crypto/Makefile +++ b/arch/powerpc/crypto/Makefile @@ -13,6 +13,7 @@ obj-$(CONFIG_CRYPTO_SHA256_PPC_SPE) += sha256-ppc-spe.o obj-$(CONFIG_CRYPTO_CRC32C_VPMSUM) += crc32c-vpmsum.o obj-$(CONFIG_CRYPTO_CRCT10DIF_VPMSUM) += crct10dif-vpmsum.o obj-$(CONFIG_CRYPTO_VPMSUM_TESTER) += crc-vpmsum_test.o +obj-$(CONFIG_CRYPTO_AES_GCM_P10) += aes-gcm-p10-crypto.o aes-ppc-spe-y := aes-spe-core.o aes-spe-keys.o aes-tab-4k.o aes-spe-modes.o aes-spe-glue.o md5-ppc-y := md5-asm.o md5-glue.o @@ -21,3 +22,15 @@ sha1-ppc-spe-y := sha1-spe-asm.o sha1-spe-glue.o sha256-ppc-spe-y := sha256-spe-asm.o sha256-spe-glue.o crc32c-vpmsum-y := crc32c-vpmsum_asm.o crc32c-vpmsum_glue.o crct10dif-vpmsum-y := crct10dif-vpmsum_asm.o crct10dif-vpmsum_glue.o +aes-gcm-p10-crypto-y := aes-gcm-p10-glue.o aes-gcm-p10.o ghashp8-ppc.o aesp8-ppc.o + +quiet_cmd_perl = PERL $@ + cmd_perl = $(PERL) $< $(if $(CONFIG_CPU_LITTLE_ENDIAN), linux-ppc64le, linux-ppc64) > $@ + +targets += aesp8-ppc.S ghashp8-ppc.S + +$(obj)/aesp8-ppc.S $(obj)/ghashp8-ppc.S: $(obj)/%.S: $(src)/%.pl FORCE + $(call if_changed,perl) + +OBJECT_FILES_NON_STANDARD_aesp8-ppc.o := y +OBJECT_FILES_NON_STANDARD_ghashp8-ppc.o := y
Defined CRYPTO_AES_GCM_P10 in Kconfig to support AES/GCM stitched implementation for Power10 or later CPU. Added a new module driver aes-gcm-p10-crypto. Signed-off-by: Danny Tsen <dtsen@linux.ibm.com> --- arch/powerpc/crypto/Kconfig | 17 +++++++++++++++++ arch/powerpc/crypto/Makefile | 13 +++++++++++++ 2 files changed, 30 insertions(+)