/kernel/bpf/ |
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() 238 round_up(htab->map.key_size, 8) + in htab_free_prealloced_timers() 258 bpf_map_free_kptrs(&htab->map, elem->key + round_up(htab->map.key_size, 8)); in htab_free_prealloced_kptrs() 274 htab->map.key_size); in htab_free_elems() 301 memcpy(l->key, key, htab->map.key_size); in prealloc_lru_pop() 332 htab_elem_set_ptr(get_htab_elem(htab, i), htab->map.key_size, in prealloc_init() [all …]
|
D | map_in_map.c | 49 inner_map_meta->key_size = inner_map->key_size; in bpf_map_meta_alloc() 89 meta0->key_size == meta1->key_size && in bpf_map_meta_equal()
|
D | map_iter.c | 105 u32 key_acc_size, value_acc_size, key_size, value_size; in bpf_iter_attach_map() local 128 key_size = map->key_size; in bpf_iter_attach_map() 134 if (key_acc_size > key_size || value_acc_size > value_size) { in bpf_iter_attach_map()
|
D | syscall.c | 369 map->key_size = attr->key_size; in bpf_map_init_from_attr() 694 size = round_up(map->key_size + bpf_map_value_size(map), 8); in bpf_map_memory_footprint() 722 map->key_size, in bpf_map_show_fdinfo() 993 u32 key_size, value_size; in map_check_btf() local 998 key_type = btf_type_id_size(btf, &btf_key_id, &key_size); in map_check_btf() 999 if (!key_type || key_size != map->key_size) in map_check_btf() 1285 static void *__bpf_copy_key(void __user *ukey, u64 key_size) in __bpf_copy_key() argument 1287 if (key_size) in __bpf_copy_key() 1288 return vmemdup_user(ukey, key_size); in __bpf_copy_key() 1296 static void *___bpf_copy_key(bpfptr_t ukey, u64 key_size) in ___bpf_copy_key() argument [all …]
|
D | local_storage.c | 36 return map->key_size == sizeof(struct bpf_cgroup_storage_key); in attach_type_isolated() 298 if (attr->key_size != sizeof(struct bpf_cgroup_storage_key) && in cgroup_storage_map_alloc() 299 attr->key_size != sizeof(__u64)) in cgroup_storage_map_alloc()
|
D | lpm_trie.c | 558 attr->key_size < LPM_KEY_SIZE_MIN || in trie_alloc() 559 attr->key_size > LPM_KEY_SIZE_MAX || in trie_alloc() 570 trie->data_size = attr->key_size - in trie_alloc()
|
D | bloom_filter.c | 100 if (attr->key_size != 0 || attr->value_size == 0 || in bloom_map_alloc()
|
D | queue_stack_maps.c | 53 if (attr->max_entries == 0 || attr->key_size != 0 || in queue_stack_map_alloc_check()
|
D | bpf_local_storage.c | 603 attr->key_size != sizeof(int) || !attr->value_size || in bpf_local_storage_map_alloc_check()
|
D | bpf_struct_ops.c | 588 if (attr->key_size != sizeof(unsigned int) || attr->max_entries != 1 || in bpf_struct_ops_map_alloc_check()
|
D | ringbuf.c | 190 if (attr->key_size || attr->value_size || in ringbuf_map_alloc()
|
D | cpumap.c | 96 if (attr->max_entries == 0 || attr->key_size != 4 || in cpu_map_alloc()
|
D | inode.c | 205 iter->key = kzalloc(map->key_size, GFP_KERNEL | __GFP_NOWARN); in map_iter_alloc()
|
D | stackmap.c | 84 if (attr->max_entries == 0 || attr->key_size != 4 || in stack_map_alloc()
|
D | devmap.c | 119 if (attr->max_entries == 0 || attr->key_size != 4 || in dev_map_init_map()
|
D | arraymap.c | 58 if (attr->max_entries == 0 || attr->key_size != 4 || in array_map_alloc_check()
|
D | helpers.c | 1137 key = value - round_up(map->key_size, 8); in bpf_timer_cb()
|
D | verifier.c | 897 reg->map_ptr->key_size, in print_verifier_state() 5001 reg->map_ptr->key_size, false); in check_mem_access() 5473 reg->map_ptr->key_size, false); in check_helper_mem_access() 6283 meta->map_ptr->key_size, false, in check_func_arg()
|
/kernel/trace/ |
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() 769 unsigned int key_size, in tracing_map_create() argument 798 map->key_size = key_size; in tracing_map_create() 853 if (memcmp(a->key, b->key, a->elt->map->key_size)) in cmp_entries_dup() 967 int n_entries, unsigned int key_size) in detect_dups() argument [all …]
|
D | tracing_map.h | 184 unsigned int key_size; member 242 unsigned int key_size,
|
D | trace_events_hist.c | 553 unsigned int key_size; member 4061 track_data = track_data_alloc(hist_data->key_size, data, hist_data); in action_create() 4415 unsigned int key_size; in create_key_field() local 4425 key_size = sizeof(unsigned long) * HIST_STACKTRACE_DEPTH; in create_key_field() 4442 key_size = hist_field->size; in create_key_field() 4447 key_size = ALIGN(key_size, sizeof(u64)); in create_key_field() 4448 hist_data->fields[key_idx]->size = key_size; in create_key_field() 4451 hist_data->key_size += key_size; in create_key_field() 4453 if (hist_data->key_size > HIST_KEY_SIZE_MAX) { in create_key_field() 4464 ret = key_size; in create_key_field() [all …]
|