All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] crypto: ecc: fix CRYPTO_DEFAULT_RNG dependency
@ 2021-09-20 10:05 Arnd Bergmann
  2021-09-20 16:25 ` Stefan Berger
  2021-10-01  6:45 ` Herbert Xu
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2021-09-20 10:05 UTC (permalink / raw)
  To: Herbert Xu, David S. Miller, Vitaly Chikunov, Stefan Berger
  Cc: Arnd Bergmann, Ard Biesheuvel, Eric Biggers, linux-crypto, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

The ecc.c file started out as part of the ECDH algorithm but got
moved out into a standalone module later. It does not build without
CRYPTO_DEFAULT_RNG, so now that other modules are using it as well we
can run into this link error:

aarch64-linux-ld: ecc.c:(.text+0xfc8): undefined reference to `crypto_default_rng'
aarch64-linux-ld: ecc.c:(.text+0xff4): undefined reference to `crypto_put_default_rng'

Move the 'select CRYPTO_DEFAULT_RNG' statement into the correct symbol.

Fixes: 0d7a78643f69 ("crypto: ecrdsa - add EC-RDSA (GOST 34.10) algorithm")
Fixes: 4e6602916bc6 ("crypto: ecdsa - Add support for ECDSA signature verification")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 crypto/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crypto/Kconfig b/crypto/Kconfig
index 536df4b6b825..285f82647d2b 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -233,12 +233,12 @@ config CRYPTO_DH
 
 config CRYPTO_ECC
 	tristate
+	select CRYPTO_RNG_DEFAULT
 
 config CRYPTO_ECDH
 	tristate "ECDH algorithm"
 	select CRYPTO_ECC
 	select CRYPTO_KPP
-	select CRYPTO_RNG_DEFAULT
 	help
 	  Generic implementation of the ECDH algorithm
 
-- 
2.29.2


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

* Re: [PATCH] crypto: ecc: fix CRYPTO_DEFAULT_RNG dependency
  2021-09-20 10:05 [PATCH] crypto: ecc: fix CRYPTO_DEFAULT_RNG dependency Arnd Bergmann
@ 2021-09-20 16:25 ` Stefan Berger
  2021-10-01  6:45 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Berger @ 2021-09-20 16:25 UTC (permalink / raw)
  To: Arnd Bergmann, Herbert Xu, David S. Miller, Vitaly Chikunov
  Cc: Arnd Bergmann, Ard Biesheuvel, Eric Biggers, linux-crypto, linux-kernel


On 9/20/21 6:05 AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The ecc.c file started out as part of the ECDH algorithm but got
> moved out into a standalone module later. It does not build without
> CRYPTO_DEFAULT_RNG, so now that other modules are using it as well we
> can run into this link error:
>
> aarch64-linux-ld: ecc.c:(.text+0xfc8): undefined reference to `crypto_default_rng'
> aarch64-linux-ld: ecc.c:(.text+0xff4): undefined reference to `crypto_put_default_rng'
>
> Move the 'select CRYPTO_DEFAULT_RNG' statement into the correct symbol.
>
> Fixes: 0d7a78643f69 ("crypto: ecrdsa - add EC-RDSA (GOST 34.10) algorithm")
> Fixes: 4e6602916bc6 ("crypto: ecdsa - Add support for ECDSA signature verification")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>


> ---
>   crypto/Kconfig | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/crypto/Kconfig b/crypto/Kconfig
> index 536df4b6b825..285f82647d2b 100644
> --- a/crypto/Kconfig
> +++ b/crypto/Kconfig
> @@ -233,12 +233,12 @@ config CRYPTO_DH
>   
>   config CRYPTO_ECC
>   	tristate
> +	select CRYPTO_RNG_DEFAULT
>   
>   config CRYPTO_ECDH
>   	tristate "ECDH algorithm"
>   	select CRYPTO_ECC
>   	select CRYPTO_KPP
> -	select CRYPTO_RNG_DEFAULT
>   	help
>   	  Generic implementation of the ECDH algorithm
>   

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

* Re: [PATCH] crypto: ecc: fix CRYPTO_DEFAULT_RNG dependency
  2021-09-20 10:05 [PATCH] crypto: ecc: fix CRYPTO_DEFAULT_RNG dependency Arnd Bergmann
  2021-09-20 16:25 ` Stefan Berger
@ 2021-10-01  6:45 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2021-10-01  6:45 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: David S. Miller, Vitaly Chikunov, Stefan Berger, Arnd Bergmann,
	Ard Biesheuvel, Eric Biggers, linux-crypto, linux-kernel

On Mon, Sep 20, 2021 at 12:05:35PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The ecc.c file started out as part of the ECDH algorithm but got
> moved out into a standalone module later. It does not build without
> CRYPTO_DEFAULT_RNG, so now that other modules are using it as well we
> can run into this link error:
> 
> aarch64-linux-ld: ecc.c:(.text+0xfc8): undefined reference to `crypto_default_rng'
> aarch64-linux-ld: ecc.c:(.text+0xff4): undefined reference to `crypto_put_default_rng'
> 
> Move the 'select CRYPTO_DEFAULT_RNG' statement into the correct symbol.
> 
> Fixes: 0d7a78643f69 ("crypto: ecrdsa - add EC-RDSA (GOST 34.10) algorithm")
> Fixes: 4e6602916bc6 ("crypto: ecdsa - Add support for ECDSA signature verification")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  crypto/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

end of thread, other threads:[~2021-10-01  6:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-20 10:05 [PATCH] crypto: ecc: fix CRYPTO_DEFAULT_RNG dependency Arnd Bergmann
2021-09-20 16:25 ` Stefan Berger
2021-10-01  6:45 ` Herbert Xu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.