mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] staging: ccree: add CRYPTO dependency
@ 2017-05-19  8:04 Arnd Bergmann
  2017-05-21 12:26 ` Gilad Ben-Yossef
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2017-05-19  8:04 UTC (permalink / raw)
  To: Gilad Ben-Yossef, Greg Kroah-Hartman
  Cc: Arnd Bergmann, linux-crypto, driverdev-devel, devel, linux-kernel

A rare randconfig build error shows up when we have CONFIG_CRYPTO=m
in combination with a built-in CCREE driver:

crypto/hmac.o: In function `hmac_update':
hmac.c:(.text.hmac_update+0x28): undefined reference to `crypto_shash_update'
crypto/hmac.o: In function `hmac_setkey':
hmac.c:(.text.hmac_setkey+0x90): undefined reference to `crypto_shash_digest'
hmac.c:(.text.hmac_setkey+0x154): undefined reference to `crypto_shash_update'
drivers/staging/ccree/ssi_cipher.o: In function `ssi_blkcipher_setkey':
ssi_cipher.c:(.text.ssi_blkcipher_setkey+0x350): undefined reference to `crypto_shash_digest'
drivers/staging/ccree/ssi_cipher.o: In function `ssi_blkcipher_exit':
ssi_cipher.c:(.text.ssi_blkcipher_exit+0xd4): undefined reference to `crypto_destroy_tfm'
drivers/staging/ccree/ssi_cipher.o: In function `ssi_blkcipher_init':
ssi_cipher.c:(.text.ssi_blkcipher_init+0x1b0): undefined reference to `crypto_alloc_shash'
drivers/staging/ccree/ssi_cipher.o: In function `ssi_ablkcipher_free':
ssi_cipher.c:(.text.ssi_ablkcipher_free+0x48): undefined reference to `crypto_unregister_alg'
drivers/staging/ccree/ssi_cipher.o: In function `ssi_ablkcipher_alloc':
ssi_cipher.c:(.text.ssi_ablkcipher_alloc+0x138): undefined reference to `crypto_register_alg'
ssi_cipher.c:(.text.ssi_ablkcipher_alloc+0x274): undefined reference to `crypto_blkcipher_type'

We actually need to depend on both CRYPTO and CRYPTO_HW here to avoid the
problem, since CRYPTO_HW is a bool symbol and by itself that does not
force CCREE to be a loadable module when the core cryto support is modular.

Fixes: 50cfbbb7e627 ("staging: ccree: add ahash support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/staging/ccree/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ccree/Kconfig b/drivers/staging/ccree/Kconfig
index ae627049c499..4be87f503e3b 100644
--- a/drivers/staging/ccree/Kconfig
+++ b/drivers/staging/ccree/Kconfig
@@ -1,6 +1,6 @@
 config CRYPTO_DEV_CCREE
 	tristate "Support for ARM TrustZone CryptoCell C7XX family of Crypto accelerators"
-	depends on CRYPTO_HW && OF && HAS_DMA
+	depends on CRYPTO && CRYPTO_HW && OF && HAS_DMA
 	default n
 	select CRYPTO_HASH
 	select CRYPTO_BLKCIPHER
-- 
2.9.0

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

* Re: [PATCH] staging: ccree: add CRYPTO dependency
  2017-05-19  8:04 [PATCH] staging: ccree: add CRYPTO dependency Arnd Bergmann
@ 2017-05-21 12:26 ` Gilad Ben-Yossef
  0 siblings, 0 replies; 2+ messages in thread
From: Gilad Ben-Yossef @ 2017-05-21 12:26 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Greg Kroah-Hartman, linux-crypto, driverdev-devel, devel,
	Linux kernel mailing list

On Fri, May 19, 2017 at 11:04 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> A rare randconfig build error shows up when we have CONFIG_CRYPTO=m
> in combination with a built-in CCREE driver:
>
> crypto/hmac.o: In function `hmac_update':
> hmac.c:(.text.hmac_update+0x28): undefined reference to `crypto_shash_update'
> crypto/hmac.o: In function `hmac_setkey':
> hmac.c:(.text.hmac_setkey+0x90): undefined reference to `crypto_shash_digest'
> hmac.c:(.text.hmac_setkey+0x154): undefined reference to `crypto_shash_update'
> drivers/staging/ccree/ssi_cipher.o: In function `ssi_blkcipher_setkey':
> ssi_cipher.c:(.text.ssi_blkcipher_setkey+0x350): undefined reference to `crypto_shash_digest'
> drivers/staging/ccree/ssi_cipher.o: In function `ssi_blkcipher_exit':
> ssi_cipher.c:(.text.ssi_blkcipher_exit+0xd4): undefined reference to `crypto_destroy_tfm'
> drivers/staging/ccree/ssi_cipher.o: In function `ssi_blkcipher_init':
> ssi_cipher.c:(.text.ssi_blkcipher_init+0x1b0): undefined reference to `crypto_alloc_shash'
> drivers/staging/ccree/ssi_cipher.o: In function `ssi_ablkcipher_free':
> ssi_cipher.c:(.text.ssi_ablkcipher_free+0x48): undefined reference to `crypto_unregister_alg'
> drivers/staging/ccree/ssi_cipher.o: In function `ssi_ablkcipher_alloc':
> ssi_cipher.c:(.text.ssi_ablkcipher_alloc+0x138): undefined reference to `crypto_register_alg'
> ssi_cipher.c:(.text.ssi_ablkcipher_alloc+0x274): undefined reference to `crypto_blkcipher_type'
>
> We actually need to depend on both CRYPTO and CRYPTO_HW here to avoid the
> problem, since CRYPTO_HW is a bool symbol and by itself that does not
> force CCREE to be a loadable module when the core cryto support is modular.
>
> Fixes: 50cfbbb7e627 ("staging: ccree: add ahash support")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/staging/ccree/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/ccree/Kconfig b/drivers/staging/ccree/Kconfig
> index ae627049c499..4be87f503e3b 100644
> --- a/drivers/staging/ccree/Kconfig
> +++ b/drivers/staging/ccree/Kconfig
> @@ -1,6 +1,6 @@
>  config CRYPTO_DEV_CCREE
>         tristate "Support for ARM TrustZone CryptoCell C7XX family of Crypto accelerators"
> -       depends on CRYPTO_HW && OF && HAS_DMA
> +       depends on CRYPTO && CRYPTO_HW && OF && HAS_DMA
>         default n
>         select CRYPTO_HASH
>         select CRYPTO_BLKCIPHER
> --
> 2.9.0
>

Thank you and

Acked-By: Gilad Ben-Yossef <gilad@benyossef.com>


-- 
Gilad Ben-Yossef
Chief Coffee Drinker

"If you take a class in large-scale robotics, can you end up in a
situation where the homework eats your dog?"
 -- Jean-Baptiste Queru

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

end of thread, other threads:[~2017-05-21 12:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-19  8:04 [PATCH] staging: ccree: add CRYPTO dependency Arnd Bergmann
2017-05-21 12:26 ` Gilad Ben-Yossef

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

all inboxes | Powered by JetHome®