| /linux/kernel/bpf/ |
| H A D | bpf_lsm.c | 101 prog->aux->attach_btf_id)) { in BTF_SET_END() 122 u32 btf_id = prog->aux->attach_btf_id; in bpf_lsm_verify_prog() 176 return bpf_lsm_is_sleepable_hook(prog->aux->attach_btf_id); in bpf_ima_inode_hash_allowed() 266 prog->aux->attach_btf_id)) in bpf_lsm_func_proto() 269 prog->aux->attach_btf_id)) in bpf_lsm_func_proto() 276 prog->aux->attach_btf_id)) in bpf_lsm_func_proto() 279 prog->aux->attach_btf_id)) in bpf_lsm_func_proto() 410 return !btf_id_set_contains(&untrusted_lsm_hooks, prog->aux->attach_btf_id); in bpf_lsm_is_trusted() 459 if (btf_id_set_contains(&bool_lsm_hooks, prog->aux->attach_btf_id)) { in bpf_lsm_get_retval_range()
|
| H A D | cgroup.c | 60 u32 attach_btf_id; member 183 bpf_cgroup_atype_find(enum bpf_attach_type attach_type, u32 attach_btf_id) in bpf_cgroup_atype_find() argument 193 if (cgroup_lsm_atype[i].attach_btf_id == attach_btf_id) in bpf_cgroup_atype_find() 197 if (cgroup_lsm_atype[i].attach_btf_id == 0) in bpf_cgroup_atype_find() 204 void bpf_cgroup_atype_get(u32 attach_btf_id, int cgroup_atype) in bpf_cgroup_atype_get() argument 210 if (!cgroup_lsm_atype[i].attach_btf_id) { in bpf_cgroup_atype_get() 211 cgroup_lsm_atype[i].attach_btf_id = attach_btf_id; in bpf_cgroup_atype_get() 213 bpf_lsm_hook_returns_errno(attach_btf_id)); in bpf_cgroup_atype_get() 215 WARN_ON_ONCE(cgroup_lsm_atype[i].attach_btf_id != attach_btf_id); in bpf_cgroup_atype_get() 227 cgroup_lsm_atype[i].attach_btf_id = 0; in bpf_cgroup_atype_put() [all …]
|
| H A D | bpf_iter.c | 334 tinfo->btf_id = prog->aux->attach_btf_id; in cache_btf_id() 341 u32 prog_btf_id = prog->aux->attach_btf_id; in bpf_iter_prog_supported() 377 if (tinfo->btf_id == prog->aux->attach_btf_id) { in bpf_iter_get_func_proto() 422 link->prog->aux->attach_btf_id != new_prog->aux->attach_btf_id) { in bpf_iter_link_replace() 535 prog_btf_id = prog->aux->attach_btf_id; in bpf_iter_link_attach()
|
| H A D | trampoline.c | 1145 p->aux->attach_btf_id = prog->aux->attach_btf_id; in bpf_trampoline_link_cgroup_shim() 1153 bpf_cgroup_atype_get(p->aux->attach_btf_id, cgroup_atype); in bpf_trampoline_link_cgroup_shim() 1188 prog->aux->attach_btf_id, in bpf_trampoline_unlink_cgroup_shim() 1194 prog->aux->attach_btf_id); in bpf_trampoline_unlink_cgroup_shim() 1249 prog->aux->attach_btf_id); in bpf_trampoline_put()
|
| H A D | syscall.c | 3033 } else if (attr->attach_btf_id || multi_func) { in BTF_ID_LIST_GLOBAL_SINGLE() 3048 attach_btf, attr->attach_btf_id, in BTF_ID_LIST_GLOBAL_SINGLE() 3072 prog->aux->attach_btf_id = multi_func ? bpf_multi_func_btf_id[0] : attr->attach_btf_id; in BTF_ID_LIST_GLOBAL_SINGLE() 3772 btf_id = prog->aux->attach_btf_id; in bpf_tracing_prog_attach() 5130 len = offsetofend(struct bpf_prog_info, attach_btf_id); in bpf_prog_get_info_by_fd() 5325 info.attach_btf_id = prog->aux->attach_btf_id; in bpf_prog_get_info_by_fd()
|
| H A D | bpf_struct_ops.c | 847 prog->aux->attach_btf_id != st_ops_desc->type_id || in bpf_struct_ops_map_update_elem()
|
| H A D | verifier.c | 17484 if (!env->prog->aux->attach_btf_id) in return_retval_range() 19802 if (!prog->aux->attach_btf_id) in check_struct_ops_btf_id() 19816 btf_id = prog->aux->attach_btf_id; in check_struct_ops_btf_id() 19819 verbose(env, "attach_btf_id %u is not a supported struct\n", in check_struct_ops_btf_id() 20142 bpf_log(log, "attach_btf_id %u is invalid\n", btf_id); in bpf_check_attach_target() 20147 bpf_log(log, "attach_btf_id %u doesn't have a name\n", btf_id); in bpf_check_attach_target() 20279 bpf_log(log, "attach_btf_id %u is not a typedef\n", in bpf_check_attach_target() 20284 bpf_log(log, "attach_btf_id %u points to wrong type name %s\n", in bpf_check_attach_target() 20331 bpf_log(log, "attach_btf_id %u is not a function\n", in bpf_check_attach_target() 20362 bpf_log(log, "attach_btf_id in bpf_check_attach_target() [all...] |
| H A D | btf.c | 7078 t = btf_type_by_id(btf, prog->aux->attach_btf_id); in btf_ctx_access()
|
| /linux/tools/bpf/bpftool/ |
| H A D | cgroup.c | 168 info.attach_btf_id < btf__type_cnt(btf_vmlinux)) { in show_bpf_prog() 170 btf__type_by_id(btf_vmlinux, info.attach_btf_id); in show_bpf_prog() 190 jsonw_uint_field(json_wtr, "attach_btf_id", info.attach_btf_id); in show_bpf_prog() 204 else if (info.attach_btf_id) in show_bpf_prog() 206 info.attach_btf_obj_id, info.attach_btf_id); in show_bpf_prog()
|
| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | fexit_bpf2bpf.c | 468 static int load_fentry(int attach_prog_fd, int attach_btf_id) in load_fentry() argument 473 .attach_btf_id = attach_btf_id, in load_fentry() 525 ASSERT_EQ(info.attach_btf_id, btf_id, "info.attach_btf_id"); in test_fentry_to_cgroup_bpf()
|
| H A D | fexit_stress.c | 35 trace_opts.attach_btf_id = err; in serial_test_fexit_stress()
|
| H A D | module_fentry_shadow.c | 100 load_opts.attach_btf_id = btf_id[i]; in test_module_fentry_shadow()
|
| /linux/tools/lib/bpf/ |
| H A D | libbpf_probes.c | 141 opts.attach_btf_id = 1; in probe_prog_load() 144 exp_msg = "attach_btf_id 1 is not a function"; in probe_prog_load() 150 opts.attach_btf_id = 1; in probe_prog_load()
|
| H A D | gen_loader.c | 1037 attr.attach_btf_id = tgt_endian(load_attr->attach_btf_id); in bpf_gen__prog_load() 1107 offsetof(union bpf_attr, attach_btf_id))); in bpf_gen__prog_load()
|
| H A D | libbpf.c | 507 __u32 attach_btf_id; member 1323 if (!prog->attach_btf_id) { in bpf_map__init_kern_struct_ops() 1324 prog->attach_btf_id = kern_type_id; in bpf_map__init_kern_struct_ops() 1333 if (prog->attach_btf_id != kern_type_id) { in bpf_map__init_kern_struct_ops() 1336 prog->attach_btf_id, kern_type_id); in bpf_map__init_kern_struct_ops() 7915 if ((def & SEC_ATTACH_BTF) && !prog->attach_btf_id) { in libbpf_prepare_prog_load() 7942 prog->attach_btf_id = btf_type_id; in libbpf_prepare_prog_load() 7950 opts->attach_btf_id = btf_type_id; in libbpf_prepare_prog_load() 7994 if (prog->attach_btf_id == 0) { in bpf_object_load_prog() 8011 load_attr.attach_btf_id = prog->attach_btf_id; in bpf_object_load_prog() [all …]
|
| /linux/tools/testing/selftests/bpf/ |
| H A D | test_verifier.c | 1574 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/net/core/ |
| H A D | bpf_ksock.c | 290 prog->aux->attach_btf_id != bpf_lsm_socket_sendmsg_id[0]) in BTF_ID_FLAGS()
|
| /linux/fs/ |
| H A D | bpf_fs_kfuncs.c | 479 return btf_id_set_contains(&d_inode_locked_hooks, prog->aux->attach_btf_id); in BTF_ID()
|
| /linux/tools/include/uapi/linux/ |
| H A D | bpf.h | 1632 __u32 attach_btf_id; /* in-kernel BTF type id to attach to */ member 6803 __u32 attach_btf_id; member
|
| /linux/include/uapi/linux/ |
| H A D | bpf.h | 1632 __u32 attach_btf_id; /* in-kernel BTF type id to attach to */ member 6803 __u32 attach_btf_id; member
|
| /linux/include/linux/ |
| H A D | bpf.h | 1790 u32 attach_btf_id; /* in-kernel BTF type id to attach to */ 1830 /* BTF_KIND_FUNC_PROTO for valid attach_btf_id */ 1832 /* function name for valid attach_btf_id */ 4164 void bpf_cgroup_atype_get(u32 attach_btf_id, int cgroup_atype); 4167 static inline void bpf_cgroup_atype_get(u32 attach_btf_id, int cgroup_atype) {} 1754 u32 attach_btf_id; /* in-kernel BTF type id to attach to */ global() member 4130 bpf_cgroup_atype_get(u32 attach_btf_id,int cgroup_atype) bpf_cgroup_atype_get() argument
|
| /linux/kernel/trace/ |
| H A D | bpf_trace.c | 984 return bpf_lsm_is_sleepable_hook(prog->aux->attach_btf_id); in BTF_ID() 987 prog->aux->attach_btf_id); in BTF_ID()
|