Lines Matching +defs:map +defs:obj
447 struct bpf_object *obj; member
520 struct bpf_object *obj; member
772 bpf_object__init_prog(struct bpf_object *obj, struct bpf_program *prog, in bpf_object__init_prog()
833 bpf_object__add_programs(struct bpf_object *obj, Elf_Data *sec_data, in bpf_object__add_programs()
957 find_struct_ops_kern_types(struct bpf_object *obj, const char *tname_raw, in find_struct_ops_kern_types()
1022 static bool bpf_map__is_struct_ops(const struct bpf_map *map) in bpf_map__is_struct_ops()
1027 static bool is_valid_st_ops_program(struct bpf_object *obj, in is_valid_st_ops_program()
1045 static int bpf_object_adjust_struct_ops_autoload(struct bpf_object *obj) in bpf_object_adjust_struct_ops_autoload()
1048 struct bpf_map *map; in bpf_object_adjust_struct_ops_autoload() local
1083 static int bpf_map__init_kern_struct_ops(struct bpf_map *map) in bpf_map__init_kern_struct_ops()
1088 struct bpf_object *obj = map->obj; in bpf_map__init_kern_struct_ops() local
1282 static int bpf_object__init_kern_struct_ops_maps(struct bpf_object *obj) in bpf_object__init_kern_struct_ops_maps()
1284 struct bpf_map *map; in bpf_object__init_kern_struct_ops_maps() local
1305 static int init_struct_ops_maps(struct bpf_object *obj, const char *sec_name, in init_struct_ops_maps()
1314 struct bpf_map *map; in init_struct_ops_maps() local
1410 static int bpf_object_init_struct_ops(struct bpf_object *obj) in bpf_object_init_struct_ops()
1438 struct bpf_object *obj; in bpf_object__new() local
1476 static void bpf_object__elf_finish(struct bpf_object *obj) in bpf_object__elf_finish()
1493 static int bpf_object__elf_init(struct bpf_object *obj) in bpf_object__elf_init()
1576 static int bpf_object__check_endianness(struct bpf_object *obj) in bpf_object__check_endianness()
1592 bpf_object__init_license(struct bpf_object *obj, void *data, size_t size) in bpf_object__init_license()
1607 bpf_object__init_kversion(struct bpf_object *obj, void *data, size_t size) in bpf_object__init_kversion()
1629 static int find_elf_sec_sz(const struct bpf_object *obj, const char *name, __u32 *size) in find_elf_sec_sz()
1647 static Elf64_Sym *find_elf_var_sym(const struct bpf_object *obj, const char *name) in find_elf_var_sym()
1698 static struct bpf_map *bpf_object__add_map(struct bpf_object *obj) in bpf_object__add_map()
1700 struct bpf_map *map; in bpf_object__add_map() local
1741 static size_t bpf_map_mmap_sz(const struct bpf_map *map) in bpf_map_mmap_sz()
1755 static int bpf_map_mmap_resize(struct bpf_map *map, size_t old_sz, size_t new_sz) in bpf_map_mmap_resize()
1775 static char *internal_map_name(struct bpf_object *obj, const char *real_name) in internal_map_name()
1841 static bool map_is_mmapable(struct bpf_object *obj, struct bpf_map *map) in map_is_mmapable()
1868 bpf_object__init_internal_map(struct bpf_object *obj, enum libbpf_map_type type, in bpf_object__init_internal_map()
1872 struct bpf_map *map; in bpf_object__init_internal_map() local
1928 static int bpf_object__init_global_data_maps(struct bpf_object *obj) in bpf_object__init_global_data_maps()
1978 static struct extern_desc *find_extern_by_name(const struct bpf_object *obj, in find_extern_by_name()
2140 static int bpf_object__process_kconfig_line(struct bpf_object *obj, in bpf_object__process_kconfig_line()
2204 static int bpf_object__read_kconfig_file(struct bpf_object *obj, void *data) in bpf_object__read_kconfig_file()
2242 static int bpf_object__read_kconfig_mem(struct bpf_object *obj, in bpf_object__read_kconfig_mem()
2269 static int bpf_object__init_kconfig_map(struct bpf_object *obj) in bpf_object__init_kconfig_map()
2449 static int build_map_pin_path(struct bpf_map *map, const char *path) in build_map_pin_path()
2723 static bool map_is_ringbuf(const struct bpf_map *map) in map_is_ringbuf()
2729 static void fill_map_from_def(struct bpf_map *map, const struct btf_map_def *def) in fill_map_from_def()
2787 static int bpf_object__init_user_btf_map(struct bpf_object *obj, in bpf_object__init_user_btf_map()
2798 struct bpf_map *map; in bpf_object__init_user_btf_map() local
2889 static int init_arena_map_data(struct bpf_object *obj, struct bpf_map *map, in init_arena_map_data()
2915 static int bpf_object__init_user_btf_maps(struct bpf_object *obj, bool strict, in bpf_object__init_user_btf_maps()
2965 struct bpf_map *map = &obj->maps[i]; in bpf_object__init_user_btf_maps() local
2994 static int bpf_object__init_maps(struct bpf_object *obj, in bpf_object__init_maps()
3012 static bool section_have_execinstr(struct bpf_object *obj, int idx) in section_have_execinstr()
3028 static bool btf_needs_sanitization(struct bpf_object *obj) in btf_needs_sanitization()
3043 static int bpf_object__sanitize_btf(struct bpf_object *obj, struct btf *btf) in bpf_object__sanitize_btf()
3152 static bool libbpf_needs_btf(const struct bpf_object *obj) in libbpf_needs_btf()
3159 static bool kernel_needs_btf(const struct bpf_object *obj) in kernel_needs_btf()
3164 static int bpf_object__init_btf(struct bpf_object *obj, in bpf_object__init_btf()
3252 static int btf_fixup_datasec(struct bpf_object *obj, struct btf *btf, in btf_fixup_datasec()
3345 static int bpf_object_fixup_btf(struct bpf_object *obj) in bpf_object_fixup_btf()
3386 static bool map_needs_vmlinux_btf(struct bpf_map *map) in map_needs_vmlinux_btf()
3391 static bool obj_needs_vmlinux_btf(const struct bpf_object *obj) in obj_needs_vmlinux_btf()
3394 struct bpf_map *map; in obj_needs_vmlinux_btf() local
3427 static int bpf_object__load_vmlinux_btf(struct bpf_object *obj, bool force) in bpf_object__load_vmlinux_btf()
3448 static int bpf_object__sanitize_and_load_btf(struct bpf_object *obj) in bpf_object__sanitize_and_load_btf()
3553 static const char *elf_sym_str(const struct bpf_object *obj, size_t off) in elf_sym_str()
3567 static const char *elf_sec_str(const struct bpf_object *obj, size_t off) in elf_sec_str()
3581 static Elf_Scn *elf_sec_by_idx(const struct bpf_object *obj, size_t idx) in elf_sec_by_idx()
3594 static Elf_Scn *elf_sec_by_name(const struct bpf_object *obj, const char *name) in elf_sec_by_name()
3613 static Elf64_Shdr *elf_sec_hdr(const struct bpf_object *obj, Elf_Scn *scn) in elf_sec_hdr()
3630 static const char *elf_sec_name(const struct bpf_object *obj, Elf_Scn *scn) in elf_sec_name()
3652 static Elf_Data *elf_sec_data(const struct bpf_object *obj, Elf_Scn *scn) in elf_sec_data()
3670 static Elf64_Sym *elf_sym_by_idx(const struct bpf_object *obj, size_t idx) in elf_sym_by_idx()
3738 static int bpf_object__elf_collect(struct bpf_object *obj) in bpf_object__elf_collect()
4131 static int bpf_object__collect_externs(struct bpf_object *obj) in bpf_object__collect_externs()
4350 static bool prog_is_subprog(const struct bpf_object *obj, const struct bpf_program *prog) in prog_is_subprog()
4356 bpf_object__find_program_by_name(const struct bpf_object *obj, in bpf_object__find_program_by_name()
4370 static bool bpf_object__shndx_is_data(const struct bpf_object *obj, in bpf_object__shndx_is_data()
4383 static bool bpf_object__shndx_is_maps(const struct bpf_object *obj, in bpf_object__shndx_is_maps()
4390 bpf_object__section_to_libbpf_map_type(const struct bpf_object *obj, int shndx) in bpf_object__section_to_libbpf_map_type()
4414 struct bpf_object *obj = prog->obj; in bpf_program__record_reloc() local
4418 struct bpf_map *map; in bpf_program__record_reloc() local
4575 static struct bpf_program *find_prog_by_sec_insn(const struct bpf_object *obj, in find_prog_by_sec_insn()
4604 bpf_object__collect_prog_relos(struct bpf_object *obj, Elf64_Shdr *shdr, Elf_Data *data) in bpf_object__collect_prog_relos()
4703 static int map_fill_btf_type_info(struct bpf_object *obj, struct bpf_map *map) in map_fill_btf_type_info()
4769 bool bpf_map__autocreate(const struct bpf_map *map) in bpf_map__autocreate()
4774 int bpf_map__set_autocreate(struct bpf_map *map, bool autocreate) in bpf_map__set_autocreate()
4783 int bpf_map__reuse_fd(struct bpf_map *map, int fd) in bpf_map__reuse_fd()
4841 __u32 bpf_map__max_entries(const struct bpf_map *map) in bpf_map__max_entries()
4846 struct bpf_map *bpf_map__inner_map(struct bpf_map *map) in bpf_map__inner_map()
4854 int bpf_map__set_max_entries(struct bpf_map *map, __u32 max_entries) in bpf_map__set_max_entries()
4868 static int bpf_object_prepare_token(struct bpf_object *obj) in bpf_object_prepare_token()
4921 bpf_object__probe_loading(struct bpf_object *obj) in bpf_object__probe_loading()
4959 bool kernel_supports(const struct bpf_object *obj, enum kern_feature_id feat_id) in kernel_supports()
4973 static bool map_is_reuse_compat(const struct bpf_map *map, int map_fd) in map_is_reuse_compat()
4999 bpf_object__reuse_map(struct bpf_map *map) in bpf_object__reuse_map()
5038 bpf_object__populate_internal_map(struct bpf_object *obj, struct bpf_map *map) in bpf_object__populate_internal_map()
5077 static bool map_is_created(const struct bpf_map *map) in map_is_created()
5082 static int bpf_object__create_map(struct bpf_object *obj, struct bpf_map *map, bool is_inner) in bpf_object__create_map()
5213 static int init_map_in_map_slots(struct bpf_object *obj, struct bpf_map *map) in init_map_in_map_slots()
5249 static int init_prog_array_slots(struct bpf_object *obj, struct bpf_map *map) in init_prog_array_slots()
5282 static int bpf_object_init_prog_arrays(struct bpf_object *obj) in bpf_object_init_prog_arrays()
5284 struct bpf_map *map; in bpf_object_init_prog_arrays() local
5300 static int map_set_def_max_entries(struct bpf_map *map) in map_set_def_max_entries()
5319 bpf_object__create_maps(struct bpf_object *obj) in bpf_object__create_maps()
5321 struct bpf_map *map; in bpf_object__create_maps() local
5523 static int load_module_btfs(struct bpf_object *obj) in load_module_btfs()
5620 bpf_core_find_cands(struct bpf_object *obj, const struct btf *local_btf, __u32 local_type_id) in bpf_core_find_cands()
5799 bpf_object__relocate_core(struct bpf_object *obj, const char *targ_btf_path) in bpf_object__relocate_core()
5923 int map_idx, const struct bpf_map *map) in poison_map_ldimm64()
5977 bpf_object__relocate_data(struct bpf_object *obj, struct bpf_program *prog) in bpf_object__relocate_data()
5984 const struct bpf_map *map; in bpf_object__relocate_data() local
6072 static int adjust_prog_btf_ext_info(const struct bpf_object *obj, in adjust_prog_btf_ext_info()
6141 reloc_prog_func_and_line_info(const struct bpf_object *obj, in reloc_prog_func_and_line_info()
6260 bpf_object__append_subprog_code(struct bpf_object *obj, struct bpf_program *main_prog, in bpf_object__append_subprog_code()
6292 bpf_object__reloc_code(struct bpf_object *obj, struct bpf_program *main_prog, in bpf_object__reloc_code()
6482 bpf_object__relocate_calls(struct bpf_object *obj, struct bpf_program *prog) in bpf_object__relocate_calls()
6506 bpf_object__free_relocs(struct bpf_object *obj) in bpf_object__free_relocs()
6534 static void bpf_object__sort_relos(struct bpf_object *obj) in bpf_object__sort_relos()
6548 static int bpf_prog_assign_exc_cb(struct bpf_object *obj, struct bpf_program *prog) in bpf_prog_assign_exc_cb()
6810 static int bpf_program_fixup_func_info(struct bpf_object *obj, struct bpf_program *prog) in bpf_program_fixup_func_info()
6949 static int bpf_object__relocate(struct bpf_object *obj, const char *targ_btf_path) in bpf_object__relocate()
7060 static int bpf_object__collect_map_relos(struct bpf_object *obj, in bpf_object__collect_map_relos()
7067 struct bpf_map *map = NULL, *targ_map = NULL; in bpf_object__collect_map_relos() local
7197 static int bpf_object__collect_relos(struct bpf_object *obj) in bpf_object__collect_relos()
7246 static int bpf_object__sanitize_prog(struct bpf_object *obj, struct bpf_program *prog) in bpf_object__sanitize_prog()
7346 static int bpf_object_load_prog(struct bpf_object *obj, struct bpf_program *prog, in bpf_object_load_prog()
7474 struct bpf_map *map; in bpf_object_load_prog() local
7632 struct bpf_object *obj = prog->obj; in fixup_log_missing_map_load() local
7633 const struct bpf_map *map; in fixup_log_missing_map_load() local
7665 struct bpf_object *obj = prog->obj; in fixup_log_missing_kfunc_call() local
7738 struct bpf_object *obj = prog->obj; in bpf_program_record_relos() local
7780 bpf_object__load_progs(struct bpf_object *obj, int log_level) in bpf_object__load_progs()
7820 static int bpf_object_init_progs(struct bpf_object *obj, const struct bpf_object_open_opts *opts) in bpf_object_init_progs()
7857 struct bpf_object *obj; in bpf_object_open() local
7986 static int bpf_object_unload(struct bpf_object *obj) in bpf_object_unload()
8005 static int bpf_object__sanitize_maps(struct bpf_object *obj) in bpf_object__sanitize_maps()
8056 struct bpf_object *obj = ctx; in kallsyms_cb() local
8081 static int bpf_object__read_kallsyms_file(struct bpf_object *obj) in bpf_object__read_kallsyms_file()
8086 static int find_ksym_btf_id(struct bpf_object *obj, const char *ksym_name, in find_ksym_btf_id()
8120 static int bpf_object__resolve_ksym_var_btf_id(struct bpf_object *obj, in bpf_object__resolve_ksym_var_btf_id()
8173 static int bpf_object__resolve_ksym_func_btf_id(struct bpf_object *obj, in bpf_object__resolve_ksym_func_btf_id()
8245 static int bpf_object__resolve_ksyms_btf_id(struct bpf_object *obj) in bpf_object__resolve_ksyms_btf_id()
8273 static int bpf_object__resolve_externs(struct bpf_object *obj, in bpf_object__resolve_externs()
8383 static void bpf_map_prepare_vdata(const struct bpf_map *map) in bpf_map_prepare_vdata()
8403 static int bpf_object_prepare_struct_ops(struct bpf_object *obj) in bpf_object_prepare_struct_ops()
8405 struct bpf_map *map; in bpf_object_prepare_struct_ops() local
8423 static int bpf_object_load(struct bpf_object *obj, int extra_log_level, const char *target_btf_path) in bpf_object_load()
8492 int bpf_object__load(struct bpf_object *obj) in bpf_object__load()
8599 int bpf_map__pin(struct bpf_map *map, const char *path) in bpf_map__pin()
8665 int bpf_map__unpin(struct bpf_map *map, const char *path) in bpf_map__unpin()
8701 int bpf_map__set_pin_path(struct bpf_map *map, const char *path) in bpf_map__set_pin_path()
8719 const char *bpf_map__pin_path(const struct bpf_map *map) in bpf_map__pin_path()
8724 bool bpf_map__is_pinned(const struct bpf_map *map) in bpf_map__is_pinned()
8739 int bpf_object__pin_maps(struct bpf_object *obj, const char *path) in bpf_object__pin_maps()
8741 struct bpf_map *map; in bpf_object__pin_maps() local
8787 int bpf_object__unpin_maps(struct bpf_object *obj, const char *path) in bpf_object__unpin_maps()
8789 struct bpf_map *map; in bpf_object__unpin_maps() local
8817 int bpf_object__pin_programs(struct bpf_object *obj, const char *path) in bpf_object__pin_programs()
8854 int bpf_object__unpin_programs(struct bpf_object *obj, const char *path) in bpf_object__unpin_programs()
8877 int bpf_object__pin(struct bpf_object *obj, const char *path) in bpf_object__pin()
8894 int bpf_object__unpin(struct bpf_object *obj, const char *path) in bpf_object__unpin()
8909 static void bpf_map__destroy(struct bpf_map *map) in bpf_map__destroy()
8938 void bpf_object__close(struct bpf_object *obj) in bpf_object__close()
8986 const char *bpf_object__name(const struct bpf_object *obj) in bpf_object__name()
8991 unsigned int bpf_object__kversion(const struct bpf_object *obj) in bpf_object__kversion()
8996 struct btf *bpf_object__btf(const struct bpf_object *obj) in bpf_object__btf()
9001 int bpf_object__btf_fd(const struct bpf_object *obj) in bpf_object__btf_fd()
9006 int bpf_object__set_kversion(struct bpf_object *obj, __u32 kern_version) in bpf_object__set_kversion()
9016 int bpf_object__gen_loader(struct bpf_object *obj, struct gen_loader_opts *opts) in bpf_object__gen_loader()
9033 __bpf_program__iter(const struct bpf_program *p, const struct bpf_object *obj, in __bpf_program__iter()
9059 bpf_object__next_program(const struct bpf_object *obj, struct bpf_program *prev) in bpf_object__next_program()
9071 bpf_object__prev_program(const struct bpf_object *obj, struct bpf_program *next) in bpf_object__prev_program()
9624 static struct bpf_map *find_struct_ops_map_by_offset(struct bpf_object *obj, in find_struct_ops_map_by_offset()
9628 struct bpf_map *map; in find_struct_ops_map_by_offset() local
9647 static int bpf_object__collect_st_ops_relos(struct bpf_object *obj, in bpf_object__collect_st_ops_relos()
9655 struct bpf_map *map; in bpf_object__collect_st_ops_relos() local
9864 static int find_kernel_btf_id(struct bpf_object *obj, const char *attach_name, in find_kernel_btf_id()
9973 int bpf_map__fd(const struct bpf_map *map) in bpf_map__fd()
9982 static bool map_uses_real_name(const struct bpf_map *map) in map_uses_real_name()
9997 const char *bpf_map__name(const struct bpf_map *map) in bpf_map__name()
10008 enum bpf_map_type bpf_map__type(const struct bpf_map *map) in bpf_map__type()
10013 int bpf_map__set_type(struct bpf_map *map, enum bpf_map_type type) in bpf_map__set_type()
10021 __u32 bpf_map__map_flags(const struct bpf_map *map) in bpf_map__map_flags()
10026 int bpf_map__set_map_flags(struct bpf_map *map, __u32 flags) in bpf_map__set_map_flags()
10034 __u64 bpf_map__map_extra(const struct bpf_map *map) in bpf_map__map_extra()
10039 int bpf_map__set_map_extra(struct bpf_map *map, __u64 map_extra) in bpf_map__set_map_extra()
10047 __u32 bpf_map__numa_node(const struct bpf_map *map) in bpf_map__numa_node()
10052 int bpf_map__set_numa_node(struct bpf_map *map, __u32 numa_node) in bpf_map__set_numa_node()
10060 __u32 bpf_map__key_size(const struct bpf_map *map) in bpf_map__key_size()
10065 int bpf_map__set_key_size(struct bpf_map *map, __u32 size) in bpf_map__set_key_size()
10073 __u32 bpf_map__value_size(const struct bpf_map *map) in bpf_map__value_size()
10078 static int map_btf_datasec_resize(struct bpf_map *map, __u32 size) in map_btf_datasec_resize()
10149 int bpf_map__set_value_size(struct bpf_map *map, __u32 size) in bpf_map__set_value_size()
10182 __u32 bpf_map__btf_key_type_id(const struct bpf_map *map) in bpf_map__btf_key_type_id()
10187 __u32 bpf_map__btf_value_type_id(const struct bpf_map *map) in bpf_map__btf_value_type_id()
10192 int bpf_map__set_initial_value(struct bpf_map *map, in bpf_map__set_initial_value()
10214 void *bpf_map__initial_value(const struct bpf_map *map, size_t *psize) in bpf_map__initial_value()
10233 bool bpf_map__is_internal(const struct bpf_map *map) in bpf_map__is_internal()
10238 __u32 bpf_map__ifindex(const struct bpf_map *map) in bpf_map__ifindex()
10243 int bpf_map__set_ifindex(struct bpf_map *map, __u32 ifindex) in bpf_map__set_ifindex()
10251 int bpf_map__set_inner_map_fd(struct bpf_map *map, int fd) in bpf_map__set_inner_map_fd()
10270 __bpf_map__iter(const struct bpf_map *m, const struct bpf_object *obj, int i) in __bpf_map__iter()
10294 bpf_object__next_map(const struct bpf_object *obj, const struct bpf_map *prev) in bpf_object__next_map()
10303 bpf_object__prev_map(const struct bpf_object *obj, const struct bpf_map *next) in bpf_object__prev_map()
10315 bpf_object__find_map_by_name(const struct bpf_object *obj, const char *name) in bpf_object__find_map_by_name()
10342 bpf_object__find_map_fd_by_name(const struct bpf_object *obj, const char *name) in bpf_object__find_map_fd_by_name()
10347 static int validate_map_op(const struct bpf_map *map, size_t key_sz, in validate_map_op()
10393 int bpf_map__lookup_elem(const struct bpf_map *map, in bpf_map__lookup_elem()
10406 int bpf_map__update_elem(const struct bpf_map *map, in bpf_map__update_elem()
10419 int bpf_map__delete_elem(const struct bpf_map *map, in bpf_map__delete_elem()
10431 int bpf_map__lookup_and_delete_elem(const struct bpf_map *map, in bpf_map__lookup_and_delete_elem()
10444 int bpf_map__get_next_key(const struct bpf_map *map, in bpf_map__get_next_key()
12147 struct bpf_object *obj = prog->obj; in bpf_program__attach_usdt() local
12792 struct bpf_link *bpf_map__attach_struct_ops(const struct bpf_map *map) in bpf_map__attach_struct_ops()
12846 int bpf_link__update_map(struct bpf_link *link, const struct bpf_map *map) in bpf_link__update_map()
13128 struct bpf_map_info map; in __perf_buffer__new() local
13590 static int populate_skeleton_maps(const struct bpf_object *obj, in populate_skeleton_maps()
13598 struct bpf_map **map = map_skel->map; in populate_skeleton_maps() local
13615 static int populate_skeleton_progs(const struct bpf_object *obj, in populate_skeleton_progs()
13641 struct bpf_object *obj; in bpf_object__open_skeleton() local
13684 const struct bpf_map *map; in bpf_object__open_subskeleton() local
13762 struct bpf_map *map = *map_skel->map; in bpf_object__load_skeleton() local