Skip to contentSkip to conversation

crypto: hash - select CRYPTO_HASH where needed

PATCH In review Arnd Bergmann 2 participants 2 messages Jan 25, 2016 – Jan 26, 2016 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: hash - select CRYPTO_HASH where needed

The ghash and poly1305 hash implementations can be enabled when CONFIG_CRYPTO_HASH is turned off, causing a link error:

crypto/built-in.o: In function `ghash_mod_init':
(.init.text+0xd0): undefined reference to crypto_register_shash' crypto/built-in.o: In function ghash_mod_exit':
(.exit.text+0xb4): undefined reference to crypto_unregister_shash' crypto/built-in.o: In function poly1305_mod_init':
(.init.text+0xb4): undefined reference to crypto_register_shash' crypto/built-in.o: In function poly1305_mod_exit':
(.exit.text+0x98): undefined reference to `crypto_unregister_shash'

This adds an explicit 'select', like all other hashes have it.

---
 crypto/Kconfig | 2 ++
 1 file changed, 2 insertions(+)
crypto/Kconfig +2 -0
index 99109b93604a..2d76676a1253 100644
@@ -472,11 +472,13 @@ config CRYPTO_CRCT10DIF_PCLMUL
 config CRYPTO_GHASH
 	tristate "GHASH digest algorithm"
 	select CRYPTO_GF128MUL
+	select CRYPTO_HASH
 	help
 	  GHASH is message digest algorithm for GCM (Galois/Counter Mode).
 
 config CRYPTO_POLY1305
 	tristate "Poly1305 authenticator algorithm"
+	select CRYPTO_HASH
 	help
 	  Poly1305 authenticator algorithm, RFC7539.
 
Signature · 1 line
2.7.0
maintainer
#1 lore raw
Quoted 12 lines · Arnd Bergmann

The ghash and poly1305 hash implementations can be enabled when CONFIG_CRYPTO_HASH is turned off, causing a link error:

crypto/built-in.o: In function `ghash_mod_init':
(.init.text+0xd0): undefined reference to crypto_register_shash' crypto/built-in.o: In function ghash_mod_exit':
(.exit.text+0xb4): undefined reference to crypto_unregister_shash' crypto/built-in.o: In function poly1305_mod_init':
(.init.text+0xb4): undefined reference to crypto_register_shash' crypto/built-in.o: In function poly1305_mod_exit':
(.exit.text+0x98): undefined reference to `crypto_unregister_shash'

Quoted 3 lines

This adds an explicit 'select', like all other hashes have it.

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt