static int crypto_report_aead(struct sk_buff *skb, struct crypto_alg *alg)
{
- struct crypto_stat raead;
+ struct crypto_stat_aead raead;
u64 v64;
memset(&raead, 0, sizeof(raead));
static int crypto_report_cipher(struct sk_buff *skb, struct crypto_alg *alg)
{
- struct crypto_stat rcipher;
+ struct crypto_stat_cipher rcipher;
u64 v64;
memset(&rcipher, 0, sizeof(rcipher));
static int crypto_report_comp(struct sk_buff *skb, struct crypto_alg *alg)
{
- struct crypto_stat rcomp;
+ struct crypto_stat_compress rcomp;
u64 v64;
memset(&rcomp, 0, sizeof(rcomp));
static int crypto_report_acomp(struct sk_buff *skb, struct crypto_alg *alg)
{
- struct crypto_stat racomp;
+ struct crypto_stat_compress racomp;
u64 v64;
memset(&racomp, 0, sizeof(racomp));
static int crypto_report_akcipher(struct sk_buff *skb, struct crypto_alg *alg)
{
- struct crypto_stat rakcipher;
+ struct crypto_stat_akcipher rakcipher;
u64 v64;
memset(&rakcipher, 0, sizeof(rakcipher));
static int crypto_report_kpp(struct sk_buff *skb, struct crypto_alg *alg)
{
- struct crypto_stat rkpp;
+ struct crypto_stat_kpp rkpp;
u64 v;
memset(&rkpp, 0, sizeof(rkpp));
static int crypto_report_ahash(struct sk_buff *skb, struct crypto_alg *alg)
{
- struct crypto_stat rhash;
+ struct crypto_stat_hash rhash;
u64 v64;
memset(&rhash, 0, sizeof(rhash));
static int crypto_report_shash(struct sk_buff *skb, struct crypto_alg *alg)
{
- struct crypto_stat rhash;
+ struct crypto_stat_hash rhash;
u64 v64;
memset(&rhash, 0, sizeof(rhash));
static int crypto_report_rng(struct sk_buff *skb, struct crypto_alg *alg)
{
- struct crypto_stat rrng;
+ struct crypto_stat_rng rrng;
u64 v64;
memset(&rrng, 0, sizeof(rrng));
if (nla_put_u32(skb, CRYPTOCFGA_PRIORITY_VAL, alg->cra_priority))
goto nla_put_failure;
if (alg->cra_flags & CRYPTO_ALG_LARVAL) {
- struct crypto_stat rl;
+ struct crypto_stat_larval rl;
memset(&rl, 0, sizeof(rl));
strscpy(rl.type, "larval", sizeof(rl.type));
__u32 cru_flags;
};
-struct crypto_stat {
- char type[CRYPTO_MAX_NAME];
- union {
- __u64 stat_encrypt_cnt;
- __u64 stat_compress_cnt;
- __u64 stat_generate_cnt;
- __u64 stat_hash_cnt;
- __u64 stat_setsecret_cnt;
- };
- union {
- __u64 stat_encrypt_tlen;
- __u64 stat_compress_tlen;
- __u64 stat_generate_tlen;
- __u64 stat_hash_tlen;
- };
- union {
- __u64 stat_akcipher_err_cnt;
- __u64 stat_cipher_err_cnt;
- __u64 stat_compress_err_cnt;
- __u64 stat_aead_err_cnt;
- __u64 stat_hash_err_cnt;
- __u64 stat_rng_err_cnt;
- __u64 stat_kpp_err_cnt;
- };
- union {
- __u64 stat_decrypt_cnt;
- __u64 stat_decompress_cnt;
- __u64 stat_seed_cnt;
- __u64 stat_generate_public_key_cnt;
- };
- union {
- __u64 stat_decrypt_tlen;
- __u64 stat_decompress_tlen;
- };
- union {
- __u64 stat_verify_cnt;
- __u64 stat_compute_shared_secret_cnt;
- };
+struct crypto_stat_aead {
+ char type[CRYPTO_MAX_NAME];
+ __u64 stat_encrypt_cnt;
+ __u64 stat_encrypt_tlen;
+ __u64 stat_decrypt_cnt;
+ __u64 stat_decrypt_tlen;
+ __u64 stat_aead_err_cnt;
+};
+
+struct crypto_stat_akcipher {
+ char type[CRYPTO_MAX_NAME];
+ __u64 stat_encrypt_cnt;
+ __u64 stat_encrypt_tlen;
+ __u64 stat_decrypt_cnt;
+ __u64 stat_decrypt_tlen;
+ __u64 stat_verify_cnt;
__u64 stat_sign_cnt;
+ __u64 stat_akcipher_err_cnt;
+};
+
+struct crypto_stat_cipher {
+ char type[CRYPTO_MAX_NAME];
+ __u64 stat_encrypt_cnt;
+ __u64 stat_encrypt_tlen;
+ __u64 stat_decrypt_cnt;
+ __u64 stat_decrypt_tlen;
+ __u64 stat_cipher_err_cnt;
+};
+
+struct crypto_stat_compress {
+ char type[CRYPTO_MAX_NAME];
+ __u64 stat_compress_cnt;
+ __u64 stat_compress_tlen;
+ __u64 stat_decompress_cnt;
+ __u64 stat_decompress_tlen;
+ __u64 stat_compress_err_cnt;
+};
+
+struct crypto_stat_hash {
+ char type[CRYPTO_MAX_NAME];
+ __u64 stat_hash_cnt;
+ __u64 stat_hash_tlen;
+ __u64 stat_hash_err_cnt;
+};
+
+struct crypto_stat_kpp {
+ char type[CRYPTO_MAX_NAME];
+ __u64 stat_setsecret_cnt;
+ __u64 stat_generate_public_key_cnt;
+ __u64 stat_compute_shared_secret_cnt;
+ __u64 stat_kpp_err_cnt;
+};
+
+struct crypto_stat_rng {
+ char type[CRYPTO_MAX_NAME];
+ __u64 stat_generate_cnt;
+ __u64 stat_generate_tlen;
+ __u64 stat_seed_cnt;
+ __u64 stat_rng_err_cnt;
+};
+
+struct crypto_stat_larval {
+ char type[CRYPTO_MAX_NAME];
};
struct crypto_report_larval {