linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] drivers: crypto: CRYPTO_DEV_HISI_HPRE select CRYPTO_ECC and CRYPTO_ECDH
@ 2021-03-26  7:16 Zhang Jianhua
  2021-03-26  7:19 ` yumeng
  0 siblings, 1 reply; 2+ messages in thread
From: Zhang Jianhua @ 2021-03-26  7:16 UTC (permalink / raw)
  To: herbert, davem, xuzaibo, qianweili, yuehaibing, yumeng18,
	tanshukun1, zhangjianhua18, sfr
  Cc: linux-crypto, linux-kernel, johnny.chenyi

If CRYPTO_DEV_HISI_HPRE=y, the following errors will be seen while
building hpre_crypto.c

drivers/crypto/hisilicon/hpre/hpre_crypto.o: In function
`hpre_curve25519_compute_value':
hpre_crypto.c:(.text+0x151b): undefined reference to
`ecc_get_curve25519'
drivers/crypto/hisilicon/hpre/hpre_crypto.o: In function
`hpre_curve25519_set_secret':
hpre_crypto.c:(.text+0x2714): undefined reference to
`ecc_get_curve25519'
drivers/crypto/hisilicon/hpre/hpre_crypto.o: In function
`hpre_ecdh_set_secret':
hpre_crypto.c:(.text+0x27ed): undefined reference to
`crypto_ecdh_decode_key'
hpre_crypto.c:(.text+0x2954): undefined reference to `ecc_get_curve'

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhang Jianhua <zhangjianhua18@huawei.com>
---
 drivers/crypto/hisilicon/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/crypto/hisilicon/Kconfig b/drivers/crypto/hisilicon/Kconfig
index c45adb15ce8d..d87c89af2a7f 100644
--- a/drivers/crypto/hisilicon/Kconfig
+++ b/drivers/crypto/hisilicon/Kconfig
@@ -69,6 +69,8 @@ config CRYPTO_DEV_HISI_HPRE
 	select CRYPTO_DEV_HISI_QM
 	select CRYPTO_DH
 	select CRYPTO_RSA
+	select CRYPTO_ECC
+	select CRYPTO_ECDH
 	help
 	  Support for HiSilicon HPRE(High Performance RSA Engine)
 	  accelerator, which can accelerate RSA and DH algorithms.
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] drivers: crypto: CRYPTO_DEV_HISI_HPRE select CRYPTO_ECC and CRYPTO_ECDH
  2021-03-26  7:16 [PATCH -next] drivers: crypto: CRYPTO_DEV_HISI_HPRE select CRYPTO_ECC and CRYPTO_ECDH Zhang Jianhua
@ 2021-03-26  7:19 ` yumeng
  0 siblings, 0 replies; 2+ messages in thread
From: yumeng @ 2021-03-26  7:19 UTC (permalink / raw)
  To: Zhang Jianhua, herbert, davem, xuzaibo, qianweili, yuehaibing,
	tanshukun1, sfr
  Cc: linux-crypto, linux-kernel, johnny.chenyi

Thanks, there is a similar patch to yours that was sent in advance:
https://www.spinics.net/lists/linux-crypto/msg54238.html

在 2021/3/26 15:16, Zhang Jianhua 写道:
> If CRYPTO_DEV_HISI_HPRE=y, the following errors will be seen while
> building hpre_crypto.c
> 
> drivers/crypto/hisilicon/hpre/hpre_crypto.o: In function
> `hpre_curve25519_compute_value':
> hpre_crypto.c:(.text+0x151b): undefined reference to
> `ecc_get_curve25519'
> drivers/crypto/hisilicon/hpre/hpre_crypto.o: In function
> `hpre_curve25519_set_secret':
> hpre_crypto.c:(.text+0x2714): undefined reference to
> `ecc_get_curve25519'
> drivers/crypto/hisilicon/hpre/hpre_crypto.o: In function
> `hpre_ecdh_set_secret':
> hpre_crypto.c:(.text+0x27ed): undefined reference to
> `crypto_ecdh_decode_key'
> hpre_crypto.c:(.text+0x2954): undefined reference to `ecc_get_curve'
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zhang Jianhua <zhangjianhua18@huawei.com>
> ---
>   drivers/crypto/hisilicon/Kconfig | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/crypto/hisilicon/Kconfig b/drivers/crypto/hisilicon/Kconfig
> index c45adb15ce8d..d87c89af2a7f 100644
> --- a/drivers/crypto/hisilicon/Kconfig
> +++ b/drivers/crypto/hisilicon/Kconfig
> @@ -69,6 +69,8 @@ config CRYPTO_DEV_HISI_HPRE
>   	select CRYPTO_DEV_HISI_QM
>   	select CRYPTO_DH
>   	select CRYPTO_RSA
> +	select CRYPTO_ECC
> +	select CRYPTO_ECDH
>   	help
>   	  Support for HiSilicon HPRE(High Performance RSA Engine)
>   	  accelerator, which can accelerate RSA and DH algorithms.
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-26  7:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-26  7:16 [PATCH -next] drivers: crypto: CRYPTO_DEV_HISI_HPRE select CRYPTO_ECC and CRYPTO_ECDH Zhang Jianhua
2021-03-26  7:19 ` yumeng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).