Lines Matching refs:type
56 static struct crypto_alg *__crypto_alg_lookup(const char *name, u32 type, in __crypto_alg_lookup() argument
68 if ((q->cra_flags ^ type) & mask) in __crypto_alg_lookup()
106 struct crypto_larval *crypto_larval_alloc(const char *name, u32 type, u32 mask) in crypto_larval_alloc() argument
115 larval->alg.cra_flags = CRYPTO_ALG_LARVAL | type; in crypto_larval_alloc()
126 static struct crypto_alg *crypto_larval_add(const char *name, u32 type, in crypto_larval_add() argument
132 larval = crypto_larval_alloc(name, type, mask); in crypto_larval_add()
139 alg = __crypto_alg_lookup(name, type, mask); in crypto_larval_add()
234 static struct crypto_alg *crypto_alg_lookup(const char *name, u32 type, in crypto_alg_lookup() argument
241 if (!((type | mask) & CRYPTO_ALG_TESTED)) in crypto_alg_lookup()
245 alg = __crypto_alg_lookup(name, (type | test) & ~fips, in crypto_alg_lookup()
248 if (((type | mask) ^ fips) & fips) in crypto_alg_lookup()
253 ((type ^ alg->cra_flags) & mask)) { in crypto_alg_lookup()
259 alg = __crypto_alg_lookup(name, type, mask); in crypto_alg_lookup()
271 static struct crypto_alg *crypto_larval_lookup(const char *name, u32 type, in crypto_larval_lookup() argument
279 type &= ~(CRYPTO_ALG_LARVAL | CRYPTO_ALG_DEAD); in crypto_larval_lookup()
282 alg = crypto_alg_lookup(name, type, mask); in crypto_larval_lookup()
286 if (!((type ^ CRYPTO_ALG_NEED_FALLBACK) & mask & in crypto_larval_lookup()
290 alg = crypto_alg_lookup(name, type, mask); in crypto_larval_lookup()
296 alg = crypto_larval_add(name, type, mask); in crypto_larval_lookup()
315 struct crypto_alg *crypto_alg_mod_lookup(const char *name, u32 type, u32 mask) in crypto_alg_mod_lookup() argument
328 if (!((type | mask) & CRYPTO_ALG_INTERNAL)) in crypto_alg_mod_lookup()
331 larval = crypto_larval_lookup(name, type, mask); in crypto_alg_mod_lookup()
350 const struct crypto_type *type = tfm->__crt_alg->cra_type; in crypto_exit_ops() local
352 if (type && tfm->exit) in crypto_exit_ops()
356 static unsigned int crypto_ctxsize(struct crypto_alg *alg, u32 type, u32 mask) in crypto_ctxsize() argument
363 return len + type_obj->ctxsize(alg, type, mask); in crypto_ctxsize()
389 struct crypto_tfm *__crypto_alloc_tfmgfp(struct crypto_alg *alg, u32 type, in __crypto_alloc_tfmgfp() argument
396 tfm_size = sizeof(*tfm) + crypto_ctxsize(alg, type, mask); in __crypto_alloc_tfmgfp()
421 struct crypto_tfm *__crypto_alloc_tfm(struct crypto_alg *alg, u32 type, in __crypto_alloc_tfm() argument
424 return __crypto_alloc_tfmgfp(alg, type, mask, GFP_KERNEL); in __crypto_alloc_tfm()
450 struct crypto_tfm *crypto_alloc_base(const char *alg_name, u32 type, u32 mask) in crypto_alloc_base() argument
458 alg = crypto_alg_mod_lookup(alg_name, type, mask); in crypto_alloc_base()
464 tfm = __crypto_alloc_tfm(alg, type, mask); in crypto_alloc_base()
571 u32 type, u32 mask) in crypto_find_alg() argument
574 type &= frontend->maskclear; in crypto_find_alg()
576 type |= frontend->type; in crypto_find_alg()
580 return crypto_alg_mod_lookup(alg_name, type, mask); in crypto_find_alg()
608 const struct crypto_type *frontend, u32 type, u32 mask, in crypto_alloc_tfm_node() argument
617 alg = crypto_find_alg(alg_name, frontend, type, mask); in crypto_alloc_tfm_node()
670 int crypto_has_alg(const char *name, u32 type, u32 mask) in crypto_has_alg() argument
673 struct crypto_alg *alg = crypto_alg_mod_lookup(name, type, mask); in crypto_has_alg()