diff --git a/include/netpacket/netlink.h b/include/netpacket/netlink.h index 148071ecc6..a65da9a59d 100644 --- a/include/netpacket/netlink.h +++ b/include/netpacket/netlink.h @@ -40,6 +40,9 @@ * Included Files ****************************************************************************/ +#include +#include + #include #include @@ -351,11 +354,14 @@ #define CRYPTO_MSG_DELALG 2 #define CRYPTO_MSG_UPDATEALG 3 #define CRYPTO_MSG_GETALG 4 +#define CRYPTO_MSG_DELRNG 5 +#define CRYPTO_MSG_GETSTAT 6 /* Netlink message attributes. */ #define CRYPTOCFGA_UNSPEC 0 #define CRYPTOCFGA_PRIORITY_VAL 1 /* Argument: uint32_t */ + #define CRYPTOCFGA_REPORT_LARVAL 2 /* Argument: struct crypto_report_larval */ #define CRYPTOCFGA_REPORT_HASH 3 /* Argument: struct crypto_report_hash */ #define CRYPTOCFGA_REPORT_BLKCIPHER 4 /* Argument: struct crypto_report_blkcipher */ @@ -363,6 +369,20 @@ #define CRYPTOCFGA_REPORT_COMPRESS 6 /* Argument: struct crypto_report_comp */ #define CRYPTOCFGA_REPORT_RNG 7 /* Argument: struct crypto_report_rng */ #define CRYPTOCFGA_REPORT_CIPHER 8 /* Argument: struct crypto_report_cipher */ +#define CRYPTOCFGA_REPORT_AKCIPHER 9 /* Argument: struct crypto_report_akcipher */ +#define CRYPTOCFGA_REPORT_KPP 0 /* Argument: struct crypto_report_kpp */ +#define CRYPTOCFGA_REPORT_ACOMP 1 /* Argument: struct crypto_report_acomp */ + +#define CRYPTOCFGA_STAT_LARVAL 2 /* Argument: struct crypto_stat_larval */ +#define CRYPTOCFGA_STAT_HASH 3 /* Argument: struct crypto_stat_hash */ +#define CRYPTOCFGA_STAT_BLKCIPHER 4 /* Argument: struct crypto_stat_blkcipher */ +#define CRYPTOCFGA_STAT_AEAD 5 /* Argument: struct crypto_stat_aead */ +#define CRYPTOCFGA_STAT_COMPRESS 6 /* Argument: struct crypto_stat_comp */ +#define CRYPTOCFGA_STAT_RNG 7 /* Argument: struct crypto_stat_rng */ +#define CRYPTOCFGA_STAT_CIPHER 8 /* Argument: struct crypto_stat_cipher */ +#define CRYPTOCFGA_STAT_AKCIPHER 9 /* Argument: struct crypto_stat_akcipher */ +#define CRYPTOCFGA_STAT_KPP 10 /* Argument: struct crypto_stat_kpp */ +#define CRYPTOCFGA_STAT_ACOMP 11 /* Argument: struct crypto_stat_acomp */ /* Max size of names. No magic here. These can be extended as necessary. */ @@ -549,6 +569,100 @@ struct crypto_report_rng size_t seedsize; }; +struct crypto_report_akcipher +{ + char type[CRYPTO_MAX_NAME]; +}; + +struct crypto_report_kpp +{ + char type[CRYPTO_MAX_NAME]; +}; + +struct crypto_report_acomp +{ + char type[CRYPTO_MAX_NAME]; +}; + +struct crypto_stat_larval +{ + char type[CRYPTO_MAX_NAME]; +}; + +#ifdef CONFIG_HAVE_LONG_LONG +typedef uint64_t crypto_stat_t; +#else +typedef uint32_t crypto_stat_t; +#endif + +struct crypto_stat_aead +{ + char type[CRYPTO_MAX_NAME]; + crypto_stat_t stat_encrypt_cnt; + crypto_stat_t stat_encrypt_tlen; + crypto_stat_t stat_decrypt_cnt; + crypto_stat_t stat_decrypt_tlen; + crypto_stat_t stat_err_cnt; +}; + +struct crypto_stat_akcipher +{ + char type[CRYPTO_MAX_NAME]; + crypto_stat_t stat_encrypt_cnt; + crypto_stat_t stat_encrypt_tlen; + crypto_stat_t stat_decrypt_cnt; + crypto_stat_t stat_decrypt_tlen; + crypto_stat_t stat_verify_cnt; + crypto_stat_t stat_sign_cnt; + crypto_stat_t stat_err_cnt; +}; + +struct crypto_stat_cipher +{ + char type[CRYPTO_MAX_NAME]; + crypto_stat_t stat_encrypt_cnt; + crypto_stat_t stat_encrypt_tlen; + crypto_stat_t stat_decrypt_cnt; + crypto_stat_t stat_decrypt_tlen; + crypto_stat_t stat_err_cnt; +}; + +struct crypto_stat_compress +{ + char type[CRYPTO_MAX_NAME]; + crypto_stat_t stat_compress_cnt; + crypto_stat_t stat_compress_tlen; + crypto_stat_t stat_decompress_cnt; + crypto_stat_t stat_decompress_tlen; + crypto_stat_t stat_err_cnt; +}; + +struct crypto_stat_hash +{ + char type[CRYPTO_MAX_NAME]; + crypto_stat_t stat_hash_cnt; + crypto_stat_t stat_hash_tlen; + crypto_stat_t stat_err_cnt; +}; + +struct crypto_stat_kpp +{ + char type[CRYPTO_MAX_NAME]; + crypto_stat_t stat_setsecret_cnt; + crypto_stat_t stat_generate_public_key_cnt; + crypto_stat_t stat_compute_shared_secret_cnt; + crypto_stat_t stat_err_cnt; +}; + +struct crypto_stat_rng +{ + char type[CRYPTO_MAX_NAME]; + crypto_stat_t stat_generate_cnt; + crypto_stat_t stat_generate_tlen; + crypto_stat_t stat_seed_cnt; + crypto_stat_t stat_err_cnt; +}; + /**************************************************************************** * Public Function Prototypes ****************************************************************************/ diff --git a/syscall/syscall_lookup.h b/syscall/syscall_lookup.h index cde497442d..4acd6287de 100644 --- a/syscall/syscall_lookup.h +++ b/syscall/syscall_lookup.h @@ -178,6 +178,8 @@ SYSCALL_LOOKUP(up_assert, 2, STUB_up_assert) SYSCALL_LOOKUP(clock_getres, 2, STUB_clock_getres) SYSCALL_LOOKUP(clock_gettime, 2, STUB_clock_gettime) SYSCALL_LOOKUP(clock_settime, 2, STUB_clock_settime) + SYSCALL_LOOKUP(getitimer, 2, STUB_getitimer) + SYSCALL_LOOKUP(setitimer, 3, STUB_setitimer) #ifdef CONFIG_CLOCK_TIMEKEEPING SYSCALL_LOOKUP(adjtime, 2, STUB_adjtime) #endif diff --git a/syscall/syscall_stublookup.c b/syscall/syscall_stublookup.c index 7d3bd27ebb..474b50dea0 100644 --- a/syscall/syscall_stublookup.c +++ b/syscall/syscall_stublookup.c @@ -173,6 +173,9 @@ uintptr_t STUB_clock(int nbr); uintptr_t STUB_clock_getres(int nbr, uintptr_t parm1, uintptr_t parm2); uintptr_t STUB_clock_gettime(int nbr, uintptr_t parm1, uintptr_t parm2); uintptr_t STUB_clock_settime(int nbr, uintptr_t parm1, uintptr_t parm2); +uintptr_t STUB_getitimer(int nbr, uintptr_t parm1, uintptr_t parm2); +uintptr_t STUB_setitimer(int nbr, uintptr_t parm1, uintptr_t parm2, + uintptr_t parm3); uintptr_t STUB_adjtime(int nbr, uintptr_t parm1, uintptr_t parm2); /* The following are defined only if POSIX timers are supported */