Home
last modified time | relevance | path

Searched refs:attach_btf_id (Results 1 – 25 of 26) sorted by relevance

12

/linux-6.15/kernel/bpf/
H A Dbpf_lsm.c96 prog->aux->attach_btf_id)) { in BTF_SET_END()
117 u32 btf_id = prog->aux->attach_btf_id; in bpf_lsm_verify_prog()
171 return bpf_lsm_is_sleepable_hook(prog->aux->attach_btf_id); in bpf_ima_inode_hash_allowed()
261 prog->aux->attach_btf_id)) in bpf_lsm_func_proto()
264 prog->aux->attach_btf_id)) in bpf_lsm_func_proto()
271 prog->aux->attach_btf_id)) in bpf_lsm_func_proto()
274 prog->aux->attach_btf_id)) in bpf_lsm_func_proto()
405 return !btf_id_set_contains(&untrusted_lsm_hooks, prog->aux->attach_btf_id); in bpf_lsm_is_trusted()
434 if (btf_id_set_contains(&bool_lsm_hooks, prog->aux->attach_btf_id)) { in BTF_ID()
H A Dcgroup.c148 u32 attach_btf_id; member
165 if (cgroup_lsm_atype[i].attach_btf_id == attach_btf_id) in bpf_cgroup_atype_find()
169 if (cgroup_lsm_atype[i].attach_btf_id == 0) in bpf_cgroup_atype_find()
182 WARN_ON_ONCE(cgroup_lsm_atype[i].attach_btf_id && in bpf_cgroup_atype_get()
183 cgroup_lsm_atype[i].attach_btf_id != attach_btf_id); in bpf_cgroup_atype_get()
185 cgroup_lsm_atype[i].attach_btf_id = attach_btf_id; in bpf_cgroup_atype_get()
195 cgroup_lsm_atype[i].attach_btf_id = 0; in bpf_cgroup_atype_put()
991 u32 attach_btf_id = 0; in __cgroup_bpf_detach() local
995 attach_btf_id = prog->aux->attach_btf_id; in __cgroup_bpf_detach()
997 attach_btf_id = link->link.prog->aux->attach_btf_id; in __cgroup_bpf_detach()
[all …]
H A Dbpf_iter.c335 tinfo->btf_id = prog->aux->attach_btf_id; in cache_btf_id()
342 u32 prog_btf_id = prog->aux->attach_btf_id; in bpf_iter_prog_supported()
378 if (tinfo->btf_id == prog->aux->attach_btf_id) { in bpf_iter_get_func_proto()
423 link->prog->aux->attach_btf_id != new_prog->aux->attach_btf_id) { in bpf_iter_link_replace()
536 prog_btf_id = prog->aux->attach_btf_id; in bpf_iter_link_attach()
H A Dtrampoline.c697 p->aux->attach_btf_id = prog->aux->attach_btf_id; in cgroup_shim_alloc()
705 bpf_cgroup_atype_get(p->aux->attach_btf_id, cgroup_atype); in cgroup_shim_alloc()
739 prog->aux->attach_btf_id, in bpf_trampoline_link_cgroup_shim()
745 prog->aux->attach_btf_id); in bpf_trampoline_link_cgroup_shim()
802 prog->aux->attach_btf_id); in bpf_trampoline_unlink_cgroup_shim()
H A Dsyscall.c2855 } else if (attr->attach_btf_id) { in bpf_prog_load()
2870 attach_btf, attr->attach_btf_id, in bpf_prog_load()
2894 prog->aux->attach_btf_id = attr->attach_btf_id; in bpf_prog_load()
3548 btf_id = prog->aux->attach_btf_id; in bpf_tracing_prog_attach()
4904 info.attach_btf_id = prog->aux->attach_btf_id; in bpf_prog_get_info_by_fd()
H A Dbpf_struct_ops.c797 prog->aux->attach_btf_id != st_ops_desc->type_id || in bpf_struct_ops_map_update_elem()
H A Dverifier.c16910 if (!env->prog->aux->attach_btf_id) in check_return_code()
22925 if (!prog->aux->attach_btf_id) in check_struct_ops_btf_id()
22939 btf_id = prog->aux->attach_btf_id; in check_struct_ops_btf_id()
23448 u32 btf_id = prog->aux->attach_btf_id; in check_attach_btf_id()
/linux-6.15/tools/bpf/bpftool/
H A Dcgroup.c157 info.attach_btf_id < btf__type_cnt(btf_vmlinux)) { in show_bpf_prog()
159 btf__type_by_id(btf_vmlinux, info.attach_btf_id); in show_bpf_prog()
179 jsonw_uint_field(json_wtr, "attach_btf_id", info.attach_btf_id); in show_bpf_prog()
193 else if (info.attach_btf_id) in show_bpf_prog()
195 info.attach_btf_obj_id, info.attach_btf_id); in show_bpf_prog()
/linux-6.15/tools/testing/selftests/bpf/prog_tests/
H A Dfexit_bpf2bpf.c459 static int load_fentry(int attach_prog_fd, int attach_btf_id) in load_fentry() argument
464 .attach_btf_id = attach_btf_id, in load_fentry()
516 ASSERT_EQ(info.attach_btf_id, btf_id, "info.attach_btf_id"); in test_fentry_to_cgroup_bpf()
H A Dfexit_stress.c35 trace_opts.attach_btf_id = err; in serial_test_fexit_stress()
H A Dmodule_fentry_shadow.c100 load_opts.attach_btf_id = btf_id[i]; in test_module_fentry_shadow()
H A Dlsm_cgroup.c50 if (info.attach_btf_id == in query_prog_cnt()
/linux-6.15/tools/lib/bpf/
H A Dlibbpf_probes.c141 opts.attach_btf_id = 1; in probe_prog_load()
150 opts.attach_btf_id = 1; in probe_prog_load()
H A Dbpf.h83 __u32 attach_btf_id; member
H A Dgen_loader.c1021 attr.attach_btf_id = tgt_endian(load_attr->attach_btf_id); in bpf_gen__prog_load()
1091 offsetof(union bpf_attr, attach_btf_id))); in bpf_gen__prog_load()
H A Dbpf.c288 attr.attach_btf_id = OPTS_GET(opts, attach_btf_id, 0); in bpf_prog_load()
H A Dlibbpf.c486 __u32 attach_btf_id; member
1283 if (!prog->attach_btf_id) { in bpf_map__init_kern_struct_ops()
1284 prog->attach_btf_id = kern_type_id; in bpf_map__init_kern_struct_ops()
1293 if (prog->attach_btf_id != kern_type_id) { in bpf_map__init_kern_struct_ops()
1296 prog->attach_btf_id, kern_type_id); in bpf_map__init_kern_struct_ops()
7427 if ((def & SEC_ATTACH_BTF) && !prog->attach_btf_id) { in libbpf_prepare_prog_load()
7454 prog->attach_btf_id = btf_type_id; in libbpf_prepare_prog_load()
7462 opts->attach_btf_id = btf_type_id; in libbpf_prepare_prog_load()
7494 if (prog->attach_btf_id == 0) { in bpf_object_load_prog()
7511 load_attr.attach_btf_id = prog->attach_btf_id; in bpf_object_load_prog()
[all …]
/linux-6.15/tools/testing/selftests/bpf/
H A Dtest_verifier.c1574 int attach_btf_id; in do_test_single() local
1576 attach_btf_id = libbpf_find_vmlinux_btf_id(test->kfunc, in do_test_single()
1578 if (attach_btf_id < 0) { in do_test_single()
1585 opts.attach_btf_id = attach_btf_id; in do_test_single()
/linux-6.15/fs/
H A Dbpf_fs_kfuncs.c374 return btf_id_set_contains(&d_inode_locked_hooks, prog->aux->attach_btf_id); in BTF_ID()
/linux-6.15/net/bpf/
H A Dbpf_dummy_struct_ops.c149 if (prog->aux->attach_btf_id != type_id) in bpf_struct_ops_test_run()
/linux-6.15/Documentation/bpf/
H A Ddrgn.rst136 .attach_btf_id = (u32)0,
/linux-6.15/tools/include/uapi/linux/
H A Dbpf.h1560 __u32 attach_btf_id; /* in-kernel BTF type id to attach to */ member
6611 __u32 attach_btf_id; member
/linux-6.15/include/uapi/linux/
H A Dbpf.h1560 __u32 attach_btf_id; /* in-kernel BTF type id to attach to */ member
6611 __u32 attach_btf_id; member
/linux-6.15/include/linux/
H A Dbpf.h1533 u32 attach_btf_id; /* in-kernel BTF type id to attach to */ member
3538 void bpf_cgroup_atype_get(u32 attach_btf_id, int cgroup_atype);
3541 static inline void bpf_cgroup_atype_get(u32 attach_btf_id, int cgroup_atype) {} in bpf_cgroup_atype_get() argument
/linux-6.15/kernel/trace/
H A Dbpf_trace.c956 return bpf_lsm_is_sleepable_hook(prog->aux->attach_btf_id); in BTF_ID()
959 prog->aux->attach_btf_id); in BTF_ID()

12