| /kernel/bpf/ |
| A D | queue_stack_maps.c | 51 attr->value_size == 0 || in queue_stack_map_alloc_check() 56 if (attr->value_size > KMALLOC_MAX_SIZE) in queue_stack_map_alloc_check() 72 queue_size = sizeof(*qs) + size * attr->value_size; in queue_stack_map_alloc() 106 memset(value, 0, qs->map.value_size); in __queue_map_get() 111 ptr = &qs->elements[qs->tail * qs->map.value_size]; in __queue_map_get() 112 memcpy(value, ptr, qs->map.value_size); in __queue_map_get() 137 memset(value, 0, qs->map.value_size); in __stack_map_get() 146 ptr = &qs->elements[index * qs->map.value_size]; in __stack_map_get() 147 memcpy(value, ptr, qs->map.value_size); in __stack_map_get() 212 dst = &qs->elements[qs->head * qs->map.value_size]; in queue_stack_map_push_elem() [all …]
|
| A D | bloom_filter.c | 24 u32 value_size, u32 index) in hash() argument 28 if (likely(value_size % 4 == 0)) in hash() 29 h = jhash2(value, value_size / 4, bloom->hash_seed + index); in hash() 31 h = jhash(value, value_size, bloom->hash_seed + index); in hash() 43 h = hash(bloom, value, map->value_size, i); in bloom_map_peek_elem() 61 h = hash(bloom, value, map->value_size, i); in bloom_map_push_elem() 86 if (attr->value_size > KMALLOC_MAX_SIZE) in bloom_map_alloc_check() 101 if (attr->key_size != 0 || attr->value_size == 0 || in bloom_map_alloc()
|
| A D | map_iter.c | 104 u32 key_acc_size, value_acc_size, key_size, value_size; in bpf_iter_attach_map() local 129 value_size = map->value_size; in bpf_iter_attach_map() 131 value_size = round_up(map->value_size, 8) * num_possible_cpus(); in bpf_iter_attach_map() 133 if (key_acc_size > key_size || value_acc_size > value_size) { in bpf_iter_attach_map()
|
| A D | stackmap.c | 48 (u64)smap->map.value_size; in prealloc_elems_and_freelist() 72 u32 value_size = attr->value_size; in stack_map_alloc() local 82 value_size < 8 || value_size % 8) in stack_map_alloc() 87 if (value_size % sizeof(struct bpf_stack_build_id) || in stack_map_alloc() 88 value_size / sizeof(struct bpf_stack_build_id) in stack_map_alloc() 91 } else if (value_size / 8 > sysctl_perf_event_max_stack) in stack_map_alloc() 303 u32 max_depth = map->value_size / stack_map_data_size(map); in BPF_CALL_3() 664 memset(value + trace_len, 0, map->value_size - trace_len); in bpf_stackmap_copy() 740 u64 value_size = map->value_size; in stack_map_mem_usage() local 746 usage += enties * (sizeof(struct stack_map_bucket) + value_size); in stack_map_mem_usage()
|
| A D | map_in_map.c | 38 inner_map_meta->value_size = inner_map->value_size; in bpf_map_meta_alloc() 89 meta0->value_size == meta1->value_size && in bpf_map_meta_equal()
|
| A D | local_storage.c | 167 new = bpf_map_kmalloc_node(map, struct_size(new, data, map->value_size), in cgroup_storage_update_elem() 173 memcpy(&new->data[0], value, map->value_size); in cgroup_storage_update_elem() 201 size = round_up(_map->value_size, 8); in bpf_percpu_cgroup_storage_copy() 235 size = round_up(_map->value_size, 8); in bpf_percpu_cgroup_storage_update() 302 if (attr->value_size == 0) in cgroup_storage_map_alloc() 305 if (attr->value_size > max_value_size) in cgroup_storage_map_alloc() 480 size = sizeof(struct bpf_storage_buffer) + map->value_size; in bpf_cgroup_storage_calculate_size() 484 size = map->value_size; in bpf_cgroup_storage_calculate_size()
|
| A D | hashtab.c | 333 u32 size = round_up(htab->map.value_size, 8); in prealloc_init() 449 attr->value_size == 0) in htab_map_alloc_check() 989 u32 size = htab->map.value_size; in alloc_htab_elem() 1724 value_size = htab->map.value_size; in __htab_map_lookup_and_delete_batch() 1725 size = round_up(value_size, 8); in __htab_map_lookup_and_delete_batch() 1727 value_size = size * num_possible_cpus(); in __htab_map_lookup_and_delete_batch() 1849 dst_val += value_size; in __htab_map_lookup_and_delete_batch() 1878 value_size * bucket_cnt))) { in __htab_map_lookup_and_delete_batch() 2216 u32 value_size = round_up(htab->map.value_size, 8); in htab_map_mem_usage() local 2380 size = round_up(map->value_size, 8); in bpf_percpu_hash_copy() [all …]
|
| A D | reuseport_array.c | 43 if (attr->value_size != sizeof(u32) && in reuseport_array_alloc_check() 44 attr->value_size != sizeof(u64)) in reuseport_array_alloc_check() 171 if (map->value_size != sizeof(u64)) in bpf_fd_reuseport_array_lookup_elem() 249 if (map->value_size == sizeof(u64)) { in bpf_fd_reuseport_array_update_elem()
|
| A D | lpm_trie.c | 306 trie->map.value_size); in lpm_trie_node_alloc() 584 attr->value_size < LPM_VAL_SIZE_MIN || in trie_alloc() 585 attr->value_size > LPM_VAL_SIZE_MAX) in trie_alloc() 602 trie->map.value_size; in trie_alloc() 770 trie->map.value_size; in trie_mem_usage()
|
| A D | syscall.c | 144 return map->value_size; in bpf_map_value_size() 435 map->value_size = attr->value_size; in bpf_map_init_from_attr() 1004 map->value_size, in bpf_map_show_fdinfo() 1220 u32 key_size, value_size; in map_check_btf() local 1235 if (!value_type || value_size != map->value_size) in map_check_btf() 1666 u32 value_size; in map_lookup_elem() local 1731 u32 value_size; in map_update_elem() local 1986 copy_from_user(value, values + cp * value_size, value_size)) in generic_map_update_batch() 2073 if (copy_to_user(values + cp * value_size, value, value_size)) { in generic_map_lookup_batch() 2108 u32 value_size; in map_lookup_and_delete_elem() local [all …]
|
| A D | cpumap.c | 85 u32 value_size = attr->value_size; in cpu_map_alloc() local 90 (value_size != offsetofend(struct bpf_cpumap_val, qsize) && in cpu_map_alloc() 91 value_size != offsetofend(struct bpf_cpumap_val, bpf_prog.fd)) || in cpu_map_alloc() 579 memcpy(&cpumap_value, value, map->value_size); in cpu_map_update_elem()
|
| A D | bpf_struct_ops.c | 497 memset(value, 0, map->value_size); in bpf_struct_ops_map_sys_lookup_elem() 505 memcpy(uvalue, st_map->uvalue, map->value_size); in bpf_struct_ops_map_sys_lookup_elem() 727 memcpy(uvalue, value, map->value_size); in bpf_struct_ops_map_update_elem() 897 memset(uvalue, 0, map->value_size); in bpf_struct_ops_map_update_elem() 898 memset(kvalue, 0, map->value_size); in bpf_struct_ops_map_update_elem() 942 value = kmalloc(map->value_size, GFP_USER | __GFP_NOWARN); in bpf_struct_ops_map_seq_show_elem() 1070 if (attr->value_size != vt->size) { in bpf_struct_ops_map_alloc()
|
| A D | bpf_local_storage.c | 93 memset(SDATA(selem)->data, 0, smap->map.value_size); in bpf_selem_alloc() 709 attr->key_size != sizeof(int) || !attr->value_size || in bpf_local_storage_map_alloc_check() 714 if (attr->value_size > BPF_LOCAL_STORAGE_MAX_VALUE_SIZE) in bpf_local_storage_map_alloc_check() 828 sdata.data[attr->value_size]); in bpf_local_storage_map_alloc()
|
| A D | arraymap.c | 59 attr->value_size == 0 || in array_map_alloc_check() 74 if (attr->value_size > INT_MAX) in array_map_alloc_check() 77 if (percpu && round_up(attr->value_size, 8) > PCPU_MIN_UNIT_SIZE) in array_map_alloc_check() 92 elem_size = round_up(attr->value_size, 8); in array_map_alloc() 184 if (off >= map->value_size) in array_map_direct_value_addr() 830 if (attr->value_size != sizeof(u32)) in fd_array_map_alloc_check()
|
| A D | devmap.c | 111 u32 valsize = attr->value_size; in dev_map_alloc_check() 923 memcpy(&val, value, map->value_size); in __dev_map_update_elem() 967 memcpy(&val, value, map->value_size); in __dev_map_hash_update_elem()
|
| A D | arena.c | 106 if (attr->key_size || attr->value_size || attr->max_entries == 0 || in arena_map_alloc()
|
| A D | ringbuf.c | 197 if (attr->key_size || attr->value_size || in ringbuf_map_alloc()
|
| A D | log.c | 723 reg->map_ptr->value_size); in print_reg_state()
|
| A D | verifier.c | 5692 map->value_size, off, size); in check_map_access_type() 5698 map->value_size, off, size); in check_map_access_type() 6087 err = check_mem_region_access(env, regno, off, size, map->value_size, in check_map_access() 9562 map->value_size - reg->off, false, in check_reg_const_str() 9575 if (!strnchr(str_ptr + map_off, map->value_size - map_off, 0)) { in check_reg_const_str() 9817 err = check_helper_mem_access(env, regno, meta->map_ptr->value_size, in check_func_arg() 14150 max = ptr_reg->map_ptr->value_size; in retrieve_ptr_limit() 20637 map->value_size, off); in resolve_pseudo_ldimm64()
|
| A D | btf.c | 3962 u32 field_mask, u32 value_size) in btf_parse_fields() argument 3990 if (info_arr[i].off + field_type_size > value_size) { in btf_parse_fields() 3991 WARN_ONCE(1, "verifier bug off %d size %d", info_arr[i].off, value_size); in btf_parse_fields()
|