Skip to contentSkip to conversation

crypto: hisilicon/hpre - fix build error without CONFIG_CRYPTO_ECDH

PATCH In review 'Wei Yongjun 2 participants 2 messages Mar 24, 2021 – Mar 25, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: hisilicon/hpre - fix build error without CONFIG_CRYPTO_ECDH

From: Wei Yongjun <[email protected]>

GCC reports build error as following:

x86_64-linux-gnu-ld: drivers/crypto/hisilicon/hpre/hpre_crypto.o: in function `hpre_ecdh_set_secret':
hpre_crypto.c:(.text+0x269c): undefined reference to `crypto_ecdh_decode_key'

Fix it by selecting CRYPTO_ECDH.

---
 drivers/crypto/hisilicon/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/crypto/hisilicon/Kconfig +1 -0
index c45adb15ce8d..bb327d6e365a 100644
@@ -69,6 +69,7 @@ config CRYPTO_DEV_HISI_HPRE
 	select CRYPTO_DEV_HISI_QM
 	select CRYPTO_DH
 	select CRYPTO_RSA
+	select CRYPTO_ECDH
 	help
 	  Support for HiSilicon HPRE(High Performance RSA Engine)
 	  accelerator, which can accelerate RSA and DH algorithms.
#1 lore raw

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

Quoted 30 lines · Wei Yongjun

From: Wei Yongjun <[email protected]>

GCC reports build error as following:

x86_64-linux-gnu-ld: drivers/crypto/hisilicon/hpre/hpre_crypto.o: in function `hpre_ecdh_set_secret':
hpre_crypto.c:(.text+0x269c): undefined reference to `crypto_ecdh_decode_key'

Fix it by selecting CRYPTO_ECDH.

---
 drivers/crypto/hisilicon/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/crypto/hisilicon/Kconfig +1 -0
index c45adb15ce8d..bb327d6e365a 100644
@@ -69,6 +69,7 @@ config CRYPTO_DEV_HISI_HPRE
 	select CRYPTO_DEV_HISI_QM
 	select CRYPTO_DH
 	select CRYPTO_RSA
+	select CRYPTO_ECDH
 	help
 	  Support for HiSilicon HPRE(High Performance RSA Engine)
 	  accelerator, which can accelerate RSA and DH algorithms.

.