Lines Matching refs:alg

38 	struct crypto_alg *q, *alg = NULL;
63 alg = q;
69 return alg;
72 static int crypto_report_cipher(struct sk_buff *skb, struct crypto_alg *alg)
80 rcipher.blocksize = alg->cra_blocksize;
81 rcipher.min_keysize = alg->cra_cipher.cia_min_keysize;
82 rcipher.max_keysize = alg->cra_cipher.cia_max_keysize;
88 static int crypto_report_comp(struct sk_buff *skb, struct crypto_alg *alg)
99 static int crypto_report_one(struct crypto_alg *alg,
104 strscpy(ualg->cru_name, alg->cra_name, sizeof(ualg->cru_name));
105 strscpy(ualg->cru_driver_name, alg->cra_driver_name,
107 strscpy(ualg->cru_module_name, module_name(alg->cra_module),
112 ualg->cru_flags = alg->cra_flags;
113 ualg->cru_refcnt = refcount_read(&alg->cra_refcnt);
115 if (nla_put_u32(skb, CRYPTOCFGA_PRIORITY_VAL, alg->cra_priority))
117 if (alg->cra_flags & CRYPTO_ALG_LARVAL) {
127 if (alg->cra_type && alg->cra_type->report) {
128 if (alg->cra_type->report(skb, alg))
134 switch (alg->cra_flags & (CRYPTO_ALG_TYPE_MASK | CRYPTO_ALG_LARVAL)) {
136 if (crypto_report_cipher(skb, alg))
141 if (crypto_report_comp(skb, alg))
154 static int crypto_report_alg(struct crypto_alg *alg,
172 err = crypto_report_one(alg, ualg, skb);
189 struct crypto_alg *alg;
197 alg = crypto_alg_match(p, 0);
198 if (!alg)
211 err = crypto_report_alg(alg, &info);
214 crypto_mod_put(alg);
229 struct crypto_alg *alg;
238 list_for_each_entry(alg, &crypto_alg_list, cra_list) {
240 res = crypto_report_alg(alg, &info);
263 struct crypto_alg *alg;
277 alg = crypto_alg_match(p, 1);
278 if (!alg)
283 crypto_remove_spawns(alg, &list, NULL);
286 alg->cra_priority = nla_get_u32(priority);
290 crypto_mod_put(alg);
299 struct crypto_alg *alg;
309 alg = crypto_alg_match(p, 1);
310 if (!alg)
319 if (!(alg->cra_flags & CRYPTO_ALG_INSTANCE))
323 if (refcount_read(&alg->cra_refcnt) > 2)
326 crypto_unregister_instance((struct crypto_instance *)alg);
330 crypto_mod_put(alg);
339 struct crypto_alg *alg;
355 alg = crypto_alg_match(p, exact);
356 if (alg) {
357 crypto_mod_put(alg);
366 alg = crypto_alg_mod_lookup(name, p->cru_type, p->cru_mask);
367 if (IS_ERR(alg))
368 return PTR_ERR(alg);
373 alg->cra_priority = nla_get_u32(priority);
377 crypto_mod_put(alg);
439 struct crypto_alg *alg;
446 list_for_each_entry(alg, &crypto_alg_list, cra_list)