diff options
author | Corentin Labbe <clabbe@baylibre.com> | 2018-11-29 09:42:25 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2018-12-07 01:15:00 -0500 |
commit | 44f13133cb03ec32fc88a533673248ef5c0617e3 (patch) | |
tree | 9ce261d1e9add7e4316e5a2b6221fba77e683cc2 /crypto | |
parent | 17c18f9e33282a170458cb5ea20759bfcb0da7d8 (diff) |
crypto: user - rename err_cnt parameter
Since now all crypto stats are on their own structures, it is now
useless to have the algorithm name in the err_cnt member.
Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/algapi.c | 38 | ||||
-rw-r--r-- | crypto/crypto_user_stat.c | 18 |
2 files changed, 28 insertions, 28 deletions
diff --git a/crypto/algapi.c b/crypto/algapi.c index a8cb5aed0069..c0d4f9ef6b0f 100644 --- a/crypto/algapi.c +++ b/crypto/algapi.c | |||
@@ -1083,7 +1083,7 @@ void crypto_stats_ablkcipher_encrypt(unsigned int nbytes, int ret, | |||
1083 | struct crypto_alg *alg) | 1083 | struct crypto_alg *alg) |
1084 | { | 1084 | { |
1085 | if (ret && ret != -EINPROGRESS && ret != -EBUSY) { | 1085 | if (ret && ret != -EINPROGRESS && ret != -EBUSY) { |
1086 | atomic64_inc(&alg->stats.cipher.cipher_err_cnt); | 1086 | atomic64_inc(&alg->stats.cipher.err_cnt); |
1087 | } else { | 1087 | } else { |
1088 | atomic64_inc(&alg->stats.cipher.encrypt_cnt); | 1088 | atomic64_inc(&alg->stats.cipher.encrypt_cnt); |
1089 | atomic64_add(nbytes, &alg->stats.cipher.encrypt_tlen); | 1089 | atomic64_add(nbytes, &alg->stats.cipher.encrypt_tlen); |
@@ -1096,7 +1096,7 @@ void crypto_stats_ablkcipher_decrypt(unsigned int nbytes, int ret, | |||
1096 | struct crypto_alg *alg) | 1096 | struct crypto_alg *alg) |
1097 | { | 1097 | { |
1098 | if (ret && ret != -EINPROGRESS && ret != -EBUSY) { | 1098 | if (ret && ret != -EINPROGRESS && ret != -EBUSY) { |
1099 | atomic64_inc(&alg->stats.cipher.cipher_err_cnt); | 1099 | atomic64_inc(&alg->stats.cipher.err_cnt); |
1100 | } else { | 1100 | } else { |
1101 | atomic64_inc(&alg->stats.cipher.decrypt_cnt); | 1101 | atomic64_inc(&alg->stats.cipher.decrypt_cnt); |
1102 | atomic64_add(nbytes, &alg->stats.cipher.decrypt_tlen); | 1102 | atomic64_add(nbytes, &alg->stats.cipher.decrypt_tlen); |
@@ -1109,7 +1109,7 @@ void crypto_stats_aead_encrypt(unsigned int cryptlen, struct crypto_alg *alg, | |||
1109 | int ret) | 1109 | int ret) |
1110 | { | 1110 | { |
1111 | if (ret && ret != -EINPROGRESS && ret != -EBUSY) { | 1111 | if (ret && ret != -EINPROGRESS && ret != -EBUSY) { |
1112 | atomic64_inc(&alg->stats.aead.aead_err_cnt); | 1112 | atomic64_inc(&alg->stats.aead.err_cnt); |
1113 | } else { | 1113 | } else { |
1114 | atomic64_inc(&alg->stats.aead.encrypt_cnt); | 1114 | atomic64_inc(&alg->stats.aead.encrypt_cnt); |
1115 | atomic64_add(cryptlen, &alg->stats.aead.encrypt_tlen); | 1115 | atomic64_add(cryptlen, &alg->stats.aead.encrypt_tlen); |
@@ -1122,7 +1122,7 @@ void crypto_stats_aead_decrypt(unsigned int cryptlen, struct crypto_alg *alg, | |||
1122 | int ret) | 1122 | int ret) |
1123 | { | 1123 | { |
1124 | if (ret && ret != -EINPROGRESS && ret != -EBUSY) { | 1124 | if (ret && ret != -EINPROGRESS && ret != -EBUSY) { |
1125 | atomic64_inc(&alg->stats.aead.aead_err_cnt); | 1125 | atomic64_inc(&alg->stats.aead.err_cnt); |
1126 | } else { | 1126 | } else { |
1127 | atomic64_inc(&alg->stats.aead.decrypt_cnt); | 1127 | atomic64_inc(&alg->stats.aead.decrypt_cnt); |
1128 | atomic64_add(cryptlen, &alg->stats.aead.decrypt_tlen); | 1128 | atomic64_add(cryptlen, &alg->stats.aead.decrypt_tlen); |
@@ -1135,7 +1135,7 @@ void crypto_stats_akcipher_encrypt(unsigned int src_len, int ret, | |||
1135 | struct crypto_alg *alg) | 1135 | struct crypto_alg *alg) |
1136 | { | 1136 | { |
1137 | if (ret && ret != -EINPROGRESS && ret != -EBUSY) { | 1137 | if (ret && ret != -EINPROGRESS && ret != -EBUSY) { |
1138 | atomic64_inc(&alg->stats.akcipher.akcipher_err_cnt); | 1138 | atomic64_inc(&alg->stats.akcipher.err_cnt); |
1139 | } else { | 1139 | } else { |
1140 | atomic64_inc(&alg->stats.akcipher.encrypt_cnt); | 1140 | atomic64_inc(&alg->stats.akcipher.encrypt_cnt); |
1141 | atomic64_add(src_len, &alg->stats.akcipher.encrypt_tlen); | 1141 | atomic64_add(src_len, &alg->stats.akcipher.encrypt_tlen); |
@@ -1148,7 +1148,7 @@ void crypto_stats_akcipher_decrypt(unsigned int src_len, int ret, | |||
1148 | struct crypto_alg *alg) | 1148 | struct crypto_alg *alg) |
1149 | { | 1149 | { |
1150 | if (ret && ret != -EINPROGRESS && ret != -EBUSY) { | 1150 | if (ret && ret != -EINPROGRESS && ret != -EBUSY) { |
1151 | atomic64_inc(&alg->stats.akcipher.akcipher_err_cnt); | 1151 | atomic64_inc(&alg->stats.akcipher.err_cnt); |
1152 | } else { | 1152 | } else { |
1153 | atomic64_inc(&alg->stats.akcipher.decrypt_cnt); | 1153 | atomic64_inc(&alg->stats.akcipher.decrypt_cnt); |
1154 | atomic64_add(src_len, &alg->stats.akcipher.decrypt_tlen); | 1154 | atomic64_add(src_len, &alg->stats.akcipher.decrypt_tlen); |
@@ -1160,7 +1160,7 @@ EXPORT_SYMBOL_GPL(crypto_stats_akcipher_decrypt); | |||
1160 | void crypto_stats_akcipher_sign(int ret, struct crypto_alg *alg) | 1160 | void crypto_stats_akcipher_sign(int ret, struct crypto_alg *alg) |
1161 | { | 1161 | { |
1162 | if (ret && ret != -EINPROGRESS && ret != -EBUSY) | 1162 | if (ret && ret != -EINPROGRESS && ret != -EBUSY) |
1163 | atomic64_inc(&alg->stats.akcipher.akcipher_err_cnt); | 1163 | atomic64_inc(&alg->stats.akcipher.err_cnt); |
1164 | else | 1164 | else |
1165 | atomic64_inc(&alg->stats.akcipher.sign_cnt); | 1165 | atomic64_inc(&alg->stats.akcipher.sign_cnt); |
1166 | crypto_alg_put(alg); | 1166 | crypto_alg_put(alg); |
@@ -1170,7 +1170,7 @@ EXPORT_SYMBOL_GPL(crypto_stats_akcipher_sign); | |||
1170 | void crypto_stats_akcipher_verify(int ret, struct crypto_alg *alg) | 1170 | void crypto_stats_akcipher_verify(int ret, struct crypto_alg *alg) |
1171 | { | 1171 | { |
1172 | if (ret && ret != -EINPROGRESS && ret != -EBUSY) | 1172 | if (ret && ret != -EINPROGRESS && ret != -EBUSY) |
1173 | atomic64_inc(&alg->stats.akcipher.akcipher_err_cnt); | 1173 | atomic64_inc(&alg->stats.akcipher.err_cnt); |
1174 | else | 1174 | else |
1175 | atomic64_inc(&alg->stats.akcipher.verify_cnt); | 1175 | atomic64_inc(&alg->stats.akcipher.verify_cnt); |
1176 | crypto_alg_put(alg); | 1176 | crypto_alg_put(alg); |
@@ -1180,7 +1180,7 @@ EXPORT_SYMBOL_GPL(crypto_stats_akcipher_verify); | |||
1180 | void crypto_stats_compress(unsigned int slen, int ret, struct crypto_alg *alg) | 1180 | void crypto_stats_compress(unsigned int slen, int ret, struct crypto_alg *alg) |
1181 | { | 1181 | { |
1182 | if (ret && ret != -EINPROGRESS && ret != -EBUSY) { | 1182 | if (ret && ret != -EINPROGRESS && ret != -EBUSY) { |
1183 | atomic64_inc(&alg->stats.compress.compress_err_cnt); | 1183 | atomic64_inc(&alg->stats.compress.err_cnt); |
1184 | } else { | 1184 | } else { |
1185 | atomic64_inc(&alg->stats.compress.compress_cnt); | 1185 | atomic64_inc(&alg->stats.compress.compress_cnt); |
1186 | atomic64_add(slen, &alg->stats.compress.compress_tlen); | 1186 | atomic64_add(slen, &alg->stats.compress.compress_tlen); |
@@ -1192,7 +1192,7 @@ EXPORT_SYMBOL_GPL(crypto_stats_compress); | |||
1192 | void crypto_stats_decompress(unsigned int slen, int ret, struct crypto_alg *alg) | 1192 | void crypto_stats_decompress(unsigned int slen, int ret, struct crypto_alg *alg) |
1193 | { | 1193 | { |
1194 | if (ret && ret != -EINPROGRESS && ret != -EBUSY) { | 1194 | if (ret && ret != -EINPROGRESS && ret != -EBUSY) { |
1195 | atomic64_inc(&alg->stats.compress.compress_err_cnt); | 1195 | atomic64_inc(&alg->stats.compress.err_cnt); |
1196 | } else { | 1196 | } else { |
1197 | atomic64_inc(&alg->stats.compress.decompress_cnt); | 1197 | atomic64_inc(&alg->stats.compress.decompress_cnt); |
1198 | atomic64_add(slen, &alg->stats.compress.decompress_tlen); | 1198 | atomic64_add(slen, &alg->stats.compress.decompress_tlen); |
@@ -1205,7 +1205,7 @@ void crypto_stats_ahash_update(unsigned int nbytes, int ret, | |||
1205 | struct crypto_alg *alg) | 1205 | struct crypto_alg *alg) |
1206 | { | 1206 | { |
1207 | if (ret && ret != -EINPROGRESS && ret != -EBUSY) | 1207 | if (ret && ret != -EINPROGRESS && ret != -EBUSY) |
1208 | atomic64_inc(&alg->stats.hash.hash_err_cnt); | 1208 | atomic64_inc(&alg->stats.hash.err_cnt); |
1209 | else | 1209 | else |
1210 | atomic64_add(nbytes, &alg->stats.hash.hash_tlen); | 1210 | atomic64_add(nbytes, &alg->stats.hash.hash_tlen); |
1211 | crypto_alg_put(alg); | 1211 | crypto_alg_put(alg); |
@@ -1216,7 +1216,7 @@ void crypto_stats_ahash_final(unsigned int nbytes, int ret, | |||
1216 | struct crypto_alg *alg) | 1216 | struct crypto_alg *alg) |
1217 | { | 1217 | { |
1218 | if (ret && ret != -EINPROGRESS && ret != -EBUSY) { | 1218 | if (ret && ret != -EINPROGRESS && ret != -EBUSY) { |
1219 | atomic64_inc(&alg->stats.hash.hash_err_cnt); | 1219 | atomic64_inc(&alg->stats.hash.err_cnt); |
1220 | } else { | 1220 | } else { |
1221 | atomic64_inc(&alg->stats.hash.hash_cnt); | 1221 | atomic64_inc(&alg->stats.hash.hash_cnt); |
1222 | atomic64_add(nbytes, &alg->stats.hash.hash_tlen); | 1222 | atomic64_add(nbytes, &alg->stats.hash.hash_tlen); |
@@ -1228,7 +1228,7 @@ EXPORT_SYMBOL_GPL(crypto_stats_ahash_final); | |||
1228 | void crypto_stats_kpp_set_secret(struct crypto_alg *alg, int ret) | 1228 | void crypto_stats_kpp_set_secret(struct crypto_alg *alg, int ret) |
1229 | { | 1229 | { |
1230 | if (ret) | 1230 | if (ret) |
1231 | atomic64_inc(&alg->stats.kpp.kpp_err_cnt); | 1231 | atomic64_inc(&alg->stats.kpp.err_cnt); |
1232 | else | 1232 | else |
1233 | atomic64_inc(&alg->stats.kpp.setsecret_cnt); | 1233 | atomic64_inc(&alg->stats.kpp.setsecret_cnt); |
1234 | crypto_alg_put(alg); | 1234 | crypto_alg_put(alg); |
@@ -1238,7 +1238,7 @@ EXPORT_SYMBOL_GPL(crypto_stats_kpp_set_secret); | |||
1238 | void crypto_stats_kpp_generate_public_key(struct crypto_alg *alg, int ret) | 1238 | void crypto_stats_kpp_generate_public_key(struct crypto_alg *alg, int ret) |
1239 | { | 1239 | { |
1240 | if (ret) | 1240 | if (ret) |
1241 | atomic64_inc(&alg->stats.kpp.kpp_err_cnt); | 1241 | atomic64_inc(&alg->stats.kpp.err_cnt); |
1242 | else | 1242 | else |
1243 | atomic64_inc(&alg->stats.kpp.generate_public_key_cnt); | 1243 | atomic64_inc(&alg->stats.kpp.generate_public_key_cnt); |
1244 | crypto_alg_put(alg); | 1244 | crypto_alg_put(alg); |
@@ -1248,7 +1248,7 @@ EXPORT_SYMBOL_GPL(crypto_stats_kpp_generate_public_key); | |||
1248 | void crypto_stats_kpp_compute_shared_secret(struct crypto_alg *alg, int ret) | 1248 | void crypto_stats_kpp_compute_shared_secret(struct crypto_alg *alg, int ret) |
1249 | { | 1249 | { |
1250 | if (ret) | 1250 | if (ret) |
1251 | atomic64_inc(&alg->stats.kpp.kpp_err_cnt); | 1251 | atomic64_inc(&alg->stats.kpp.err_cnt); |
1252 | else | 1252 | else |
1253 | atomic64_inc(&alg->stats.kpp.compute_shared_secret_cnt); | 1253 | atomic64_inc(&alg->stats.kpp.compute_shared_secret_cnt); |
1254 | crypto_alg_put(alg); | 1254 | crypto_alg_put(alg); |
@@ -1258,7 +1258,7 @@ EXPORT_SYMBOL_GPL(crypto_stats_kpp_compute_shared_secret); | |||
1258 | void crypto_stats_rng_seed(struct crypto_alg *alg, int ret) | 1258 | void crypto_stats_rng_seed(struct crypto_alg *alg, int ret) |
1259 | { | 1259 | { |
1260 | if (ret && ret != -EINPROGRESS && ret != -EBUSY) | 1260 | if (ret && ret != -EINPROGRESS && ret != -EBUSY) |
1261 | atomic64_inc(&alg->stats.rng.rng_err_cnt); | 1261 | atomic64_inc(&alg->stats.rng.err_cnt); |
1262 | else | 1262 | else |
1263 | atomic64_inc(&alg->stats.rng.seed_cnt); | 1263 | atomic64_inc(&alg->stats.rng.seed_cnt); |
1264 | crypto_alg_put(alg); | 1264 | crypto_alg_put(alg); |
@@ -1269,7 +1269,7 @@ void crypto_stats_rng_generate(struct crypto_alg *alg, unsigned int dlen, | |||
1269 | int ret) | 1269 | int ret) |
1270 | { | 1270 | { |
1271 | if (ret && ret != -EINPROGRESS && ret != -EBUSY) { | 1271 | if (ret && ret != -EINPROGRESS && ret != -EBUSY) { |
1272 | atomic64_inc(&alg->stats.rng.rng_err_cnt); | 1272 | atomic64_inc(&alg->stats.rng.err_cnt); |
1273 | } else { | 1273 | } else { |
1274 | atomic64_inc(&alg->stats.rng.generate_cnt); | 1274 | atomic64_inc(&alg->stats.rng.generate_cnt); |
1275 | atomic64_add(dlen, &alg->stats.rng.generate_tlen); | 1275 | atomic64_add(dlen, &alg->stats.rng.generate_tlen); |
@@ -1282,7 +1282,7 @@ void crypto_stats_skcipher_encrypt(unsigned int cryptlen, int ret, | |||
1282 | struct crypto_alg *alg) | 1282 | struct crypto_alg *alg) |
1283 | { | 1283 | { |
1284 | if (ret && ret != -EINPROGRESS && ret != -EBUSY) { | 1284 | if (ret && ret != -EINPROGRESS && ret != -EBUSY) { |
1285 | atomic64_inc(&alg->stats.cipher.cipher_err_cnt); | 1285 | atomic64_inc(&alg->stats.cipher.err_cnt); |
1286 | } else { | 1286 | } else { |
1287 | atomic64_inc(&alg->stats.cipher.encrypt_cnt); | 1287 | atomic64_inc(&alg->stats.cipher.encrypt_cnt); |
1288 | atomic64_add(cryptlen, &alg->stats.cipher.encrypt_tlen); | 1288 | atomic64_add(cryptlen, &alg->stats.cipher.encrypt_tlen); |
@@ -1295,7 +1295,7 @@ void crypto_stats_skcipher_decrypt(unsigned int cryptlen, int ret, | |||
1295 | struct crypto_alg *alg) | 1295 | struct crypto_alg *alg) |
1296 | { | 1296 | { |
1297 | if (ret && ret != -EINPROGRESS && ret != -EBUSY) { | 1297 | if (ret && ret != -EINPROGRESS && ret != -EBUSY) { |
1298 | atomic64_inc(&alg->stats.cipher.cipher_err_cnt); | 1298 | atomic64_inc(&alg->stats.cipher.err_cnt); |
1299 | } else { | 1299 | } else { |
1300 | atomic64_inc(&alg->stats.cipher.decrypt_cnt); | 1300 | atomic64_inc(&alg->stats.cipher.decrypt_cnt); |
1301 | atomic64_add(cryptlen, &alg->stats.cipher.decrypt_tlen); | 1301 | atomic64_add(cryptlen, &alg->stats.cipher.decrypt_tlen); |
diff --git a/crypto/crypto_user_stat.c b/crypto/crypto_user_stat.c index 113bf1691560..0ba00aaeb810 100644 --- a/crypto/crypto_user_stat.c +++ b/crypto/crypto_user_stat.c | |||
@@ -43,7 +43,7 @@ static int crypto_report_aead(struct sk_buff *skb, struct crypto_alg *alg) | |||
43 | raead.stat_encrypt_tlen = atomic64_read(&alg->stats.aead.encrypt_tlen); | 43 | raead.stat_encrypt_tlen = atomic64_read(&alg->stats.aead.encrypt_tlen); |
44 | raead.stat_decrypt_cnt = atomic64_read(&alg->stats.aead.decrypt_cnt); | 44 | raead.stat_decrypt_cnt = atomic64_read(&alg->stats.aead.decrypt_cnt); |
45 | raead.stat_decrypt_tlen = atomic64_read(&alg->stats.aead.decrypt_tlen); | 45 | raead.stat_decrypt_tlen = atomic64_read(&alg->stats.aead.decrypt_tlen); |
46 | raead.stat_aead_err_cnt = atomic64_read(&alg->stats.aead.aead_err_cnt); | 46 | raead.stat_err_cnt = atomic64_read(&alg->stats.aead.err_cnt); |
47 | 47 | ||
48 | return nla_put(skb, CRYPTOCFGA_STAT_AEAD, sizeof(raead), &raead); | 48 | return nla_put(skb, CRYPTOCFGA_STAT_AEAD, sizeof(raead), &raead); |
49 | } | 49 | } |
@@ -60,7 +60,7 @@ static int crypto_report_cipher(struct sk_buff *skb, struct crypto_alg *alg) | |||
60 | rcipher.stat_encrypt_tlen = atomic64_read(&alg->stats.cipher.encrypt_tlen); | 60 | rcipher.stat_encrypt_tlen = atomic64_read(&alg->stats.cipher.encrypt_tlen); |
61 | rcipher.stat_decrypt_cnt = atomic64_read(&alg->stats.cipher.decrypt_cnt); | 61 | rcipher.stat_decrypt_cnt = atomic64_read(&alg->stats.cipher.decrypt_cnt); |
62 | rcipher.stat_decrypt_tlen = atomic64_read(&alg->stats.cipher.decrypt_tlen); | 62 | rcipher.stat_decrypt_tlen = atomic64_read(&alg->stats.cipher.decrypt_tlen); |
63 | rcipher.stat_cipher_err_cnt = atomic64_read(&alg->stats.cipher.cipher_err_cnt); | 63 | rcipher.stat_err_cnt = atomic64_read(&alg->stats.cipher.err_cnt); |
64 | 64 | ||
65 | return nla_put(skb, CRYPTOCFGA_STAT_CIPHER, sizeof(rcipher), &rcipher); | 65 | return nla_put(skb, CRYPTOCFGA_STAT_CIPHER, sizeof(rcipher), &rcipher); |
66 | } | 66 | } |
@@ -76,7 +76,7 @@ static int crypto_report_comp(struct sk_buff *skb, struct crypto_alg *alg) | |||
76 | rcomp.stat_compress_tlen = atomic64_read(&alg->stats.compress.compress_tlen); | 76 | rcomp.stat_compress_tlen = atomic64_read(&alg->stats.compress.compress_tlen); |
77 | rcomp.stat_decompress_cnt = atomic64_read(&alg->stats.compress.decompress_cnt); | 77 | rcomp.stat_decompress_cnt = atomic64_read(&alg->stats.compress.decompress_cnt); |
78 | rcomp.stat_decompress_tlen = atomic64_read(&alg->stats.compress.decompress_tlen); | 78 | rcomp.stat_decompress_tlen = atomic64_read(&alg->stats.compress.decompress_tlen); |
79 | rcomp.stat_compress_err_cnt = atomic64_read(&alg->stats.compress.compress_err_cnt); | 79 | rcomp.stat_err_cnt = atomic64_read(&alg->stats.compress.err_cnt); |
80 | 80 | ||
81 | return nla_put(skb, CRYPTOCFGA_STAT_COMPRESS, sizeof(rcomp), &rcomp); | 81 | return nla_put(skb, CRYPTOCFGA_STAT_COMPRESS, sizeof(rcomp), &rcomp); |
82 | } | 82 | } |
@@ -92,7 +92,7 @@ static int crypto_report_acomp(struct sk_buff *skb, struct crypto_alg *alg) | |||
92 | racomp.stat_compress_tlen = atomic64_read(&alg->stats.compress.compress_tlen); | 92 | racomp.stat_compress_tlen = atomic64_read(&alg->stats.compress.compress_tlen); |
93 | racomp.stat_decompress_cnt = atomic64_read(&alg->stats.compress.decompress_cnt); | 93 | racomp.stat_decompress_cnt = atomic64_read(&alg->stats.compress.decompress_cnt); |
94 | racomp.stat_decompress_tlen = atomic64_read(&alg->stats.compress.decompress_tlen); | 94 | racomp.stat_decompress_tlen = atomic64_read(&alg->stats.compress.decompress_tlen); |
95 | racomp.stat_compress_err_cnt = atomic64_read(&alg->stats.compress.compress_err_cnt); | 95 | racomp.stat_err_cnt = atomic64_read(&alg->stats.compress.err_cnt); |
96 | 96 | ||
97 | return nla_put(skb, CRYPTOCFGA_STAT_ACOMP, sizeof(racomp), &racomp); | 97 | return nla_put(skb, CRYPTOCFGA_STAT_ACOMP, sizeof(racomp), &racomp); |
98 | } | 98 | } |
@@ -110,7 +110,7 @@ static int crypto_report_akcipher(struct sk_buff *skb, struct crypto_alg *alg) | |||
110 | rakcipher.stat_decrypt_tlen = atomic64_read(&alg->stats.akcipher.decrypt_tlen); | 110 | rakcipher.stat_decrypt_tlen = atomic64_read(&alg->stats.akcipher.decrypt_tlen); |
111 | rakcipher.stat_sign_cnt = atomic64_read(&alg->stats.akcipher.sign_cnt); | 111 | rakcipher.stat_sign_cnt = atomic64_read(&alg->stats.akcipher.sign_cnt); |
112 | rakcipher.stat_verify_cnt = atomic64_read(&alg->stats.akcipher.verify_cnt); | 112 | rakcipher.stat_verify_cnt = atomic64_read(&alg->stats.akcipher.verify_cnt); |
113 | rakcipher.stat_akcipher_err_cnt = atomic64_read(&alg->stats.akcipher.akcipher_err_cnt); | 113 | rakcipher.stat_err_cnt = atomic64_read(&alg->stats.akcipher.err_cnt); |
114 | 114 | ||
115 | return nla_put(skb, CRYPTOCFGA_STAT_AKCIPHER, | 115 | return nla_put(skb, CRYPTOCFGA_STAT_AKCIPHER, |
116 | sizeof(rakcipher), &rakcipher); | 116 | sizeof(rakcipher), &rakcipher); |
@@ -127,7 +127,7 @@ static int crypto_report_kpp(struct sk_buff *skb, struct crypto_alg *alg) | |||
127 | rkpp.stat_setsecret_cnt = atomic64_read(&alg->stats.kpp.setsecret_cnt); | 127 | rkpp.stat_setsecret_cnt = atomic64_read(&alg->stats.kpp.setsecret_cnt); |
128 | rkpp.stat_generate_public_key_cnt = atomic64_read(&alg->stats.kpp.generate_public_key_cnt); | 128 | rkpp.stat_generate_public_key_cnt = atomic64_read(&alg->stats.kpp.generate_public_key_cnt); |
129 | rkpp.stat_compute_shared_secret_cnt = atomic64_read(&alg->stats.kpp.compute_shared_secret_cnt); | 129 | rkpp.stat_compute_shared_secret_cnt = atomic64_read(&alg->stats.kpp.compute_shared_secret_cnt); |
130 | rkpp.stat_kpp_err_cnt = atomic64_read(&alg->stats.kpp.kpp_err_cnt); | 130 | rkpp.stat_err_cnt = atomic64_read(&alg->stats.kpp.err_cnt); |
131 | 131 | ||
132 | return nla_put(skb, CRYPTOCFGA_STAT_KPP, sizeof(rkpp), &rkpp); | 132 | return nla_put(skb, CRYPTOCFGA_STAT_KPP, sizeof(rkpp), &rkpp); |
133 | } | 133 | } |
@@ -142,7 +142,7 @@ static int crypto_report_ahash(struct sk_buff *skb, struct crypto_alg *alg) | |||
142 | 142 | ||
143 | rhash.stat_hash_cnt = atomic64_read(&alg->stats.hash.hash_cnt); | 143 | rhash.stat_hash_cnt = atomic64_read(&alg->stats.hash.hash_cnt); |
144 | rhash.stat_hash_tlen = atomic64_read(&alg->stats.hash.hash_tlen); | 144 | rhash.stat_hash_tlen = atomic64_read(&alg->stats.hash.hash_tlen); |
145 | rhash.stat_hash_err_cnt = atomic64_read(&alg->stats.hash.hash_err_cnt); | 145 | rhash.stat_err_cnt = atomic64_read(&alg->stats.hash.err_cnt); |
146 | 146 | ||
147 | return nla_put(skb, CRYPTOCFGA_STAT_HASH, sizeof(rhash), &rhash); | 147 | return nla_put(skb, CRYPTOCFGA_STAT_HASH, sizeof(rhash), &rhash); |
148 | } | 148 | } |
@@ -157,7 +157,7 @@ static int crypto_report_shash(struct sk_buff *skb, struct crypto_alg *alg) | |||
157 | 157 | ||
158 | rhash.stat_hash_cnt = atomic64_read(&alg->stats.hash.hash_cnt); | 158 | rhash.stat_hash_cnt = atomic64_read(&alg->stats.hash.hash_cnt); |
159 | rhash.stat_hash_tlen = atomic64_read(&alg->stats.hash.hash_tlen); | 159 | rhash.stat_hash_tlen = atomic64_read(&alg->stats.hash.hash_tlen); |
160 | rhash.stat_hash_err_cnt = atomic64_read(&alg->stats.hash.hash_err_cnt); | 160 | rhash.stat_err_cnt = atomic64_read(&alg->stats.hash.err_cnt); |
161 | 161 | ||
162 | return nla_put(skb, CRYPTOCFGA_STAT_HASH, sizeof(rhash), &rhash); | 162 | return nla_put(skb, CRYPTOCFGA_STAT_HASH, sizeof(rhash), &rhash); |
163 | } | 163 | } |
@@ -173,7 +173,7 @@ static int crypto_report_rng(struct sk_buff *skb, struct crypto_alg *alg) | |||
173 | rrng.stat_generate_cnt = atomic64_read(&alg->stats.rng.generate_cnt); | 173 | rrng.stat_generate_cnt = atomic64_read(&alg->stats.rng.generate_cnt); |
174 | rrng.stat_generate_tlen = atomic64_read(&alg->stats.rng.generate_tlen); | 174 | rrng.stat_generate_tlen = atomic64_read(&alg->stats.rng.generate_tlen); |
175 | rrng.stat_seed_cnt = atomic64_read(&alg->stats.rng.seed_cnt); | 175 | rrng.stat_seed_cnt = atomic64_read(&alg->stats.rng.seed_cnt); |
176 | rrng.stat_rng_err_cnt = atomic64_read(&alg->stats.rng.rng_err_cnt); | 176 | rrng.stat_err_cnt = atomic64_read(&alg->stats.rng.err_cnt); |
177 | 177 | ||
178 | return nla_put(skb, CRYPTOCFGA_STAT_RNG, sizeof(rrng), &rrng); | 178 | return nla_put(skb, CRYPTOCFGA_STAT_RNG, sizeof(rrng), &rrng); |
179 | } | 179 | } |