Home
last modified time | relevance | path

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

/Linux-v6.1/kernel/bpf/
Dbpf_lsm.c80 prog->aux->attach_btf_id)) { in BTF_SET_END()
107 if (!btf_id_set_contains(&bpf_lsm_hooks, prog->aux->attach_btf_id)) { in bpf_lsm_verify_prog()
109 prog->aux->attach_btf_id, prog->aux->attach_func_name); in bpf_lsm_verify_prog()
146 return bpf_lsm_is_sleepable_hook(prog->aux->attach_btf_id); in bpf_ima_inode_hash_allowed()
234 prog->aux->attach_btf_id)) in bpf_lsm_func_proto()
237 prog->aux->attach_btf_id)) in bpf_lsm_func_proto()
244 prog->aux->attach_btf_id)) in bpf_lsm_func_proto()
247 prog->aux->attach_btf_id)) in bpf_lsm_func_proto()
Dcgroup.c131 u32 attach_btf_id; member
138 bpf_cgroup_atype_find(enum bpf_attach_type attach_type, u32 attach_btf_id) in bpf_cgroup_atype_find() argument
148 if (cgroup_lsm_atype[i].attach_btf_id == attach_btf_id) in bpf_cgroup_atype_find()
152 if (cgroup_lsm_atype[i].attach_btf_id == 0) in bpf_cgroup_atype_find()
159 void bpf_cgroup_atype_get(u32 attach_btf_id, int cgroup_atype) in bpf_cgroup_atype_get() argument
165 WARN_ON_ONCE(cgroup_lsm_atype[i].attach_btf_id && in bpf_cgroup_atype_get()
166 cgroup_lsm_atype[i].attach_btf_id != attach_btf_id); in bpf_cgroup_atype_get()
168 cgroup_lsm_atype[i].attach_btf_id = attach_btf_id; in bpf_cgroup_atype_get()
178 cgroup_lsm_atype[i].attach_btf_id = 0; in bpf_cgroup_atype_put()
184 bpf_cgroup_atype_find(enum bpf_attach_type attach_type, u32 attach_btf_id) in bpf_cgroup_atype_find() argument
[all …]
Dbpf_iter.c336 tinfo->btf_id = prog->aux->attach_btf_id; in cache_btf_id()
343 u32 prog_btf_id = prog->aux->attach_btf_id; in bpf_iter_prog_supported()
380 if (tinfo->btf_id == prog->aux->attach_btf_id) { in bpf_iter_get_func_proto()
425 link->prog->aux->attach_btf_id != new_prog->aux->attach_btf_id) { in bpf_iter_link_replace()
538 prog_btf_id = prog->aux->attach_btf_id; in bpf_iter_link_attach()
Dtrampoline.c667 p->aux->attach_btf_id = prog->aux->attach_btf_id; in cgroup_shim_alloc()
675 bpf_cgroup_atype_get(p->aux->attach_btf_id, cgroup_atype); in cgroup_shim_alloc()
709 prog->aux->attach_btf_id, in bpf_trampoline_link_cgroup_shim()
715 prog->aux->attach_btf_id); in bpf_trampoline_link_cgroup_shim()
772 prog->aux->attach_btf_id); in bpf_trampoline_unlink_cgroup_shim()
Dsyscall.c2529 } else if (attr->attach_btf_id) { in bpf_prog_load()
2541 attach_btf, attr->attach_btf_id, in bpf_prog_load()
2562 prog->aux->attach_btf_id = attr->attach_btf_id; in bpf_prog_load()
3054 btf_id = prog->aux->attach_btf_id; in bpf_tracing_prog_attach()
4101 info.attach_btf_id = prog->aux->attach_btf_id; in bpf_prog_get_info_by_fd()
Dbpf_struct_ops.c464 prog->aux->attach_btf_id != st_ops->type_id || in bpf_struct_ops_map_update_elem()
Dverifier.c10614 if (!env->prog->aux->attach_btf_id) in check_return_code()
14764 btf_id = prog->aux->attach_btf_id; in check_struct_ops_btf_id()
15085 u32 btf_id = prog->aux->attach_btf_id; in BTF_SET_START()
/Linux-v6.1/tools/bpf/bpftool/
Dcgroup.c123 info.attach_btf_id < btf__type_cnt(btf_vmlinux)) { in show_bpf_prog()
125 btf__type_by_id(btf_vmlinux, info.attach_btf_id); in show_bpf_prog()
145 jsonw_uint_field(json_wtr, "attach_btf_id", info.attach_btf_id); in show_bpf_prog()
159 else if (info.attach_btf_id) in show_bpf_prog()
161 info.attach_btf_obj_id, info.attach_btf_id); in show_bpf_prog()
/Linux-v6.1/tools/testing/selftests/bpf/prog_tests/
Dfexit_bpf2bpf.c435 static int load_fentry(int attach_prog_fd, int attach_btf_id) in load_fentry() argument
440 .attach_btf_id = attach_btf_id, in load_fentry()
492 ASSERT_EQ(info.attach_btf_id, btf_id, "info.attach_btf_id"); in test_fentry_to_cgroup_bpf()
Dfexit_stress.c29 trace_opts.attach_btf_id = err; in serial_test_fexit_stress()
Dlsm_cgroup.c53 if (info.attach_btf_id == in query_prog_cnt()
/Linux-v6.1/tools/lib/bpf/
Dlibbpf_probes.c58 opts.attach_btf_id = 1; in probe_prog_load()
67 opts.attach_btf_id = 1; in probe_prog_load()
Dbpf.h79 __u32 attach_btf_id; member
Dgen_loader.c951 attr.attach_btf_id = load_attr->attach_btf_id; in bpf_gen__prog_load()
1009 offsetof(union bpf_attr, attach_btf_id))); in bpf_gen__prog_load()
Dbpf.c281 attr.attach_btf_id = OPTS_GET(opts, attach_btf_id, 0); in bpf_prog_load()
Dlibbpf.c428 __u32 attach_btf_id; member
1105 prog->attach_btf_id = kern_type_id; in bpf_map__init_kern_struct_ops()
6665 if ((def & SEC_ATTACH_BTF) && !prog->attach_btf_id) { in libbpf_prepare_prog_load()
6692 prog->attach_btf_id = btf_type_id; in libbpf_prepare_prog_load()
6700 opts->attach_btf_id = btf_type_id; in libbpf_prepare_prog_load()
6738 load_attr.attach_btf_id = prog->attach_btf_id; in bpf_object_load_prog()
8896 if (!prog->attach_btf_id) { in bpf_object__collect_st_ops_relos()
8897 prog->attach_btf_id = st_ops->type_id; in bpf_object__collect_st_ops_relos()
8905 if (prog->attach_btf_id != st_ops->type_id || in bpf_object__collect_st_ops_relos()
8909 prog->attach_btf_id, prog->expected_attach_type, name); in bpf_object__collect_st_ops_relos()
[all …]
/Linux-v6.1/net/bpf/
Dbpf_dummy_struct_ops.c90 if (prog->aux->attach_btf_id != st_ops->type_id) in bpf_struct_ops_test_run()
/Linux-v6.1/tools/testing/selftests/bpf/
Dtest_verifier.c1503 int attach_btf_id; in do_test_single() local
1505 attach_btf_id = libbpf_find_vmlinux_btf_id(test->kfunc, in do_test_single()
1507 if (attach_btf_id < 0) { in do_test_single()
1514 opts.attach_btf_id = attach_btf_id; in do_test_single()
/Linux-v6.1/Documentation/bpf/
Ddrgn.rst136 .attach_btf_id = (u32)0,
/Linux-v6.1/tools/include/uapi/linux/
Dbpf.h1382 __u32 attach_btf_id; /* in-kernel BTF type id to attach to */ member
6204 __u32 attach_btf_id; member
/Linux-v6.1/include/uapi/linux/
Dbpf.h1382 __u32 attach_btf_id; /* in-kernel BTF type id to attach to */ member
6204 __u32 attach_btf_id; member
/Linux-v6.1/include/linux/
Dbpf.h1138 u32 attach_btf_id; /* in-kernel BTF type id to attach to */ member
2725 void bpf_cgroup_atype_get(u32 attach_btf_id, int cgroup_atype);
2728 static inline void bpf_cgroup_atype_get(u32 attach_btf_id, int cgroup_atype) {} in bpf_cgroup_atype_get() argument
/Linux-v6.1/net/core/
Dbpf_sk_storage.c411 btf_id = prog->aux->attach_btf_id; in bpf_sk_storage_tracing_allowed()
/Linux-v6.1/kernel/trace/
Dbpf_trace.c942 return bpf_lsm_is_sleepable_hook(prog->aux->attach_btf_id); in BTF_ID()
945 prog->aux->attach_btf_id); in BTF_ID()