Lines Matching refs:mask
61 u32 mask) in __crypto_alg_lookup() argument
72 if ((q->cra_flags ^ type) & mask) in __crypto_alg_lookup()
77 ((struct crypto_larval *)q)->mask != mask) in __crypto_alg_lookup()
110 struct crypto_larval *crypto_larval_alloc(const char *name, u32 type, u32 mask) in crypto_larval_alloc() argument
118 larval->mask = mask; in crypto_larval_alloc()
131 u32 mask) in crypto_larval_add() argument
136 larval = crypto_larval_alloc(name, type, mask); in crypto_larval_add()
143 alg = __crypto_alg_lookup(name, type, mask); in crypto_larval_add()
196 struct crypto_alg *crypto_alg_lookup(const char *name, u32 type, u32 mask) in crypto_alg_lookup() argument
201 alg = __crypto_alg_lookup(name, type, mask); in crypto_alg_lookup()
208 struct crypto_alg *crypto_larval_lookup(const char *name, u32 type, u32 mask) in crypto_larval_lookup() argument
215 mask &= ~(CRYPTO_ALG_LARVAL | CRYPTO_ALG_DEAD); in crypto_larval_lookup()
216 type &= mask; in crypto_larval_lookup()
218 alg = crypto_alg_lookup(name, type, mask); in crypto_larval_lookup()
222 if (!((type ^ CRYPTO_ALG_NEED_FALLBACK) & mask & in crypto_larval_lookup()
226 alg = crypto_alg_lookup(name, type, mask); in crypto_larval_lookup()
232 return crypto_larval_add(name, type, mask); in crypto_larval_lookup()
250 struct crypto_alg *crypto_alg_mod_lookup(const char *name, u32 type, u32 mask) in crypto_alg_mod_lookup() argument
256 if (!((type | mask) & CRYPTO_ALG_TESTED)) { in crypto_alg_mod_lookup()
258 mask |= CRYPTO_ALG_TESTED; in crypto_alg_mod_lookup()
268 if (!((type | mask) & CRYPTO_ALG_INTERNAL)) in crypto_alg_mod_lookup()
269 mask |= CRYPTO_ALG_INTERNAL; in crypto_alg_mod_lookup()
271 larval = crypto_larval_lookup(name, type, mask); in crypto_alg_mod_lookup()
288 static int crypto_init_ops(struct crypto_tfm *tfm, u32 type, u32 mask) in crypto_init_ops() argument
293 return type_obj->init(tfm, type, mask); in crypto_init_ops()
334 static unsigned int crypto_ctxsize(struct crypto_alg *alg, u32 type, u32 mask) in crypto_ctxsize() argument
341 return len + type_obj->ctxsize(alg, type, mask); in crypto_ctxsize()
368 u32 mask) in __crypto_alloc_tfm() argument
374 tfm_size = sizeof(*tfm) + crypto_ctxsize(alg, type, mask); in __crypto_alloc_tfm()
381 err = crypto_init_ops(tfm, type, mask); in __crypto_alloc_tfm()
425 struct crypto_tfm *crypto_alloc_base(const char *alg_name, u32 type, u32 mask) in crypto_alloc_base() argument
433 alg = crypto_alg_mod_lookup(alg_name, type, mask); in crypto_alloc_base()
439 tfm = __crypto_alloc_tfm(alg, type, mask); in crypto_alloc_base()
502 u32 type, u32 mask) in crypto_find_alg() argument
504 struct crypto_alg *(*lookup)(const char *name, u32 type, u32 mask) = in crypto_find_alg()
509 mask &= frontend->maskclear; in crypto_find_alg()
511 mask |= frontend->maskset; in crypto_find_alg()
517 return lookup(alg_name, type, mask); in crypto_find_alg()
542 const struct crypto_type *frontend, u32 type, u32 mask) in crypto_alloc_tfm() argument
550 alg = crypto_find_alg(alg_name, frontend, type, mask); in crypto_alloc_tfm()
601 int crypto_has_alg(const char *name, u32 type, u32 mask) in crypto_has_alg() argument
604 struct crypto_alg *alg = crypto_alg_mod_lookup(name, type, mask); in crypto_has_alg()