Re: [v2 PATCH] crypto: api - Fix built-in testing dependency failures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 16, 2022 at 05:37:19PM +0100, Uwe Kleine-König wrote:
> On Wed, Mar 16, 2022 at 01:10:41PM +1200, Herbert Xu wrote:
> > On Wed, Dec 29, 2021 at 12:05:23PM +0100, Uwe Kleine-König wrote:
> > > On Wed, Dec 29, 2021 at 01:05:54PM +1100, Herbert Xu wrote:
> > > > On Wed, Dec 22, 2021 at 11:22:46AM +0100, Uwe Kleine-König wrote:
> > > > >
> > > > > I still experience a problem with the patch that got
> > > > > adad556efcdd42a1d9e060cbe5f6161cccf1fa28 in v5.16-rc1. I saw there are
> > > > > two commit fixing this one (
> > > > > 
> > > > > 	cad439fc040e crypto: api - Do not create test larvals if manager is disabled
> > > > > 	e42dff467ee6 crypto: api - Export crypto_boot_test_finished
> > > > > 
> > > > > ) but I still encounter the following on 2f47a9a4dfa3:
> > > > 
> > > > Perhaps you missed the last fix?
> > > > 
> > > > commit beaaaa37c664e9afdf2913aee19185d8e3793b50
> > > > Author: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> > > > Date:   Fri Nov 5 15:26:08 2021 +0800
> > > > 
> > > >     crypto: api - Fix boot-up crash when crypto manager is disabled
> > > 
> > > As 2f47a9a4dfa3 includes this commit, this is not the problem.
> > 
> > Using the config snippet in this email thread I was unable to
> > reproduce the failure under qemu.  Can you still reproduce this
> > with the latest upstream kernel? If yes please send me your complete
> > config file.
> 
> Still happens on 5.17-rc8, config attached.

I debugged that a bit further because the problem is in the way while
debugging another bug. What I learned is that without
CONFIG_DEBUG_BUG_VERBOSE a BUG results in hitting an undefined
instruction e7f001f2 on ARM.

After enabling CONFIG_DEBUG_BUG_VERBOSE this gets much more helpful:

[    1.630337] kernel BUG at crypto/algapi.c:461!

Digging a bit deeper the problem is that simd_skcipher_create_compat()
fails for aes_algs[1] in arch/arm/crypto/aes-neonbs-glue.c with -ENOENT
and then aes_exit -> simd_skcipher_free -> crypto_unregister_skcipher ->
crypto_unregister_alg stumbles over refcount_read(&alg->cra_refcnt)
being 2. Is this enough to understand the actual problem?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux