linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Ido Schimmel <idosch@idosch.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Damien Le Moal <Damien.LeMoal@wdc.com>,
	Nathan Chancellor <nathan@kernel.org>,
	Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
	Vladis Dronov <vdronov@redhat.com>,
	Simo Sorce <ssorce@redhat.com>,
	Eric Biggers <ebiggers@kernel.org>,
	"llvm@lists.linux.dev" <llvm@lists.linux.dev>,
	kernel test robot <lkp@intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: crypto: api - Fix boot-up crash when crypto manager is disabled
Date: Fri, 5 Nov 2021 06:26:14 -0700	[thread overview]
Message-ID: <20211105132614.GA2791625@roeck-us.net> (raw)

On Fri, Nov 05, 2021 at 03:26:08PM +0800, Herbert Xu wrote:
> On Thu, Nov 04, 2021 at 05:18:34PM +0200, Ido Schimmel wrote:
> >
> > Attached my config. I can easily test patches.
> 
> Thanks!
> 
> Could you all try this patch please?
> 
> ---8<---
> When the crypto manager is disabled, we need to explicitly set
> the crypto algorithms' tested status so that they can be used.
> 
> Fixes: cad439fc040e ("crypto: api - Do not create test larvals if...")
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Reported-by: Ido Schimmel <idosch@idosch.org>
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Tested-by: Guenter Roeck <linux@roeck-us.net>

> 
> diff --git a/crypto/algapi.c b/crypto/algapi.c
> index d379fd91fb7b..a366cb3e8aa1 100644
> --- a/crypto/algapi.c
> +++ b/crypto/algapi.c
> @@ -284,6 +284,8 @@ static struct crypto_larval *__crypto_register_alg(struct crypto_alg *alg)
>  
>  	if (larval)
>  		list_add(&larval->alg.cra_list, &crypto_alg_list);
> +	else
> +		alg->cra_flags |= CRYPTO_ALG_TESTED;
>  
>  	crypto_stats_init(alg);
>  
> -- 
> 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

             reply	other threads:[~2021-11-05 13:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-05 13:26 Guenter Roeck [this message]
     [not found] <20211003002801.GA5435@gondor.apana.org.au>
     [not found] ` <YV0K+EbrAqDdw2vp@archlinux-ax161>
     [not found]   ` <20211019132802.GA14233@gondor.apana.org.au>
2021-11-02 15:41     ` [PATCH] crypto: api - Do not create test larvals if manager is disabled Geert Uytterhoeven
2021-11-04  7:28       ` Damien Le Moal
2021-11-04  7:58         ` Geert Uytterhoeven
2021-11-04 12:16           ` Herbert Xu
2021-11-04 13:11             ` Geert Uytterhoeven
2021-11-04 13:30               ` Herbert Xu
2021-11-04 15:18                 ` Ido Schimmel
2021-11-05  7:26                   ` crypto: api - Fix boot-up crash when crypto " Herbert Xu
2021-11-05 14:33                     ` Ido Schimmel
2021-11-05 18:00                     ` Geert Uytterhoeven

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=20211105132614.GA2791625@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=Damien.LeMoal@wdc.com \
    --cc=ebiggers@kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=idosch@idosch.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=nathan@kernel.org \
    --cc=ssorce@redhat.com \
    --cc=vdronov@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).