Message ID | 1661334621-44413-1-git-send-email-guanjun@linux.alibaba.com |
---|---|
Headers | show |
Series | Drivers for Alibaba YCC (Yitian Cryptography Complex) cryptographic accelerator | expand |
Hi Elliott, Thanks for your comments. > 2022年8月24日 下午10:57,Elliott, Robert (Servers) <elliott@hpe.com> 写道: > > > >> -----Original Message----- >> From: 'Guanjun' <guanjun@linux.alibaba.com> >> Sent: Wednesday, August 24, 2022 4:50 AM >> To: herbert@gondor.apana.org.au >> Subject: [PATCH v1 1/9] crypto/ycc: Add YCC (Yitian Cryptography Complex) >> accelerator driver >> > ... >> diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig >> index 3e6aa31..d739354 100644 >> --- a/drivers/crypto/Kconfig >> +++ b/drivers/crypto/Kconfig >> @@ -799,6 +799,8 @@ source "drivers/crypto/hisilicon/Kconfig" >> >> source "drivers/crypto/amlogic/Kconfig" >> >> +source "drivers/crypto/ycc/Kconfig" >> + >> config CRYPTO_DEV_SA2UL >> tristate "Support for TI security accelerator" >> depends on ARCH_K3 || COMPILE_TEST > > This menu isn't perfectly sorted, but since the new entry is for > "Alibaba YCC", putting this at the top of the file would be > better positioned for eventual sorting. > > Naming the directory alibaba/ rather than ycc/ might be more > welcoming for future drivers, too. Alibaba and T-Head (a semiconductor chip business entity of Alibaba Group) combined efforts on the platform Yitian, so our cryptographic accelerator which is integrated in Yitian was named YCC, the acronym for Yitian Cryptography Complex. We prefer ycc for our crypto related drivers. Anyway, thanks for your suggestions. I will adjust in alphabetical order in next version. Best regards, Guanjun > > ... >> diff --git a/drivers/crypto/ycc/Kconfig b/drivers/crypto/ycc/Kconfig >> +++ b/drivers/crypto/ycc/Kconfig >> @@ -0,0 +1,8 @@ >> +config CRYPTO_DEV_YCC >> + tristate "Support for Alibaba YCC cryptographic accelerator" >> + depends on CRYPTO && CRYPTO_HW && PCI >> + default n >> + help >> + Enables the driver for the on-chip cryptographic accelerator of >> + Alibaba Yitian SoCs which is based on ARMv9 architecture. >> + If unsure say N. >
Hi Elliott, > 2022年8月25日 上午12:24,Elliott, Robert (Servers) <elliott@hpe.com> 写道: > > > >> -----Original Message----- >> From: 'Guanjun' <guanjun@linux.alibaba.com> >> Sent: Wednesday, August 24, 2022 4:50 AM >> Subject: [PATCH v1 5/9] crypto/ycc: Add skcipher algorithm support >> > ... > >> +static struct skcipher_alg ycc_skciphers[] = { >> + { >> + .base = { >> + .cra_name = "cbc(aes)", >> + .cra_driver_name = "ycc_cbc(aes)", > > In comparison, the aead driver puts the hardware driver name as a suffix, > not a prefix, and uses dashes rather than underscores and parenthesis: >> + .cra_name = "gcm(aes)", >> + .cra_driver_name = "gcm-aes-ycc", > > and the pk driver uses a prefix with a dash: >> + .cra_name = "rsa", >> + .cra_driver_name = "ycc-rsa", > > Although the existing drivers are wildly inconsistent, it would be nice > if this driver was at least consistent with itself. Suffixes with dashes > seem to be the most popular, so consider these formats: > cbc-aes-ycc > gcm-aes-ycc > rsa-ycc > Thanks for your comments. I will change these names as your suggestion in next version. Best regards, Guanjun
From: Guanjun <guanjun@linux.alibaba.com> Hi, Herbert This patch series aims to add drivers for Alibaba YCC (Yitian Cryptography Complex) cryptographic accelerator. Enables the on-chip cryptographic accelerator of Alibaba Yitian SoCs which based on ARMv9 architecture. It includes PCIe enabling, skcipher, aead, rsa, sm2 support. Please help to review. Thanks, Guanjun. Guanjun (3): crypto/ycc: Add skcipher algorithm support crypto/ycc: Add aead algorithm support crypto/ycc: Add rsa algorithm support Xuchun Shang (1): crypto/ycc: Add sm2 algorithm support Zelin Deng (5): crypto/ycc: Add YCC (Yitian Cryptography Complex) accelerator driver crypto/ycc: Add ycc ring configuration crypto/ycc: Add irq support for ycc kernel rings crypto/ycc: Add device error handling support for ycc hw errors MAINTAINERS: Add Yitian Cryptography Complex (YCC) driver maintainer entry MAINTAINERS | 8 + drivers/crypto/Kconfig | 2 + drivers/crypto/Makefile | 1 + drivers/crypto/ycc/Kconfig | 18 + drivers/crypto/ycc/Makefile | 4 + drivers/crypto/ycc/sm2signature_asn1.c | 38 ++ drivers/crypto/ycc/sm2signature_asn1.h | 13 + drivers/crypto/ycc/ycc_aead.c | 646 ++++++++++++++++++++++ drivers/crypto/ycc/ycc_algs.h | 176 ++++++ drivers/crypto/ycc/ycc_cdev.c | 86 +++ drivers/crypto/ycc/ycc_cdev.h | 18 + drivers/crypto/ycc/ycc_dev.h | 157 ++++++ drivers/crypto/ycc/ycc_drv.c | 574 ++++++++++++++++++++ drivers/crypto/ycc/ycc_isr.c | 279 ++++++++++ drivers/crypto/ycc/ycc_isr.h | 12 + drivers/crypto/ycc/ycc_pke.c | 944 +++++++++++++++++++++++++++++++++ drivers/crypto/ycc/ycc_ring.c | 652 +++++++++++++++++++++++ drivers/crypto/ycc/ycc_ring.h | 168 ++++++ drivers/crypto/ycc/ycc_ske.c | 925 ++++++++++++++++++++++++++++++++ 19 files changed, 4721 insertions(+) create mode 100644 drivers/crypto/ycc/Kconfig create mode 100644 drivers/crypto/ycc/Makefile create mode 100644 drivers/crypto/ycc/sm2signature_asn1.c create mode 100644 drivers/crypto/ycc/sm2signature_asn1.h create mode 100644 drivers/crypto/ycc/ycc_aead.c create mode 100644 drivers/crypto/ycc/ycc_algs.h create mode 100644 drivers/crypto/ycc/ycc_cdev.c create mode 100644 drivers/crypto/ycc/ycc_cdev.h create mode 100644 drivers/crypto/ycc/ycc_dev.h create mode 100644 drivers/crypto/ycc/ycc_drv.c create mode 100644 drivers/crypto/ycc/ycc_isr.c create mode 100644 drivers/crypto/ycc/ycc_isr.h create mode 100644 drivers/crypto/ycc/ycc_pke.c create mode 100644 drivers/crypto/ycc/ycc_ring.c create mode 100644 drivers/crypto/ycc/ycc_ring.h create mode 100644 drivers/crypto/ycc/ycc_ske.c