2007-12-14 02:04:17

by Erez Zadok

[permalink] [raw]
Subject: aead_geniv_* [crypto/seqiv.ko] undefined! (MMOTM stamp-2007-12-13-15-37)

I'm getting undefined symbols while building MMOTM kernel
stamp-2007-12-13-15-37:

MODPOST 32 modules
ERROR: "aead_geniv_exit" [crypto/seqiv.ko] undefined!
ERROR: "aead_geniv_alloc" [crypto/seqiv.ko] undefined!
ERROR: "aead_geniv_init" [crypto/seqiv.ko] undefined!
ERROR: "aead_geniv_free" [crypto/seqiv.ko] undefined!
make[1]: *** [__modpost] Error 1

My defined kernel symbols which are relevant are:

CONFIG_CRYPTO=y
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_BLKCIPHER=y
CONFIG_CRYPTO_SEQIV=m
CONFIG_CRYPTO_MANAGER=y
CONFIG_CRYPTO_MD5=m
CONFIG_CRYPTO_SHA1=y
CONFIG_CRYPTO_SHA256=y
CONFIG_CRYPTO_ECB=y
CONFIG_CRYPTO_CBC=y
CONFIG_CRYPTO_PCBC=y
CONFIG_CRYPTO_CTR=m
CONFIG_CRYPTO_DES=m
CONFIG_CRYPTO_CAST5=m

The missing symbols are in crypto/aead.c, but aead.c doesn't get compiled
in. It can't be compiled in b/c the config option for it doesn't seem to
show up in "make menuconfig". This simple patch makes the symbol show up in
menuconfig so I can turn it on:

diff --git a/crypto/Kconfig b/crypto/Kconfig
index 304ecc7..6876abe 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -25,7 +25,7 @@ config CRYPTO_ALGAPI
This option provides the API for cryptographic algorithms.

config CRYPTO_AEAD
- tristate
+ tristate "AEAD: Authenticated Encryption with Associated Data"
select CRYPTO_ALGAPI

config CRYPTO_BLKCIPHER

*However*, while the above small patch resolves the symbols, there's still a
problem: crypto/seqiv.c seems to depend unconditionally on symbols in
crypto/aead.c, so maybe seqiv.c needs some #ifdef CONFIG_CRYPTO_AEAD or
something.

Cheers,
Erez.


2007-12-14 02:20:33

by Herbert Xu

[permalink] [raw]
Subject: Re: aead_geniv_* [crypto/seqiv.ko] undefined! (MMOTM stamp-2007-12-13-15-37)

On Thu, Dec 13, 2007 at 09:03:46PM -0500, Erez Zadok wrote:
> I'm getting undefined symbols while building MMOTM kernel
> stamp-2007-12-13-15-37:
>
> MODPOST 32 modules
> ERROR: "aead_geniv_exit" [crypto/seqiv.ko] undefined!
> ERROR: "aead_geniv_alloc" [crypto/seqiv.ko] undefined!
> ERROR: "aead_geniv_init" [crypto/seqiv.ko] undefined!
> ERROR: "aead_geniv_free" [crypto/seqiv.ko] undefined!
> make[1]: *** [__modpost] Error 1

Sorry. I've added the following patch to fix this.

Thanks,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
diff --git a/crypto/Kconfig b/crypto/Kconfig
index 304ecc7..237dfa2 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -34,6 +34,7 @@ config CRYPTO_BLKCIPHER

config CRYPTO_SEQIV
tristate "Sequence Number IV Generator"
+ select CRYPTO_AEAD
select CRYPTO_BLKCIPHER
help
This IV generator generates an IV based on a sequence number by