/kernel/linux/linux-5.10/crypto/ |
H A D | rsa-pkcs1pad.c | 93 unsigned int key_size; member 113 ctx->key_size = 0; in pkcs1pad_set_pub_key() 124 ctx->key_size = err; in pkcs1pad_set_pub_key() 134 ctx->key_size = 0; in pkcs1pad_set_priv_key() 145 ctx->key_size = err; in pkcs1pad_set_priv_key() 159 return ctx->key_size; in pkcs1pad_get_max_size() 187 pad_len = ctx->key_size - len; in pkcs1pad_encrypt_sign_complete() 193 out_buf = kzalloc(ctx->key_size, GFP_KERNEL); in pkcs1pad_encrypt_sign_complete() 201 sg_nents_for_len(req->dst, ctx->key_size), in pkcs1pad_encrypt_sign_complete() 202 out_buf, ctx->key_size); in pkcs1pad_encrypt_sign_complete() [all...] |
H A D | dh_helper.c | 31 return p->key_size + p->p_size + p->q_size + p->g_size; in dh_data_size() 53 ptr = dh_pack_data(ptr, end, ¶ms->key_size, in crypto_dh_encode_key() 54 sizeof(params->key_size)); in crypto_dh_encode_key() 58 ptr = dh_pack_data(ptr, end, params->key, params->key_size); in crypto_dh_encode_key() 80 ptr = dh_unpack_data(¶ms->key_size, ptr, sizeof(params->key_size)); in crypto_dh_decode_key() 91 if (params->key_size > params->p_size || in crypto_dh_decode_key() 99 params->p = (void *)(ptr + params->key_size); in crypto_dh_decode_key() 100 params->q = (void *)(ptr + params->key_size + params->p_size); in crypto_dh_decode_key() 101 params->g = (void *)(ptr + params->key_size in crypto_dh_decode_key() [all...] |
H A D | ecdh_helper.c | 29 return ECDH_KPP_SECRET_MIN_SIZE + params->key_size; in crypto_ecdh_key_len() 50 ptr = ecdh_pack_data(ptr, ¶ms->key_size, sizeof(params->key_size)); in crypto_ecdh_encode_key() 51 ecdh_pack_data(ptr, params->key, params->key_size); in crypto_ecdh_encode_key() 74 ptr = ecdh_unpack_data(¶ms->key_size, ptr, sizeof(params->key_size)); in crypto_ecdh_decode_key()
|
H A D | ecdh.c | 43 params.key_size > sizeof(ctx->private_key)) in ecdh_set_secret() 53 if (!params.key || !params.key_size) in ecdh_set_secret() 57 memcpy(ctx->private_key, params.key, params.key_size); in ecdh_set_secret() 60 ctx->private_key, params.key_size) < 0) { in ecdh_set_secret() 61 memzero_explicit(ctx->private_key, params.key_size); in ecdh_set_secret()
|
/kernel/linux/linux-6.6/crypto/ |
H A D | rsa-pkcs1pad.c | 93 unsigned int key_size; member 113 ctx->key_size = 0; in pkcs1pad_set_pub_key() 124 ctx->key_size = err; in pkcs1pad_set_pub_key() 134 ctx->key_size = 0; in pkcs1pad_set_priv_key() 145 ctx->key_size = err; in pkcs1pad_set_priv_key() 159 return ctx->key_size; in pkcs1pad_get_max_size() 187 pad_len = ctx->key_size - len; in pkcs1pad_encrypt_sign_complete() 193 out_buf = kzalloc(ctx->key_size, GFP_ATOMIC); in pkcs1pad_encrypt_sign_complete() 201 sg_nents_for_len(req->dst, ctx->key_size), in pkcs1pad_encrypt_sign_complete() 202 out_buf, ctx->key_size); in pkcs1pad_encrypt_sign_complete() [all...] |
H A D | dh_helper.c | 31 return p->key_size + p->p_size + p->g_size; in dh_data_size() 53 ptr = dh_pack_data(ptr, end, ¶ms->key_size, in crypto_dh_encode_key() 54 sizeof(params->key_size)); in crypto_dh_encode_key() 57 ptr = dh_pack_data(ptr, end, params->key, params->key_size); in crypto_dh_encode_key() 78 ptr = dh_unpack_data(¶ms->key_size, ptr, sizeof(params->key_size)); in __crypto_dh_decode_key() 88 params->p = (void *)(ptr + params->key_size); in __crypto_dh_decode_key() 89 params->g = (void *)(ptr + params->key_size + params->p_size); in __crypto_dh_decode_key() 106 if (params->key_size > params->p_size || in crypto_dh_decode_key()
|
H A D | ecdh_helper.c | 29 return ECDH_KPP_SECRET_MIN_SIZE + params->key_size; in crypto_ecdh_key_len() 49 ptr = ecdh_pack_data(ptr, ¶ms->key_size, sizeof(params->key_size)); in crypto_ecdh_encode_key() 50 ecdh_pack_data(ptr, params->key, params->key_size); in crypto_ecdh_encode_key() 72 ptr = ecdh_unpack_data(¶ms->key_size, ptr, sizeof(params->key_size)); in crypto_ecdh_decode_key()
|
/kernel/linux/linux-5.10/kernel/bpf/ |
H A D | hashtab.c | 184 static inline void htab_elem_set_ptr(struct htab_elem *l, u32 key_size, in htab_elem_set_ptr() argument 187 *(void __percpu **)(l->key + key_size) = pptr; in htab_elem_set_ptr() 190 static inline void __percpu *htab_elem_get_ptr(struct htab_elem *l, u32 key_size) in htab_elem_get_ptr() argument 192 return *(void __percpu **)(l->key + key_size); in htab_elem_get_ptr() 197 return *(void **)(l->key + roundup(map->key_size, 8)); in fd_htab_map_get_ptr() 216 htab->map.key_size); in htab_free_elems() 243 memcpy(l->key, key, htab->map.key_size); in prealloc_lru_pop() 273 htab_elem_set_ptr(get_htab_elem(htab, i), htab->map.key_size, in prealloc_init() 389 if (attr->max_entries == 0 || attr->key_size == 0 || in htab_map_alloc_check() 393 if (attr->key_size > MAX_BPF_STAC in htab_map_alloc_check() 538 lookup_elem_raw(struct hlist_nulls_head *head, u32 hash, void *key, u32 key_size) lookup_elem_raw() argument 555 lookup_nulls_elem_raw(struct hlist_nulls_head *head, u32 hash, void *key, u32 key_size, u32 n_buckets) lookup_nulls_elem_raw() argument 583 u32 hash, key_size; __htab_map_lookup_elem() local 718 u32 hash, key_size; htab_map_get_next_key() local 860 alloc_htab_elem(struct bpf_htab *htab, void *key, void *value, u32 key_size, u32 hash, bool percpu, bool onallcpus, struct htab_elem *old_elem) alloc_htab_elem() argument 967 u32 key_size, hash; htab_map_update_elem() local 1058 u32 key_size, hash; htab_lru_map_update_elem() local 1122 u32 key_size, hash; __htab_percpu_map_update_elem() local 1174 u32 key_size, hash; __htab_lru_percpu_map_update_elem() local 1250 u32 hash, key_size; htab_map_delete_elem() local 1282 u32 hash, key_size; htab_lru_map_delete_elem() local 1377 u32 bucket_cnt, total, key_size, value_size, roundup_key_size; __htab_map_lookup_and_delete_batch() local [all...] |
/kernel/linux/linux-6.6/kernel/bpf/ |
H A D | hashtab.c | 197 static inline void htab_elem_set_ptr(struct htab_elem *l, u32 key_size, in htab_elem_set_ptr() argument 200 *(void __percpu **)(l->key + key_size) = pptr; in htab_elem_set_ptr() 203 static inline void __percpu *htab_elem_get_ptr(struct htab_elem *l, u32 key_size) in htab_elem_get_ptr() argument 205 return *(void __percpu **)(l->key + key_size); in htab_elem_get_ptr() 210 return *(void **)(l->key + roundup(map->key_size, 8)); in fd_htab_map_get_ptr() 237 bpf_obj_free_timer(htab->map.record, elem->key + round_up(htab->map.key_size, 8)); in htab_free_prealloced_timers() 256 void __percpu *pptr = htab_elem_get_ptr(elem, htab->map.key_size); in htab_free_prealloced_fields() 264 bpf_obj_free_fields(htab->map.record, elem->key + round_up(htab->map.key_size, 8)); in htab_free_prealloced_fields() 282 htab->map.key_size); in htab_free_elems() 310 memcpy(l->key, key, htab->map.key_size); in prealloc_lru_pop() 634 lookup_elem_raw(struct hlist_nulls_head *head, u32 hash, void *key, u32 key_size) lookup_elem_raw() argument 651 lookup_nulls_elem_raw(struct hlist_nulls_head *head, u32 hash, void *key, u32 key_size, u32 n_buckets) lookup_nulls_elem_raw() argument 679 u32 hash, key_size; __htab_map_lookup_elem() local 836 u32 hash, key_size; htab_map_get_next_key() local 997 alloc_htab_elem(struct bpf_htab *htab, void *key, void *value, u32 key_size, u32 hash, bool percpu, bool onallcpus, struct htab_elem *old_elem) alloc_htab_elem() argument 1101 u32 key_size, hash; htab_map_update_elem() local 1204 u32 key_size, hash; htab_lru_map_update_elem() local 1273 u32 key_size, hash; __htab_percpu_map_update_elem() local 1328 u32 key_size, hash; __htab_lru_percpu_map_update_elem() local 1410 u32 hash, key_size; htab_map_delete_elem() local 1446 u32 hash, key_size; htab_lru_map_delete_elem() local 1592 u32 hash, key_size; __htab_map_lookup_and_delete_elem() local 1686 u32 bucket_cnt, total, key_size, value_size, roundup_key_size; __htab_map_lookup_and_delete_batch() local [all...] |
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/ |
H A D | test_lpm_map.c | 427 size_t key_size; in test_lpm_delete() local 431 key_size = sizeof(*key) + sizeof(__u32); in test_lpm_delete() 432 key = alloca(key_size); in test_lpm_delete() 435 key_size, sizeof(value), in test_lpm_delete() 539 size_t key_size; in test_lpm_get_next_key() local 543 key_size = sizeof(*key_p) + sizeof(__u32); in test_lpm_get_next_key() 544 key_p = alloca(key_size); in test_lpm_get_next_key() 545 next_key_p = alloca(key_size); in test_lpm_get_next_key() 547 map_fd = bpf_create_map(BPF_MAP_TYPE_LPM_TRIE, key_size, sizeof(value), in test_lpm_get_next_key() 560 memset(key_p, 0, key_size); in test_lpm_get_next_key() 704 int i, j, ret, iter, key_size; lpm_test_command() local 757 size_t key_size, value_size; test_lpm_multi_thread() local [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/ |
H A D | test_lpm_map.c | 427 size_t key_size; in test_lpm_delete() local 431 key_size = sizeof(*key) + sizeof(__u32); in test_lpm_delete() 432 key = alloca(key_size); in test_lpm_delete() 435 key_size, sizeof(value), in test_lpm_delete() 536 size_t key_size; in test_lpm_get_next_key() local 540 key_size = sizeof(*key_p) + sizeof(__u32); in test_lpm_get_next_key() 541 key_p = alloca(key_size); in test_lpm_get_next_key() 542 next_key_p = alloca(key_size); in test_lpm_get_next_key() 544 map_fd = bpf_map_create(BPF_MAP_TYPE_LPM_TRIE, NULL, key_size, sizeof(value), 100, &opts); in test_lpm_get_next_key() 555 memset(key_p, 0, key_size); in test_lpm_get_next_key() 694 int i, j, ret, iter, key_size; lpm_test_command() local 748 size_t key_size, value_size; test_lpm_multi_thread() local [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/prog_tests/ |
H A D | btf.c | 68 __u32 key_size; member 136 .key_size = sizeof(int), 191 .key_size = sizeof(int), 216 .key_size = sizeof(int), 257 .key_size = sizeof(int), 302 .key_size = sizeof(int), 324 .key_size = sizeof(int), 346 .key_size = sizeof(int), 368 .key_size = sizeof(int), 393 .key_size [all...] |
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/prog_tests/ |
H A D | btf.c | 71 __u32 key_size; member 139 .key_size = sizeof(int), 194 .key_size = sizeof(int), 219 .key_size = sizeof(int), 260 .key_size = sizeof(int), 305 .key_size = sizeof(int), 327 .key_size = sizeof(int), 349 .key_size = sizeof(int), 371 .key_size = sizeof(int), 396 .key_size [all...] |
/kernel/linux/linux-6.6/tools/bpf/bpftool/ |
H A D | map.c | 139 print_hex_data_json(key, info->key_size); in print_entry_json() 162 print_hex_data_json(key, info->key_size); in print_entry_json() 200 break_names = info->key_size > 16 || msg_size > 16; in print_entry_error_msg() 201 single_line = info->key_size + msg_size <= 24 && !break_names; in print_entry_error_msg() 204 fprint_hex(stdout, key, info->key_size, " "); in print_entry_error_msg() 227 print_hex_data_json(key, map_info->key_size); in print_entry_error() 253 break_names = info->key_size > 16 || info->value_size > 16; in print_entry_plain() 254 single_line = info->key_size + info->value_size <= 24 && in print_entry_plain() 257 if (info->key_size) { in print_entry_plain() 259 fprint_hex(stdout, key, info->key_size, " "); in print_entry_plain() 340 parse_elem(char **argv, struct bpf_map_info *info, void *key, void *value, __u32 key_size, __u32 value_size, __u32 *flags, __u32 **value_fd) parse_elem() argument 1243 __u32 key_size = 0, value_size = 0, max_entries = 0; do_create() local [all...] |
/kernel/linux/linux-5.10/tools/bpf/bpftool/ |
H A D | map.c | 165 print_hex_data_json(key, info->key_size); in print_entry_json() 185 print_hex_data_json(key, info->key_size); in print_entry_json() 223 break_names = info->key_size > 16 || msg_size > 16; in print_entry_error_msg() 224 single_line = info->key_size + msg_size <= 24 && !break_names; in print_entry_error_msg() 227 fprint_hex(stdout, key, info->key_size, " "); in print_entry_error_msg() 250 print_hex_data_json(key, map_info->key_size); in print_entry_error() 276 break_names = info->key_size > 16 || info->value_size > 16; in print_entry_plain() 277 single_line = info->key_size + info->value_size <= 24 && in print_entry_plain() 280 if (info->key_size) { in print_entry_plain() 282 fprint_hex(stdout, key, info->key_size, " "); in print_entry_plain() 358 parse_elem(char **argv, struct bpf_map_info *info, void *key, void *value, __u32 key_size, __u32 value_size, __u32 *flags, __u32 **value_fd) parse_elem() argument [all...] |
/kernel/linux/linux-6.6/tools/perf/util/bpf_skel/ |
H A D | func_latency.bpf.c | 12 __uint(key_size, sizeof(__u64)); 19 __uint(key_size, sizeof(__u32)); 26 __uint(key_size, sizeof(__u32)); 33 __uint(key_size, sizeof(__u32));
|
/kernel/linux/linux-5.10/tools/lib/bpf/ |
H A D | libbpf_probes.c | 204 int key_size, value_size, max_entries, map_flags; in bpf_probe_map_type() local 209 key_size = sizeof(__u32); in bpf_probe_map_type() 219 key_size = sizeof(__u64); in bpf_probe_map_type() 225 key_size = sizeof(struct bpf_cgroup_storage_key); in bpf_probe_map_type() 231 key_size = 0; in bpf_probe_map_type() 245 key_size = 0; in bpf_probe_map_type() 291 attr.key_size = key_size; in bpf_probe_map_type()
|
/kernel/linux/linux-6.6/tools/lib/bpf/ |
H A D | libbpf_probes.c | 280 int key_size, value_size, max_entries; in probe_map_create() local 284 key_size = sizeof(__u32); in probe_map_create() 293 key_size = sizeof(__u64); in probe_map_create() 299 key_size = sizeof(struct bpf_cgroup_storage_key); in probe_map_create() 305 key_size = 0; in probe_map_create() 322 key_size = 0; in probe_map_create() 332 key_size = 0; in probe_map_create() 375 fd = bpf_map_create(map_type, NULL, key_size, value_size, max_entries, &opts); in probe_map_create()
|
/kernel/linux/linux-5.10/tools/hv/ |
H A D | hv_kvp_daemon.c | 267 static int kvp_key_delete(int pool, const __u8 *key, int key_size) in kvp_key_delete() argument 283 if (memcmp(key, record[i].key, key_size)) in kvp_key_delete() 310 static int kvp_key_add_or_modify(int pool, const __u8 *key, int key_size, in kvp_key_add_or_modify() argument 318 if ((key_size > HV_KVP_EXCHANGE_MAX_KEY_SIZE) || in kvp_key_add_or_modify() 332 if (memcmp(key, record[i].key, key_size)) in kvp_key_add_or_modify() 357 memcpy(record[i].key, key, key_size); in kvp_key_add_or_modify() 364 static int kvp_get_value(int pool, const __u8 *key, int key_size, __u8 *value, in kvp_get_value() argument 371 if ((key_size > HV_KVP_EXCHANGE_MAX_KEY_SIZE) || in kvp_get_value() 384 if (memcmp(key, record[i].key, key_size)) in kvp_get_value() 396 static int kvp_pool_enumerate(int pool, int index, __u8 *key, int key_size, in kvp_pool_enumerate() argument [all...] |
/kernel/linux/linux-6.6/tools/hv/ |
H A D | hv_kvp_daemon.c | 267 static int kvp_key_delete(int pool, const __u8 *key, int key_size) in kvp_key_delete() argument 283 if (memcmp(key, record[i].key, key_size)) in kvp_key_delete() 310 static int kvp_key_add_or_modify(int pool, const __u8 *key, int key_size, in kvp_key_add_or_modify() argument 318 if ((key_size > HV_KVP_EXCHANGE_MAX_KEY_SIZE) || in kvp_key_add_or_modify() 332 if (memcmp(key, record[i].key, key_size)) in kvp_key_add_or_modify() 357 memcpy(record[i].key, key, key_size); in kvp_key_add_or_modify() 364 static int kvp_get_value(int pool, const __u8 *key, int key_size, __u8 *value, in kvp_get_value() argument 371 if ((key_size > HV_KVP_EXCHANGE_MAX_KEY_SIZE) || in kvp_get_value() 384 if (memcmp(key, record[i].key, key_size)) in kvp_get_value() 396 static int kvp_pool_enumerate(int pool, int index, __u8 *key, int key_size, in kvp_pool_enumerate() argument [all...] |
/kernel/linux/linux-6.6/drivers/mmc/host/ |
H A D | cqhci-crypto.c | 17 enum cqhci_crypto_key_size key_size; member 21 .key_size = CQHCI_CRYPTO_KEY_SIZE_256, 80 ccap_array[i].key_size == alg->key_size && in cqhci_crypto_keyslot_program() 149 cqhci_crypto_algs[i].key_size == cap.key_size) in cqhci_find_blk_crypto_mode()
|
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/benchs/ |
H A D | bench_bpf_hashmap_lookup.c | 21 __u32 key_size; member 27 .key_size = 4, 43 { "key_size", ARG_KEY_SIZE, "KEY_SIZE", 0, 64 fprintf(stderr, "invalid key_size"); in parse_arg() 67 args.key_size = ret; in parse_arg() 167 bpf_map__set_key_size(ctx.skel->maps.hash_map_bench, args.key_size); in setup() 174 if (args.key_size > 4) { in setup() 175 for (i = 1; i < args.key_size/4; i++) in setup()
|
/kernel/linux/linux-5.10/kernel/trace/ |
H A D | tracing_map.c | 414 elt->key = kzalloc(map->key_size, GFP_KERNEL); in tracing_map_elt_alloc() 505 static inline bool keys_match(void *key, void *test_key, unsigned key_size) in keys_match() argument 509 if (memcmp(key, test_key, key_size)) in keys_match() 523 key_hash = jhash(key, map->key_size, 0); in __tracing_map_insert() 536 keys_match(key, val->key, map->key_size)) { in __tracing_map_insert() 576 memcpy(elt->key, key, map->key_size); in __tracing_map_insert() 721 * @key_size: The size of the key for the map in bytes 769 unsigned int key_size, in tracing_map_create() 798 map->key_size = key_size; in tracing_map_create() 768 tracing_map_create(unsigned int map_bits, unsigned int key_size, const struct tracing_map_ops *ops, void *private_data) tracing_map_create() argument 966 detect_dups(struct tracing_map_sort_entry **sort_entries, int n_entries, unsigned int key_size) detect_dups() argument [all...] |
/kernel/linux/linux-6.6/kernel/trace/ |
H A D | tracing_map.c | 414 elt->key = kzalloc(map->key_size, GFP_KERNEL); in tracing_map_elt_alloc() 505 static inline bool keys_match(void *key, void *test_key, unsigned key_size) in keys_match() argument 509 if (memcmp(key, test_key, key_size)) in keys_match() 523 key_hash = jhash(key, map->key_size, 0); in __tracing_map_insert() 536 keys_match(key, val->key, map->key_size)) { in __tracing_map_insert() 576 memcpy(elt->key, key, map->key_size); in __tracing_map_insert() 721 * @key_size: The size of the key for the map in bytes 769 unsigned int key_size, in tracing_map_create() 798 map->key_size = key_size; in tracing_map_create() 768 tracing_map_create(unsigned int map_bits, unsigned int key_size, const struct tracing_map_ops *ops, void *private_data) tracing_map_create() argument 966 detect_dups(struct tracing_map_sort_entry **sort_entries, int n_entries, unsigned int key_size) detect_dups() argument [all...] |
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/progs/ |
H A D | sockmap_verdict_prog.c | 10 __uint(key_size, sizeof(int)); 17 __uint(key_size, sizeof(int)); 24 __uint(key_size, sizeof(int));
|