mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
crypto: user - Fix lookup of algorithms with IV generator
We lookup algorithms with crypto_alg_mod_lookup() when instantiating via crypto_add_alg(). However, algorithms that are wrapped by an IV genearator (e.g. aead or genicv type algorithms) need special care. The userspace process hangs until it gets a timeout when we use crypto_alg_mod_lookup() to lookup these algorithms. So export the lookup functions for these algorithms and use them in crypto_add_alg(). Signed-off-by: Steffen Klassert <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
This commit is contained in:
parent
fbf0ca1bf8
commit
1e12299400
5 changed files with 79 additions and 5 deletions
|
|
@ -470,8 +470,7 @@ out:
|
|||
return err;
|
||||
}
|
||||
|
||||
static struct crypto_alg *crypto_lookup_aead(const char *name, u32 type,
|
||||
u32 mask)
|
||||
struct crypto_alg *crypto_lookup_aead(const char *name, u32 type, u32 mask)
|
||||
{
|
||||
struct crypto_alg *alg;
|
||||
|
||||
|
|
@ -503,6 +502,7 @@ static struct crypto_alg *crypto_lookup_aead(const char *name, u32 type,
|
|||
|
||||
return ERR_PTR(crypto_nivaead_default(alg, type, mask));
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(crypto_lookup_aead);
|
||||
|
||||
int crypto_grab_aead(struct crypto_aead_spawn *spawn, const char *name,
|
||||
u32 type, u32 mask)
|
||||
|
|
|
|||
Loading…
Reference in a new issue