Subject: Re: arc-elf32-ld: net/xfrm/xfrm_algo.o:(.rodata+0x24): undefined reference to `crypto_has_aead'

From: Sabrina Dubroca <[email-masked]>
Date: Fri, 29 Sep 2023 15:20:05 +0200

2023-09-29, 12:41:51 +0530, Naresh Kamboju wrote:
> The arc defconfig builds failed on Linux next from Sept 22.
> 
> Reported-by: Linux Kernel Functional Testing <[email-masked]>
> 
> Build log:
> -----------
> arc-elf32-ld: net/xfrm/xfrm_algo.o:(.rodata+0x24): undefined reference
> to `crypto_has_aead'
> arc-elf32-ld: net/xfrm/xfrm_algo.o:(.rodata+0x24): undefined reference
> to `crypto_has_aead'
> make[3]: *** [/builds/linux/scripts/Makefile.vmlinux:36: vmlinux] Error 1
> make[3]: Target '__default' not remade because of errors.

Use of crypto_has_aead was added to net/xfrm/xfrm_algo.c in commit
a1383e2ab102 ("ipsec: Stop using crypto_has_alg").

I guess the problem is that CONFIG_XFRM_ALGO doesn't select
CONFIG_CRYPTO_AEAD (or _AEAD2?), just CRYPTO_HASH and CRYPTO_SKCIPHER.

Herbert, does that seem reasonable?

-------- 8< --------
diff --git a/net/xfrm/Kconfig b/net/xfrm/Kconfig
index 3adf31a83a79..d7b16f2c23e9 100644
--- a/net/xfrm/Kconfig
+++ b/net/xfrm/Kconfig
@@ -15,6 +15,7 @@ config XFRM_ALGO
 	tristate
 	select XFRM
 	select CRYPTO
+	select CRYPTO_AEAD
 	select CRYPTO_HASH
 	select CRYPTO_SKCIPHER

-- 
Sabrina