/kernel/bpf/ |
D | bpf_local_storage.c | 252 u64 map_flags) in check_flags() argument 254 if (old_sdata && (map_flags & ~BPF_F_LOCK) == BPF_NOEXIST) in check_flags() 258 if (!old_sdata && (map_flags & ~BPF_F_LOCK) == BPF_EXIST) in check_flags() 333 void *value, u64 map_flags) in bpf_local_storage_update() argument 341 if (unlikely((map_flags & ~BPF_F_LOCK) > BPF_EXIST) || in bpf_local_storage_update() 343 unlikely((map_flags & BPF_F_LOCK) && in bpf_local_storage_update() 350 err = check_flags(NULL, map_flags); in bpf_local_storage_update() 368 if ((map_flags & BPF_F_LOCK) && !(map_flags & BPF_NOEXIST)) { in bpf_local_storage_update() 375 err = check_flags(old_sdata, map_flags); in bpf_local_storage_update() 399 err = check_flags(old_sdata, map_flags); in bpf_local_storage_update() [all …]
|
D | hashtab.c | 127 return !(htab->map.map_flags & BPF_F_NO_PREALLOC); in htab_is_prealloc() 281 htab->map.map_flags & BPF_F_NO_COMMON_LRU, in prealloc_init() 353 bool percpu_lru = (attr->map_flags & BPF_F_NO_COMMON_LRU); in htab_map_alloc_check() 354 bool prealloc = !(attr->map_flags & BPF_F_NO_PREALLOC); in htab_map_alloc_check() 355 bool zero_seed = (attr->map_flags & BPF_F_ZERO_SEED); in htab_map_alloc_check() 373 if (attr->map_flags & ~HTAB_CREATE_FLAG_MASK || in htab_map_alloc_check() 374 !bpf_map_flags_access_ok(attr->map_flags)) in htab_map_alloc_check() 422 bool percpu_lru = (attr->map_flags & BPF_F_NO_COMMON_LRU); in htab_map_alloc() 423 bool prealloc = !(attr->map_flags & BPF_F_NO_PREALLOC); in htab_map_alloc() 483 if (htab->map.map_flags & BPF_F_ZERO_SEED) in htab_map_alloc() [all …]
|
D | arraymap.c | 59 attr->map_flags & ~ARRAY_CREATE_FLAG_MASK || in array_map_alloc_check() 60 !bpf_map_flags_access_ok(attr->map_flags) || in array_map_alloc_check() 65 attr->map_flags & (BPF_F_MMAPABLE | BPF_F_INNER_MAP)) in array_map_alloc_check() 69 attr->map_flags & BPF_F_PRESERVE_ELEMS) in array_map_alloc_check() 121 if (attr->map_flags & BPF_F_MMAPABLE) { in array_map_alloc() 139 if (attr->map_flags & BPF_F_MMAPABLE) { in array_map_alloc() 226 if (map->map_flags & BPF_F_INNER_MAP) in array_map_gen_lookup() 308 u64 map_flags) in array_map_update_elem() argument 314 if (unlikely((map_flags & ~BPF_F_LOCK) > BPF_EXIST)) in array_map_update_elem() 322 if (unlikely(map_flags & BPF_NOEXIST)) in array_map_update_elem() [all …]
|
D | reuseport_array.c | 209 u32 map_flags) in reuseport_array_update_check() argument 211 if (osk && map_flags == BPF_NOEXIST) in reuseport_array_update_check() 214 if (!osk && map_flags == BPF_EXIST) in reuseport_array_update_check() 250 void *value, u64 map_flags) in bpf_fd_reuseport_array_update_elem() argument 260 if (map_flags > BPF_EXIST) in bpf_fd_reuseport_array_update_elem() 290 map_flags); in bpf_fd_reuseport_array_update_elem() 306 err = reuseport_array_update_check(array, nsk, osk, reuse, map_flags); in bpf_fd_reuseport_array_update_elem()
|
D | map_in_map.c | 50 inner_map_meta->map_flags = inner_map->map_flags; in bpf_map_meta_alloc() 78 meta0->map_flags == meta1->map_flags; in bpf_map_meta_equal()
|
D | devmap.c | 122 attr->map_flags & ~DEV_CREATE_FLAG_MASK) in dev_map_init_map() 128 attr->map_flags |= BPF_F_RDONLY_PROG; in dev_map_init_map() 645 void *key, void *value, u64 map_flags) in __dev_map_update_elem() argument 652 if (unlikely(map_flags > BPF_EXIST)) in __dev_map_update_elem() 656 if (unlikely(map_flags == BPF_NOEXIST)) in __dev_map_update_elem() 685 u64 map_flags) in dev_map_update_elem() argument 688 map, key, value, map_flags); in dev_map_update_elem() 692 void *key, void *value, u64 map_flags) in __dev_map_hash_update_elem() argument 704 if (unlikely(map_flags > BPF_EXIST || !val.ifindex)) in __dev_map_hash_update_elem() 710 if (old_dev && (map_flags & BPF_NOEXIST)) in __dev_map_hash_update_elem() [all …]
|
D | local_storage.c | 214 void *value, u64 map_flags) in bpf_percpu_cgroup_storage_update() argument 221 if (map_flags != BPF_ANY && map_flags != BPF_EXIST) in bpf_percpu_cgroup_storage_update() 304 if (attr->map_flags & ~LOCAL_STORAGE_CREATE_FLAG_MASK || in cgroup_storage_map_alloc() 305 !bpf_map_flags_access_ok(attr->map_flags)) in cgroup_storage_map_alloc()
|
D | cpumap.c | 97 attr->map_flags & ~BPF_F_NUMA_NODE) in cpu_map_alloc() 547 u64 map_flags) in cpu_map_update_elem() argument 557 if (unlikely(map_flags > BPF_EXIST)) in cpu_map_update_elem() 561 if (unlikely(map_flags == BPF_NOEXIST)) in cpu_map_update_elem()
|
D | bpf_inode_storage.c | 120 void *value, u64 map_flags) in bpf_fd_inode_storage_update_elem() argument 137 value, map_flags); in bpf_fd_inode_storage_update_elem()
|
D | queue_stack_maps.c | 54 attr->map_flags & ~QUEUE_STACK_CREATE_FLAG_MASK || in queue_stack_map_alloc_check() 55 !bpf_map_flags_access_ok(attr->map_flags)) in queue_stack_map_alloc_check()
|
D | lpm_trie.c | 554 !(attr->map_flags & BPF_F_NO_PREALLOC) || in trie_alloc() 555 attr->map_flags & ~LPM_CREATE_FLAG_MASK || in trie_alloc() 556 !bpf_map_flags_access_ok(attr->map_flags) || in trie_alloc()
|
D | stackmap.c | 56 return (map->map_flags & BPF_F_STACK_BUILD_ID); in stack_map_use_build_id() 101 if (attr->map_flags & ~STACK_CREATE_FLAG_MASK) in stack_map_alloc() 110 if (attr->map_flags & BPF_F_STACK_BUILD_ID) { in stack_map_alloc() 817 u64 map_flags) in stack_map_update_elem() argument
|
D | syscall.c | 358 map->map_flags = bpf_map_flags_retain_permanent(attr->map_flags); in bpf_map_init_from_attr() 575 map->map_flags, in bpf_map_show_fdinfo() 650 if (map->map_flags & BPF_F_RDONLY_PROG) { in bpf_map_mmap() 784 if (map->map_flags & BPF_F_RDONLY_PROG) in map_check_btf() 829 f_flags = bpf_get_file_flag(attr->map_flags); in map_create() 3721 info.map_flags = map->map_flags; in bpf_map_get_info_by_fd()
|
D | ringbuf.c | 158 if (attr->map_flags & ~RINGBUF_CREATE_FLAG_MASK) in ringbuf_map_alloc()
|
D | bpf_struct_ops.c | 551 attr->map_flags || !attr->btf_vmlinux_value_type_id) in bpf_struct_ops_map_alloc_check()
|
D | verifier.c | 3740 return (map->map_flags & BPF_F_RDONLY_PROG) && in bpf_map_is_rdonly() 5484 if ((map->map_flags & BPF_F_RDONLY_PROG) && in record_func_map() 10418 !(map->map_flags & BPF_F_NO_PREALLOC); in check_map_prealloc()
|