public inbox for linux-crypto@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] crypto: curve25519 - Fix build error when CRYPTO_MANAGER_DISABLE_TESTS!=y && CRYPTO=m
@ 2022-05-28  1:33 Zheng Bin
  2022-05-28  6:19 ` Jason A. Donenfeld
  0 siblings, 1 reply; 5+ messages in thread
From: Zheng Bin @ 2022-05-28  1:33 UTC (permalink / raw)
  To: herbert, davem, Jason, linux-crypto, linux-kernel; +Cc: zhengbin13, gaochao49

If CRYPTO_MANAGER_DISABLE_TESTS!=y, CRYPTO=m, bulding fails:

lib/crypto/curve25519-selftest.o: In function `curve25519_selftest':
curve25519-selftest.c:(.init.text+0x60): undefined reference to `__crypto_memneq'
curve25519-selftest.c:(.init.text+0xec): undefined reference to `__crypto_memneq'
curve25519-selftest.c:(.init.text+0x114): undefined reference to `__crypto_memneq'
curve25519-selftest.c:(.init.text+0x154): undefined reference to `__crypto_memneq'

Add depends for CRYPTO_LIB_CURVE25519 to fix this.

Fixes: aa127963f1ca ("crypto: lib/curve25519 - re-add selftests")
Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
---
 lib/crypto/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/crypto/Kconfig b/lib/crypto/Kconfig
index 9856e291f414..f233bed9f214 100644
--- a/lib/crypto/Kconfig
+++ b/lib/crypto/Kconfig
@@ -70,6 +70,7 @@ config CRYPTO_LIB_CURVE25519_GENERIC
 config CRYPTO_LIB_CURVE25519
 	tristate "Curve25519 scalar multiplication library"
 	depends on CRYPTO_ARCH_HAVE_LIB_CURVE25519 || !CRYPTO_ARCH_HAVE_LIB_CURVE25519
+	depends on (CRYPTO && CRYPTO_MANAGER_DISABLE_TESTS!=y) || (CRYPTO_MANAGER_DISABLE_TESTS=y)
 	select CRYPTO_LIB_CURVE25519_GENERIC if CRYPTO_ARCH_HAVE_LIB_CURVE25519=n
 	help
 	  Enable the Curve25519 library interface. This interface may be
--
2.31.1


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

end of thread, other threads:[~2022-06-10  9:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-28  1:33 [PATCH -next] crypto: curve25519 - Fix build error when CRYPTO_MANAGER_DISABLE_TESTS!=y && CRYPTO=m Zheng Bin
2022-05-28  6:19 ` Jason A. Donenfeld
2022-05-28 10:24   ` [PATCH crypto] crypto: memneq - move into lib/ Jason A. Donenfeld
2022-05-30 17:36     ` Eric Biggers
2022-06-10  9:16     ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox