diff mbox series

crypto: skcipher - Add dependency on ecb

Message ID ZRuLK6SIuq9qYqpB@gondor.apana.org.au (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show
Series crypto: skcipher - Add dependency on ecb | expand

Commit Message

Herbert Xu Oct. 3, 2023, 3:31 a.m. UTC
On Mon, Oct 02, 2023 at 01:25:22PM -0700, Nathan Chancellor wrote:
>
> I am noticing a failure to get to user space when booting OpenSUSE's
> armv7hl configuration [1] in QEMU after this change as commit
> 705b52fef3c7 ("crypto: cbc - Convert from skcipher to lskcipher"). I can
> reproduce it with GCC 13.2.0 from kernel.org [2] and QEMU 8.1.1, in case
> either of those versions matter.  The rootfs is available at [3] in case
> it is relevant.

Thanks for the report.  This is caused by a missing dependency
on ECB.  Please try this patch:

---8<---
As lskcipher requires the ecb wrapper for the transition add an
explicit dependency on it so that it is always present.  This can
be removed once all simple ciphers have been converted to lskcipher.

Reported-by: Nathan Chancellor <nathan@kernel.org>
Fixes: 705b52fef3c7 ("crypto: cbc - Convert from skcipher to lskcipher")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Comments

Nathan Chancellor Oct. 3, 2023, 3:25 p.m. UTC | #1
On Tue, Oct 03, 2023 at 11:31:55AM +0800, Herbert Xu wrote:
> On Mon, Oct 02, 2023 at 01:25:22PM -0700, Nathan Chancellor wrote:
> >
> > I am noticing a failure to get to user space when booting OpenSUSE's
> > armv7hl configuration [1] in QEMU after this change as commit
> > 705b52fef3c7 ("crypto: cbc - Convert from skcipher to lskcipher"). I can
> > reproduce it with GCC 13.2.0 from kernel.org [2] and QEMU 8.1.1, in case
> > either of those versions matter.  The rootfs is available at [3] in case
> > it is relevant.
> 
> Thanks for the report.  This is caused by a missing dependency
> on ECB.  Please try this patch:
> 
> ---8<---
> As lskcipher requires the ecb wrapper for the transition add an
> explicit dependency on it so that it is always present.  This can
> be removed once all simple ciphers have been converted to lskcipher.
> 
> Reported-by: Nathan Chancellor <nathan@kernel.org>
> Fixes: 705b52fef3c7 ("crypto: cbc - Convert from skcipher to lskcipher")
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Tested-by: Nathan Chancellor <nathan@kernel.org>

Thanks for the quick fix!

> diff --git a/crypto/Kconfig b/crypto/Kconfig
> index ed931ddea644..bbf51d55724e 100644
> --- a/crypto/Kconfig
> +++ b/crypto/Kconfig
> @@ -85,6 +85,7 @@ config CRYPTO_SKCIPHER
>  	tristate
>  	select CRYPTO_SKCIPHER2
>  	select CRYPTO_ALGAPI
> +	select CRYPTO_ECB
>  
>  config CRYPTO_SKCIPHER2
>  	tristate
> @@ -689,7 +690,7 @@ config CRYPTO_CTS
>  
>  config CRYPTO_ECB
>  	tristate "ECB (Electronic Codebook)"
> -	select CRYPTO_SKCIPHER
> +	select CRYPTO_SKCIPHER2
>  	select CRYPTO_MANAGER
>  	help
>  	  ECB (Electronic Codebook) mode (NIST SP800-38A)
> -- 
> 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
diff mbox series

Patch

diff --git a/crypto/Kconfig b/crypto/Kconfig
index ed931ddea644..bbf51d55724e 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -85,6 +85,7 @@  config CRYPTO_SKCIPHER
 	tristate
 	select CRYPTO_SKCIPHER2
 	select CRYPTO_ALGAPI
+	select CRYPTO_ECB
 
 config CRYPTO_SKCIPHER2
 	tristate
@@ -689,7 +690,7 @@  config CRYPTO_CTS
 
 config CRYPTO_ECB
 	tristate "ECB (Electronic Codebook)"
-	select CRYPTO_SKCIPHER
+	select CRYPTO_SKCIPHER2
 	select CRYPTO_MANAGER
 	help
 	  ECB (Electronic Codebook) mode (NIST SP800-38A)