public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x509: select CONFIG_CRYPTO_LIB_SHA256
@ 2026-02-12 10:20 Arnd Bergmann
  2026-02-12 17:49 ` Eric Biggers
  0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2026-02-12 10:20 UTC (permalink / raw)
  To: David Howells, Lukas Wunner, Ignat Korchagin, Herbert Xu,
	David S. Miller, Jarkko Sakkinen
  Cc: Arnd Bergmann, keyrings, linux-crypto, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

The x509 public key code gained a dependency on the sha256 hash
implementation, causing a rare link time failure in randconfig
builds:

arm-linux-gnueabi-ld: crypto/asymmetric_keys/x509_public_key.o: in function `x509_get_sig_params':
x509_public_key.c:(.text.x509_get_sig_params+0x12): undefined reference to `sha256'
arm-linux-gnueabi-ld: (sha256): Unknown destination type (ARM/Thumb) in crypto/asymmetric_keys/x509_public_key.o
x509_public_key.c:(.text.x509_get_sig_params+0x12): dangerous relocation: unsupported relocation

Select the necessary library code from Kconfig.

Fixes: 2c62068ac86b ("x509: Separately calculate sha256 for blacklist")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 crypto/asymmetric_keys/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/crypto/asymmetric_keys/Kconfig b/crypto/asymmetric_keys/Kconfig
index 1dae2232fe9a..e50bd9b3e27b 100644
--- a/crypto/asymmetric_keys/Kconfig
+++ b/crypto/asymmetric_keys/Kconfig
@@ -27,6 +27,7 @@ config X509_CERTIFICATE_PARSER
 	tristate "X.509 certificate parser"
 	depends on ASYMMETRIC_PUBLIC_KEY_SUBTYPE
 	select ASN1
+	select CRYPTO_LIB_SHA256
 	select OID_REGISTRY
 	help
 	  This option provides support for parsing X.509 format blobs for key
-- 
2.39.5


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

* Re: [PATCH] x509: select CONFIG_CRYPTO_LIB_SHA256
  2026-02-12 10:20 [PATCH] x509: select CONFIG_CRYPTO_LIB_SHA256 Arnd Bergmann
@ 2026-02-12 17:49 ` Eric Biggers
  0 siblings, 0 replies; 4+ messages in thread
From: Eric Biggers @ 2026-02-12 17:49 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: David Howells, Lukas Wunner, Ignat Korchagin, Herbert Xu,
	David S. Miller, Jarkko Sakkinen, Arnd Bergmann, keyrings,
	linux-crypto, linux-kernel

On Thu, Feb 12, 2026 at 11:20:55AM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The x509 public key code gained a dependency on the sha256 hash
> implementation, causing a rare link time failure in randconfig
> builds:
> 
> arm-linux-gnueabi-ld: crypto/asymmetric_keys/x509_public_key.o: in function `x509_get_sig_params':
> x509_public_key.c:(.text.x509_get_sig_params+0x12): undefined reference to `sha256'
> arm-linux-gnueabi-ld: (sha256): Unknown destination type (ARM/Thumb) in crypto/asymmetric_keys/x509_public_key.o
> x509_public_key.c:(.text.x509_get_sig_params+0x12): dangerous relocation: unsupported relocation
> 
> Select the necessary library code from Kconfig.
> 
> Fixes: 2c62068ac86b ("x509: Separately calculate sha256 for blacklist")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  crypto/asymmetric_keys/Kconfig | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Eric Biggers <ebiggers@kernel.org>

- Eric

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

* [PATCH] x509: select CONFIG_CRYPTO_LIB_SHA256
@ 2026-02-17  8:26 David Howells
  2026-02-17  8:35 ` David Howells
  0 siblings, 1 reply; 4+ messages in thread
From: David Howells @ 2026-02-17  8:26 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: dhowells, Arnd Bergmann, Lukas Wunner, Ignat Korchagin,
	Herbert Xu, David S. Miller, Jarkko Sakkinen, Arnd Bergmann,
	keyrings, linux-crypto, linux-kernel

    
The x509 public key code gained a dependency on the sha256 hash
implementation, causing a rare link time failure in randconfig
builds:

arm-linux-gnueabi-ld: crypto/asymmetric_keys/x509_public_key.o: in function `x509_get_sig_params':
x509_public_key.c:(.text.x509_get_sig_params+0x12): undefined reference to `sha256'
arm-linux-gnueabi-ld: (sha256): Unknown destination type (ARM/Thumb) in crypto/asymmetric_keys/x509_public_key.o
x509_public_key.c:(.text.x509_get_sig_params+0x12): dangerous relocation: unsupported relocation

Select the necessary library code from Kconfig.

Fixes: 2c62068ac86b ("x509: Separately calculate sha256 for blacklist")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Eric Biggers <ebiggers@kernel.org>
---
 crypto/asymmetric_keys/Kconfig |    1 +
 1 file changed, 1 insertion(+)

diff --git a/crypto/asymmetric_keys/Kconfig b/crypto/asymmetric_keys/Kconfig
index 1dae2232fe9a..e50bd9b3e27b 100644
--- a/crypto/asymmetric_keys/Kconfig
+++ b/crypto/asymmetric_keys/Kconfig
@@ -27,6 +27,7 @@ config X509_CERTIFICATE_PARSER
 	tristate "X.509 certificate parser"
 	depends on ASYMMETRIC_PUBLIC_KEY_SUBTYPE
 	select ASN1
+	select CRYPTO_LIB_SHA256
 	select OID_REGISTRY
 	help
 	  This option provides support for parsing X.509 format blobs for key


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

* Re: [PATCH] x509: select CONFIG_CRYPTO_LIB_SHA256
  2026-02-17  8:26 David Howells
@ 2026-02-17  8:35 ` David Howells
  0 siblings, 0 replies; 4+ messages in thread
From: David Howells @ 2026-02-17  8:35 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: dhowells, Arnd Bergmann, Lukas Wunner, Ignat Korchagin,
	Herbert Xu, David S. Miller, Jarkko Sakkinen, Arnd Bergmann,
	keyrings, linux-crypto, linux-kernel

Apologies, I forgot the:

From: Arnd Bergmann <arnd@kernel.org>

at the beginning.  Do you want me to resend the patch?

David


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

end of thread, other threads:[~2026-02-17  8:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-12 10:20 [PATCH] x509: select CONFIG_CRYPTO_LIB_SHA256 Arnd Bergmann
2026-02-12 17:49 ` Eric Biggers
  -- strict thread matches above, loose matches on Subject: below --
2026-02-17  8:26 David Howells
2026-02-17  8:35 ` David Howells

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