On Thu, Jun 08, 2017 at 12:52:54PM -0700, Megha Dey wrote: > > I will move this code to the mcryptd.c. > > About the naming scheme, could you give me an example where the internal > and external algorithm have the same name? I tried searching but did not > find any. > > When the outer and inner algorithm have the same name, I see a crash > when testing using tcrypt. This is because the wrong algortihm (with a > higher priority) is being picked up in __crypto_alg_lookup. > > Inner alg: > Currently: > alg name:__cbc(aes), driver name:__cbc-aes-aesni-mb > > expected: > alg name:cbc(aes), driver name: cbc-aes-aesni-mb > > Outer alg: > Currently: > alg name:cbc(aes), driver name:cbc-aes-aesni-mb > > expected: > alg name:cbc(aes), driver name:mcryptd-cbc-aes-aesni-mb This all looks right. So I'm not sure why you're getting the crash. We're relying on the INTERNAL flag to ensure the internal algorithm is not picked up except when we strictly ask for it. In fact I see something fishy in your testmgr code (the last patch in the series I think). It's setting the INTERNAL bit when allocating tfms, that does not look right. The only one that should be setting this is mcryptd. Cheers, -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt