All of lore.kernel.org
 help / color / mirror / Atom feed
From: LABBE Corentin <clabbe@baylibre.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: davem@davemloft.net, linux-crypto@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] crypto: drbg: DRBG_CTR should select CTR
Date: Fri, 28 Feb 2020 11:23:46 +0100	[thread overview]
Message-ID: <20200228102346.GA1662@Red> (raw)
In-Reply-To: <20200228003052.GA9060@gondor.apana.org.au>

On Fri, Feb 28, 2020 at 11:30:52AM +1100, Herbert Xu wrote:
> On Wed, Feb 19, 2020 at 03:51:35PM +0000, Corentin Labbe wrote:
> > if CRYPTO_DRBG_CTR is builtin and CTR is module, allocating such algo
> > will fail.
> > DRBG: could not allocate CTR cipher TFM handle: ctr(aes)
> > alg: drbg: Failed to reset rng
> > alg: drbg: Test 0 failed for drbg_pr_ctr_aes128
> > DRBG: could not allocate CTR cipher TFM handle: ctr(aes)
> > alg: drbg: Failed to reset rng
> > alg: drbg: Test 0 failed for drbg_nopr_ctr_aes128
> > DRBG: could not allocate CTR cipher TFM handle: ctr(aes)
> > alg: drbg: Failed to reset rng
> > alg: drbg: Test 0 failed for drbg_nopr_ctr_aes192
> > DRBG: could not allocate CTR cipher TFM handle: ctr(aes)
> > alg: drbg: Failed to reset rng
> > ialg: drbg: Test 0 failed for drbg_nopr_ctr_aes256
> > 
> > Since setting DRBG_CTR=CTR lead to a recursive dependency, let's depends
> > on CTR=y
> > 
> > Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
> > ---
> >  crypto/Kconfig | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/crypto/Kconfig b/crypto/Kconfig
> > index 6d27fc6a7bf5..eddeb43fc01c 100644
> > --- a/crypto/Kconfig
> > +++ b/crypto/Kconfig
> > @@ -1822,7 +1822,7 @@ config CRYPTO_DRBG_HASH
> >  config CRYPTO_DRBG_CTR
> >  	bool "Enable CTR DRBG"
> >  	select CRYPTO_AES
> > -	depends on CRYPTO_CTR
> > +	depends on CRYPTO_CTR=y
> 
> This should be turned into a select.
> 

it fail also if I select it:
crypto/Kconfig:1800:error: recursive dependency detected!
crypto/Kconfig:1800:	symbol CRYPTO_DRBG_MENU is selected by CRYPTO_RNG_DEFAULT
crypto/Kconfig:83:	symbol CRYPTO_RNG_DEFAULT is selected by CRYPTO_SEQIV
crypto/Kconfig:330:	symbol CRYPTO_SEQIV is selected by CRYPTO_CTR
crypto/Kconfig:370:	symbol CRYPTO_CTR is selected by CRYPTO_DRBG_CTR
crypto/Kconfig:1822:	symbol CRYPTO_DRBG_CTR depends on CRYPTO_DRBG_MENU

I forgot to say it in the commit message.
I will send a v2 with an updated commit message.

Regards

      reply	other threads:[~2020-02-28 10:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-19 15:51 [PATCH 1/2] crypto: drbg: DRBG should select SHA512 Corentin Labbe
2020-02-19 15:51 ` [PATCH 2/2] crypto: drbg: DRBG_CTR should select CTR Corentin Labbe
2020-02-28  0:30   ` Herbert Xu
2020-02-28 10:23     ` LABBE Corentin [this message]

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=20200228102346.GA1662@Red \
    --to=clabbe@baylibre.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 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.