public inbox for linux-crypto@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	Arnd Bergmann <arnd@arndb.de>, Ard Biesheuvel <ardb@kernel.org>,
	Lukas Wunner <lukas@wunner.de>,
	Stephan Mueller <smueller@chronox.de>,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] crypto: fix dependencies on lib/crypto modules
Date: Mon, 10 Mar 2025 10:24:03 -0700	[thread overview]
Message-ID: <20250310172403.GD1701@sol.localdomain> (raw)
In-Reply-To: <20250310132647.3256818-1-arnd@kernel.org>

On Mon, Mar 10, 2025 at 02:26:39PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The crypto subsystem helpers for chacha, poly1305 and curve25519 were
> changed to select the 'INTERNAL' Kconfig symbols, but the code references
> the generic implementation instead, which leads to a link failure when
> nothing else selects it.
> 
> ld.lld-21: error: undefined symbol: chacha_crypt_generic
> >>> referenced by chacha_generic.c
> >>>               crypto/chacha_generic.o:(chacha_stream_xor) in archive vmlinux.a
> 
> ld.lld-21: error: undefined symbol: poly1305_final_generic
> >>> referenced by poly1305_generic.c
> >>>               crypto/poly1305_generic.o:(crypto_poly1305_final) in archive vmlinux.a
> 
> The INTERNAL version turns on the architecture specific optimized cipher,
> which normally usually also enables the generic version, but this is not
> the case on all architectures. Selecting only the GENERIC version here is
> not sufficient since the architecture specific ones are now hidden symbols
> and are only built when the INTERNAL symbol is also available.
> 
> Fixes: 17ec3e71ba79 ("crypto: lib/Kconfig - Hide arch options from user")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  crypto/Kconfig | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/crypto/Kconfig b/crypto/Kconfig
> index aac27a4668fd..76693e3edff8 100644
> --- a/crypto/Kconfig
> +++ b/crypto/Kconfig
> @@ -317,6 +317,7 @@ config CRYPTO_ECRDSA
>  config CRYPTO_CURVE25519
>  	tristate "Curve25519"
>  	select CRYPTO_KPP
> +	select CRYPTO_LIB_CURVE25519_GENERIC
>  	select CRYPTO_LIB_CURVE25519_INTERNAL
>  	help
>  	  Curve25519 elliptic curve (RFC7748)
> @@ -615,6 +616,7 @@ config CRYPTO_ARC4
>  
>  config CRYPTO_CHACHA20
>  	tristate "ChaCha"
> +	select CRYPTO_LIB_CHACHA_GENERIC
>  	select CRYPTO_LIB_CHACHA_INTERNAL
>  	select CRYPTO_SKCIPHER
>  	help
> @@ -936,6 +938,7 @@ config CRYPTO_POLYVAL
>  config CRYPTO_POLY1305
>  	tristate "Poly1305"
>  	select CRYPTO_HASH
> +	select CRYPTO_LIB_POLY1305_GENERIC
>  	select CRYPTO_LIB_POLY1305_INTERNAL
>  	help
>  	  Poly1305 authenticator algorithm (RFC7539)

Looks the same as
https://lore.kernel.org/linux-crypto/Z8UdUoaKtDKzgPph@gondor.apana.org.au/ which
was already applied.

- Eric

  parent reply	other threads:[~2025-03-10 17:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-10 13:26 [PATCH 1/2] crypto: fix dependencies on lib/crypto modules Arnd Bergmann
2025-03-10 13:26 ` [PATCH 2/2] crypto: lib/Kconfig: hide library options Arnd Bergmann
2025-03-10 17:27   ` Eric Biggers
2025-03-10 17:24 ` Eric Biggers [this message]
2025-03-11 12:32   ` [PATCH 1/2] crypto: fix dependencies on lib/crypto modules Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250310172403.GD1701@sol.localdomain \
    --to=ebiggers@kernel.org \
    --cc=ardb@kernel.org \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=smueller@chronox.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox