Re: [RFC] crypto: Remove mcryptd
From: Herbert Xu
Date: Thu Jul 19 2018 - 23:53:39 EST
On Fri, May 11, 2018 at 06:44:13PM -0700, Megha Dey wrote:
>
> +static struct ahash_alg *simd_ahash_create_compat(const char *algname,
> + const char *drvname,
> + const char *basename)
> +{
> + struct ahash_alg *alg;
> + struct ahash_alg *ialg;
> + int err;
I think there has been a misunderstsanding. You're not actually
using the simd wrapper here. All you're doing is creating a function
with the word simd in its name. In all other respects this is just
exposing the underlying algorithm to users directly, which cannot
work because the underlying algorithm requires SIMD.
What you need to do is create an actual simd wrapper with cryptd
and all the functions that may do SIMD work needs to invoke cryptd
if may_use_simd() (and other conditions) is false.
This wrapper should live in crypto/simd.c.
Cheers,
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt