Lines Matching refs:alg

31 static int crypto_report_aead(struct sk_buff *skb, struct crypto_alg *alg)  in crypto_report_aead()  argument
39 raead.stat_encrypt_cnt = atomic64_read(&alg->stats.aead.encrypt_cnt); in crypto_report_aead()
40 raead.stat_encrypt_tlen = atomic64_read(&alg->stats.aead.encrypt_tlen); in crypto_report_aead()
41 raead.stat_decrypt_cnt = atomic64_read(&alg->stats.aead.decrypt_cnt); in crypto_report_aead()
42 raead.stat_decrypt_tlen = atomic64_read(&alg->stats.aead.decrypt_tlen); in crypto_report_aead()
43 raead.stat_err_cnt = atomic64_read(&alg->stats.aead.err_cnt); in crypto_report_aead()
48 static int crypto_report_cipher(struct sk_buff *skb, struct crypto_alg *alg) in crypto_report_cipher() argument
56 rcipher.stat_encrypt_cnt = atomic64_read(&alg->stats.cipher.encrypt_cnt); in crypto_report_cipher()
57 rcipher.stat_encrypt_tlen = atomic64_read(&alg->stats.cipher.encrypt_tlen); in crypto_report_cipher()
58 rcipher.stat_decrypt_cnt = atomic64_read(&alg->stats.cipher.decrypt_cnt); in crypto_report_cipher()
59 rcipher.stat_decrypt_tlen = atomic64_read(&alg->stats.cipher.decrypt_tlen); in crypto_report_cipher()
60 rcipher.stat_err_cnt = atomic64_read(&alg->stats.cipher.err_cnt); in crypto_report_cipher()
65 static int crypto_report_comp(struct sk_buff *skb, struct crypto_alg *alg) in crypto_report_comp() argument
72 rcomp.stat_compress_cnt = atomic64_read(&alg->stats.compress.compress_cnt); in crypto_report_comp()
73 rcomp.stat_compress_tlen = atomic64_read(&alg->stats.compress.compress_tlen); in crypto_report_comp()
74 rcomp.stat_decompress_cnt = atomic64_read(&alg->stats.compress.decompress_cnt); in crypto_report_comp()
75 rcomp.stat_decompress_tlen = atomic64_read(&alg->stats.compress.decompress_tlen); in crypto_report_comp()
76 rcomp.stat_err_cnt = atomic64_read(&alg->stats.compress.err_cnt); in crypto_report_comp()
81 static int crypto_report_acomp(struct sk_buff *skb, struct crypto_alg *alg) in crypto_report_acomp() argument
88 racomp.stat_compress_cnt = atomic64_read(&alg->stats.compress.compress_cnt); in crypto_report_acomp()
89 racomp.stat_compress_tlen = atomic64_read(&alg->stats.compress.compress_tlen); in crypto_report_acomp()
90 racomp.stat_decompress_cnt = atomic64_read(&alg->stats.compress.decompress_cnt); in crypto_report_acomp()
91 racomp.stat_decompress_tlen = atomic64_read(&alg->stats.compress.decompress_tlen); in crypto_report_acomp()
92 racomp.stat_err_cnt = atomic64_read(&alg->stats.compress.err_cnt); in crypto_report_acomp()
97 static int crypto_report_akcipher(struct sk_buff *skb, struct crypto_alg *alg) in crypto_report_akcipher() argument
104 rakcipher.stat_encrypt_cnt = atomic64_read(&alg->stats.akcipher.encrypt_cnt); in crypto_report_akcipher()
105 rakcipher.stat_encrypt_tlen = atomic64_read(&alg->stats.akcipher.encrypt_tlen); in crypto_report_akcipher()
106 rakcipher.stat_decrypt_cnt = atomic64_read(&alg->stats.akcipher.decrypt_cnt); in crypto_report_akcipher()
107 rakcipher.stat_decrypt_tlen = atomic64_read(&alg->stats.akcipher.decrypt_tlen); in crypto_report_akcipher()
108 rakcipher.stat_sign_cnt = atomic64_read(&alg->stats.akcipher.sign_cnt); in crypto_report_akcipher()
109 rakcipher.stat_verify_cnt = atomic64_read(&alg->stats.akcipher.verify_cnt); in crypto_report_akcipher()
110 rakcipher.stat_err_cnt = atomic64_read(&alg->stats.akcipher.err_cnt); in crypto_report_akcipher()
116 static int crypto_report_kpp(struct sk_buff *skb, struct crypto_alg *alg) in crypto_report_kpp() argument
124 rkpp.stat_setsecret_cnt = atomic64_read(&alg->stats.kpp.setsecret_cnt); in crypto_report_kpp()
125 rkpp.stat_generate_public_key_cnt = atomic64_read(&alg->stats.kpp.generate_public_key_cnt); in crypto_report_kpp()
126 rkpp.stat_compute_shared_secret_cnt = atomic64_read(&alg->stats.kpp.compute_shared_secret_cnt); in crypto_report_kpp()
127 rkpp.stat_err_cnt = atomic64_read(&alg->stats.kpp.err_cnt); in crypto_report_kpp()
132 static int crypto_report_ahash(struct sk_buff *skb, struct crypto_alg *alg) in crypto_report_ahash() argument
140 rhash.stat_hash_cnt = atomic64_read(&alg->stats.hash.hash_cnt); in crypto_report_ahash()
141 rhash.stat_hash_tlen = atomic64_read(&alg->stats.hash.hash_tlen); in crypto_report_ahash()
142 rhash.stat_err_cnt = atomic64_read(&alg->stats.hash.err_cnt); in crypto_report_ahash()
147 static int crypto_report_shash(struct sk_buff *skb, struct crypto_alg *alg) in crypto_report_shash() argument
155 rhash.stat_hash_cnt = atomic64_read(&alg->stats.hash.hash_cnt); in crypto_report_shash()
156 rhash.stat_hash_tlen = atomic64_read(&alg->stats.hash.hash_tlen); in crypto_report_shash()
157 rhash.stat_err_cnt = atomic64_read(&alg->stats.hash.err_cnt); in crypto_report_shash()
162 static int crypto_report_rng(struct sk_buff *skb, struct crypto_alg *alg) in crypto_report_rng() argument
170 rrng.stat_generate_cnt = atomic64_read(&alg->stats.rng.generate_cnt); in crypto_report_rng()
171 rrng.stat_generate_tlen = atomic64_read(&alg->stats.rng.generate_tlen); in crypto_report_rng()
172 rrng.stat_seed_cnt = atomic64_read(&alg->stats.rng.seed_cnt); in crypto_report_rng()
173 rrng.stat_err_cnt = atomic64_read(&alg->stats.rng.err_cnt); in crypto_report_rng()
178 static int crypto_reportstat_one(struct crypto_alg *alg, in crypto_reportstat_one() argument
184 strscpy(ualg->cru_name, alg->cra_name, sizeof(ualg->cru_name)); in crypto_reportstat_one()
185 strscpy(ualg->cru_driver_name, alg->cra_driver_name, in crypto_reportstat_one()
187 strscpy(ualg->cru_module_name, module_name(alg->cra_module), in crypto_reportstat_one()
192 ualg->cru_flags = alg->cra_flags; in crypto_reportstat_one()
193 ualg->cru_refcnt = refcount_read(&alg->cra_refcnt); in crypto_reportstat_one()
195 if (nla_put_u32(skb, CRYPTOCFGA_PRIORITY_VAL, alg->cra_priority)) in crypto_reportstat_one()
197 if (alg->cra_flags & CRYPTO_ALG_LARVAL) { in crypto_reportstat_one()
207 switch (alg->cra_flags & (CRYPTO_ALG_TYPE_MASK | CRYPTO_ALG_LARVAL)) { in crypto_reportstat_one()
209 if (crypto_report_aead(skb, alg)) in crypto_reportstat_one()
213 if (crypto_report_cipher(skb, alg)) in crypto_reportstat_one()
217 if (crypto_report_cipher(skb, alg)) in crypto_reportstat_one()
221 if (crypto_report_comp(skb, alg)) in crypto_reportstat_one()
225 if (crypto_report_acomp(skb, alg)) in crypto_reportstat_one()
229 if (crypto_report_acomp(skb, alg)) in crypto_reportstat_one()
233 if (crypto_report_akcipher(skb, alg)) in crypto_reportstat_one()
237 if (crypto_report_kpp(skb, alg)) in crypto_reportstat_one()
241 if (crypto_report_ahash(skb, alg)) in crypto_reportstat_one()
245 if (crypto_report_shash(skb, alg)) in crypto_reportstat_one()
249 if (crypto_report_rng(skb, alg)) in crypto_reportstat_one()
254 alg->cra_flags & (CRYPTO_ALG_TYPE_MASK | CRYPTO_ALG_LARVAL), in crypto_reportstat_one()
265 static int crypto_reportstat_alg(struct crypto_alg *alg, in crypto_reportstat_alg() argument
283 err = crypto_reportstat_one(alg, ualg, skb); in crypto_reportstat_alg()
300 struct crypto_alg *alg; in crypto_reportstat() local
308 alg = crypto_alg_match(p, 0); in crypto_reportstat()
309 if (!alg) in crypto_reportstat()
322 err = crypto_reportstat_alg(alg, &info); in crypto_reportstat()
325 crypto_mod_put(alg); in crypto_reportstat()