/linux/kernel/bpf/ |
H A D | bpf_lsm.c | 96 prog->aux->attach_btf_id)) { in BTF_SET_END() 117 u32 btf_id = prog->aux->attach_btf_id; in bpf_lsm_verify_prog() 127 bpf_log(vlog, "attach_btf_id %u points to disabled hook %s\n", in bpf_lsm_verify_prog() 133 bpf_log(vlog, "attach_btf_id %u points to wrong type name %s\n", 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() [all...] |
H A D | cgroup.c | 161 u32 attach_btf_id; member 168 bpf_cgroup_atype_find(enum bpf_attach_type attach_type, u32 attach_btf_id) in bpf_cgroup_atype_find() argument 178 if (cgroup_lsm_atype[i].attach_btf_id == attach_btf_id) in bpf_cgroup_atype_find() 182 if (cgroup_lsm_atype[i].attach_btf_id == 0) in bpf_cgroup_atype_find() 189 void bpf_cgroup_atype_get(u32 attach_btf_id, int cgroup_atype) in bpf_cgroup_atype_get() argument 195 WARN_ON_ONCE(cgroup_lsm_atype[i].attach_btf_id && in bpf_cgroup_atype_get() 196 cgroup_lsm_atype[i].attach_btf_id != attach_btf_id); in bpf_cgroup_atype_get() 198 cgroup_lsm_atype[i].attach_btf_id in bpf_cgroup_atype_get() 214 bpf_cgroup_atype_find(enum bpf_attach_type attach_type,u32 attach_btf_id) bpf_cgroup_atype_find() argument 1144 u32 attach_btf_id = 0; __cgroup_bpf_detach() local [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 | syscall.c | 2863 } else if (attr->attach_btf_id) { in bpf_prog_load() 2878 attach_btf, attr->attach_btf_id, in bpf_prog_load() 2902 prog->aux->attach_btf_id = attr->attach_btf_id; in bpf_prog_load() 3569 btf_id = prog->aux->attach_btf_id; in bpf_tracing_prog_attach() 5067 info.attach_btf_id = prog->aux->attach_btf_id; in bpf_prog_get_info_by_fd()
|
H A D | bpf_struct_ops.c | 797 prog->aux->attach_btf_id != st_ops_desc->type_id || in bpf_struct_ops_map_update_elem()
|
H A D | verifier.c | 17164 if (!env->prog->aux->attach_btf_id) in check_return_code() 23401 if (!prog->aux->attach_btf_id) in check_struct_ops_btf_id() 23415 btf_id = prog->aux->attach_btf_id; in check_struct_ops_btf_id() 23418 verbose(env, "attach_btf_id %u is not a supported struct\n", in check_struct_ops_btf_id() 23555 bpf_log(log, "attach_btf_id %u is invalid\n", btf_id); in bpf_check_attach_target() 23560 bpf_log(log, "attach_btf_id %u doesn't have a name\n", btf_id); in bpf_check_attach_target() 23678 bpf_log(log, "attach_btf_id %u is not a typedef\n", in bpf_check_attach_target() 23683 bpf_log(log, "attach_btf_id %u points to wrong type name %s\n", in bpf_check_attach_target() 23724 bpf_log(log, "attach_btf_id %u is not a function\n", in bpf_check_attach_target() 23745 bpf_log(log, "attach_btf_id in bpf_check_attach_target() [all...] |
H A D | btf.c | 6835 t = btf_type_by_id(btf, prog->aux->attach_btf_id); in btf_ctx_access()
|
/linux/tools/bpf/bpftool/ |
H A D | cgroup.c | 157 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() 194 printf(" attach_btf_obj_id=%u attach_btf_id=%u", in show_bpf_prog() 195 info.attach_btf_obj_id, info.attach_btf_id); in show_bpf_prog()
|
/linux/tools/testing/selftests/bpf/prog_tests/ |
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()
|
H A D | lsm_cgroup.c | 50 if (info.attach_btf_id == in query_prog_cnt()
|
/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/fs/ |
H A D | bpf_fs_kfuncs.c | 408 return btf_id_set_contains(&d_inode_locked_hooks, prog->aux->attach_btf_id); in BTF_ID()
|
/linux/net/bpf/ |
H A D | bpf_dummy_struct_ops.c | 149 if (prog->aux->attach_btf_id != type_id) in bpf_struct_ops_test_run()
|
/linux/tools/lib/bpf/ |
H A D | bpf.h | 83 __u32 attach_btf_id; member
|
H A D | gen_loader.c | 1021 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 D | bpf.c | 288 attr.attach_btf_id = OPTS_GET(opts, attach_btf_id, 0); in bpf_prog_load()
|
H A D | libbpf.c | 488 __u32 attach_btf_id; member 1283 * attach_btf_id and member_idx in bpf_map__init_kern_struct_ops() 1285 if (!prog->attach_btf_id) { in bpf_map__init_kern_struct_ops() 1286 prog->attach_btf_id = kern_type_id; in bpf_map__init_kern_struct_ops() 1295 if (prog->attach_btf_id != kern_type_id) { in bpf_map__init_kern_struct_ops() 1296 pr_warn("struct_ops init_kern %s func ptr %s: invalid reuse of prog %s in sec %s with type %u: attach_btf_id %u != kern_type_id %u\n", in bpf_map__init_kern_struct_ops() 1298 prog->attach_btf_id, kern_type_id); in bpf_map__init_kern_struct_ops() 7433 if ((def & SEC_ATTACH_BTF) && !prog->attach_btf_id) { in libbpf_prepare_prog_load() 7460 prog->attach_btf_id = btf_type_id; in libbpf_prepare_prog_load() 7463 * prog->atach_btf_obj_fd/prog->attach_btf_id anymor in libbpf_prepare_prog_load() [all...] |
/linux/Documentation/bpf/ |
H A D | drgn.rst | 136 .attach_btf_id = (u32)0,
|
/linux/tools/include/uapi/linux/ |
H A D | bpf.h | 1578 __u32 attach_btf_id; /* in-kernel BTF type id to attach to */ member 6649 __u32 attach_btf_id; member
|
/linux/include/uapi/linux/ |
H A D | bpf.h | 1578 __u32 attach_btf_id; /* in-kernel BTF type id to attach to */ member 6649 __u32 attach_btf_id; member
|
/linux/include/linux/ |
H A D | bpf.h | 1594 u32 attach_btf_id; /* in-kernel BTF type id to attach to */ member 1626 /* BTF_KIND_FUNC_PROTO for valid attach_btf_id */ 1628 /* function name for valid attach_btf_id */ 3669 void bpf_cgroup_atype_get(u32 attach_btf_id, int cgroup_atype); 3672 static inline void bpf_cgroup_atype_get(u32 attach_btf_id, int cgroup_atype) {} in bpf_cgroup_atype_get() argument
|
/linux/kernel/trace/ |
H A D | bpf_trace.c | 955 return bpf_lsm_is_sleepable_hook(prog->aux->attach_btf_id); in BTF_ID() 958 prog->aux->attach_btf_id); in BTF_ID()
|