mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] crypto: Kconfig - correct references in config CRYPTO_HKDF
@ 2025-04-01 12:13 Lukas Bulwahn
  2025-04-01 12:16 ` Herbert Xu
  0 siblings, 1 reply; 3+ messages in thread
From: Lukas Bulwahn @ 2025-04-01 12:13 UTC (permalink / raw)
  To: Herbert Xu, David S . Miller, Hannes Reinecke, Keith Busch,
	Eric Biggers, linux-crypto
  Cc: kernel-janitors, linux-kernel, Lukas Bulwahn

From: Lukas Bulwahn <lukas.bulwahn@redhat.com>

Commit 3241cd0c6c17 ("crypto,fs: Separate out hkdf_extract() and
hkdf_expand()") adds the new config option CRYPTO_HKDF, which intends to
select further hash algorithms when crypto manager tests are enabled.

However, the select command accidentally refers to
CONFIG_CRYPTO_MANAGER_DISABLE_TESTS with the CONFIG prefix, whereas the
references here in the Kconfig file work without the CONFIG prefix.

Correct the references here to its proper form.

Fixes: 3241cd0c6c17 ("crypto,fs: Separate out hkdf_extract() and hkdf_expand()")
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@redhat.com>
---
 crypto/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/crypto/Kconfig b/crypto/Kconfig
index dbf97c4e7c59..f601a4ec6d1a 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -143,8 +143,8 @@ config CRYPTO_ACOMP
 
 config CRYPTO_HKDF
 	tristate
-	select CRYPTO_SHA256 if !CONFIG_CRYPTO_MANAGER_DISABLE_TESTS
-	select CRYPTO_SHA512 if !CONFIG_CRYPTO_MANAGER_DISABLE_TESTS
+	select CRYPTO_SHA256 if !CRYPTO_MANAGER_DISABLE_TESTS
+	select CRYPTO_SHA512 if !CRYPTO_MANAGER_DISABLE_TESTS
 	select CRYPTO_HASH2
 
 config CRYPTO_MANAGER
-- 
2.49.0


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

* Re: [PATCH] crypto: Kconfig - correct references in config CRYPTO_HKDF
  2025-04-01 12:13 [PATCH] crypto: Kconfig - correct references in config CRYPTO_HKDF Lukas Bulwahn
@ 2025-04-01 12:16 ` Herbert Xu
  2025-04-02  6:05   ` Hannes Reinecke
  0 siblings, 1 reply; 3+ messages in thread
From: Herbert Xu @ 2025-04-01 12:16 UTC (permalink / raw)
  To: Lukas Bulwahn
  Cc: David S . Miller, Hannes Reinecke, Keith Busch, Eric Biggers,
	linux-crypto, kernel-janitors, linux-kernel, Lukas Bulwahn

On Tue, Apr 01, 2025 at 02:13:54PM +0200, Lukas Bulwahn wrote:
>
> diff --git a/crypto/Kconfig b/crypto/Kconfig
> index dbf97c4e7c59..f601a4ec6d1a 100644
> --- a/crypto/Kconfig
> +++ b/crypto/Kconfig
> @@ -143,8 +143,8 @@ config CRYPTO_ACOMP
>  
>  config CRYPTO_HKDF
>  	tristate
> -	select CRYPTO_SHA256 if !CONFIG_CRYPTO_MANAGER_DISABLE_TESTS
> -	select CRYPTO_SHA512 if !CONFIG_CRYPTO_MANAGER_DISABLE_TESTS
> +	select CRYPTO_SHA256 if !CRYPTO_MANAGER_DISABLE_TESTS
> +	select CRYPTO_SHA512 if !CRYPTO_MANAGER_DISABLE_TESTS

Why not just drop CRYPTO_MANAGER_DISABLE_TESTS and select the
SHA algorithms unconditionally?

>  	select CRYPTO_HASH2

Nobody should select HASH2.  Just drop it since it's implied
by SHA256/SHA512.

Cheers,
-- 
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

* Re: [PATCH] crypto: Kconfig - correct references in config CRYPTO_HKDF
  2025-04-01 12:16 ` Herbert Xu
@ 2025-04-02  6:05   ` Hannes Reinecke
  0 siblings, 0 replies; 3+ messages in thread
From: Hannes Reinecke @ 2025-04-02  6:05 UTC (permalink / raw)
  To: Herbert Xu, Lukas Bulwahn
  Cc: David S . Miller, Hannes Reinecke, Keith Busch, Eric Biggers,
	linux-crypto, kernel-janitors, linux-kernel, Lukas Bulwahn

On 4/1/25 14:16, Herbert Xu wrote:
> On Tue, Apr 01, 2025 at 02:13:54PM +0200, Lukas Bulwahn wrote:
>>
>> diff --git a/crypto/Kconfig b/crypto/Kconfig
>> index dbf97c4e7c59..f601a4ec6d1a 100644
>> --- a/crypto/Kconfig
>> +++ b/crypto/Kconfig
>> @@ -143,8 +143,8 @@ config CRYPTO_ACOMP
>>   
>>   config CRYPTO_HKDF
>>   	tristate
>> -	select CRYPTO_SHA256 if !CONFIG_CRYPTO_MANAGER_DISABLE_TESTS
>> -	select CRYPTO_SHA512 if !CONFIG_CRYPTO_MANAGER_DISABLE_TESTS
>> +	select CRYPTO_SHA256 if !CRYPTO_MANAGER_DISABLE_TESTS
>> +	select CRYPTO_SHA512 if !CRYPTO_MANAGER_DISABLE_TESTS
> 
> Why not just drop CRYPTO_MANAGER_DISABLE_TESTS and select the
> SHA algorithms unconditionally?
> 
Fine with me. I was just trying to follow precedent here when creating
the original patch.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
hare@suse.de                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich

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

end of thread, other threads:[~2025-04-02  6:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-01 12:13 [PATCH] crypto: Kconfig - correct references in config CRYPTO_HKDF Lukas Bulwahn
2025-04-01 12:16 ` Herbert Xu
2025-04-02  6:05   ` Hannes Reinecke

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®