Home
last modified time | relevance | path

Searched refs:st_ops (Results 1 – 12 of 12) sorted by relevance

/linux/kernel/bpf/
H A Dbpf_struct_ops.c351 int bpf_struct_ops_supported(const struct bpf_struct_ops *st_ops, u32 moff) in bpf_struct_ops_supported() argument
353 void *func_ptr = *(void **)(st_ops->cfi_stubs + moff); in bpf_struct_ops_supported()
362 struct bpf_struct_ops *st_ops = st_ops_desc->st_ops; in bpf_struct_ops_desc_init() local
371 if (strlen(st_ops->name) + VALUE_PREFIX_LEN >= in bpf_struct_ops_desc_init()
374 st_ops->name); in bpf_struct_ops_desc_init()
377 sprintf(value_name, "%s%s", VALUE_PREFIX, st_ops->name); in bpf_struct_ops_desc_init()
379 if (!st_ops->cfi_stubs) { in bpf_struct_ops_desc_init()
380 pr_warn("struct_ops for %s has no cfi_stubs\n", st_ops->name); in bpf_struct_ops_desc_init()
384 type_id = btf_find_by_name_kind(btf, st_ops->name, in bpf_struct_ops_desc_init()
388 st_ops->name, btf_get_name(btf)); in bpf_struct_ops_desc_init()
[all …]
H A Dbtf.c9952 btf_add_struct_ops(struct btf *btf, struct bpf_struct_ops *st_ops, in btf_add_struct_ops() argument
9968 if (tab->ops[i].st_ops == st_ops) in btf_add_struct_ops()
9982 tab->ops[btf->struct_ops_tab->cnt].st_ops = st_ops; in btf_add_struct_ops()
10037 int __register_bpf_struct_ops(struct bpf_struct_ops *st_ops) in __register_bpf_struct_ops() argument
10043 btf = btf_get_module_btf(st_ops->owner); in __register_bpf_struct_ops()
10045 return check_btf_kconfigs(st_ops->owner, "struct_ops"); in __register_bpf_struct_ops()
10057 err = btf_add_struct_ops(btf, st_ops, log); in __register_bpf_struct_ops()
H A Dverifier.c19788 const struct bpf_struct_ops *st_ops; in check_struct_ops_btf_id()
19807 /* Make sure st_ops is valid through the lifetime of env */ in check_struct_ops_btf_id()
19823 st_ops = st_ops_desc->st_ops; in check_struct_ops_btf_id()
19829 member_idx, st_ops->name); in check_struct_ops_btf_id()
19839 mname, member_idx, st_ops->name); in check_struct_ops_btf_id()
19844 err = bpf_struct_ops_supported(st_ops, member_off); in check_struct_ops_btf_id()
19847 mname, st_ops->name); in check_struct_ops_btf_id()
19851 if (st_ops->check_member) { in check_struct_ops_btf_id()
19852 err = st_ops in check_struct_ops_btf_id()
19780 const struct bpf_struct_ops *st_ops; check_struct_ops_btf_id() local
[all...]
/linux/tools/testing/selftests/bpf/test_kmods/
H A Dbpf_testmod.c1405 static struct bpf_testmod_st_ops *st_ops; variable
1412 if (st_ops && st_ops->test_prologue) in bpf_kfunc_st_ops_test_prologue()
1413 ret = st_ops->test_prologue(args); in bpf_kfunc_st_ops_test_prologue()
1424 if (st_ops && st_ops->test_epilogue) in bpf_kfunc_st_ops_test_epilogue()
1425 ret = st_ops->test_epilogue(args); in bpf_kfunc_st_ops_test_epilogue()
1436 if (st_ops && st_ops->test_pro_epilogue) in bpf_kfunc_st_ops_test_pro_epilogue()
1437 ret = st_ops->test_pro_epilogue(args); in bpf_kfunc_st_ops_test_pro_epilogue()
1928 if (st_ops) { in st_ops_reg()
1933 st_ops = kdata; in st_ops_reg()
1943 st_ops = NULL; in st_ops_unreg()
[all …]
/linux/fs/
H A Dbinfmt_misc_bpf.c99 prog->aux->st_ops == &bpf_binfmt_misc_ops; in bpf_prog_is_binfmt_misc_ops()
320 if (!prog->aux->st_ops) in BTF_ID_FLAGS()
H A Dbpf_fs_kfuncs.c448 if (!prog->aux->st_ops) in BTF_ID_FLAGS()
/linux/tools/lib/bpf/
H A Dlibbpf.c593 struct bpf_struct_ops *st_ops; member
1153 type = btf__type_by_id(obj->btf, map->st_ops->type_id); in bpf_object_adjust_struct_ops_autoload()
1156 slot_prog = map->st_ops->progs[k]; in bpf_object_adjust_struct_ops_autoload()
1180 struct bpf_struct_ops *st_ops; in bpf_map__init_kern_struct_ops() local
1187 st_ops = map->st_ops; in bpf_map__init_kern_struct_ops()
1188 type = btf__type_by_id(btf, st_ops->type_id); in bpf_map__init_kern_struct_ops()
1200 map->name, st_ops->type_id, kern_type_id, kern_vtype_id); in bpf_map__init_kern_struct_ops()
1206 st_ops->kern_vdata = calloc(1, kern_vtype->size); in bpf_map__init_kern_struct_ops()
1207 if (!st_ops->kern_vdata) in bpf_map__init_kern_struct_ops()
1210 data = st_ops->data; in bpf_map__init_kern_struct_ops()
[all …]
/linux/include/linux/
H A Dbpf.h1846 const struct bpf_struct_ops *st_ops;
2174 struct bpf_struct_ops *st_ops; in bpf_prog_get_recursion_context()
2248 #define register_bpf_struct_ops(st_ops, type) \
2255 __register_bpf_struct_ops(st_ops); \
2260 int bpf_struct_ops_supported(const struct bpf_struct_ops *st_ops, u32 moff);
2315 #define register_bpf_struct_ops(st_ops, type) ({ (void *)(st_ops); 0; })
2324 static inline int bpf_struct_ops_supported(const struct bpf_struct_ops *st_ops, u32 moff) in bpf_fsession_cnt()
1809 const struct bpf_struct_ops *st_ops; global() member
2137 struct bpf_struct_ops *st_ops; global() member
2211 register_bpf_struct_ops(st_ops,type) global() argument
2278 register_bpf_struct_ops(st_ops,type) global() argument
2287 bpf_struct_ops_supported(const struct bpf_struct_ops * st_ops,u32 moff) bpf_struct_ops_supported() argument
H A Dbtf.h541 int __register_bpf_struct_ops(struct bpf_struct_ops *st_ops);
/linux/arch/s390/include/asm/
H A Dpci.h76 u64 st_ops; member
/linux/net/sched/
H A Dbpf_qdisc.c327 if (prog->aux->st_ops != &bpf_Qdisc_ops) in bpf_qdisc_kfunc_filter()
/linux/kernel/sched/ext/
H A Dext.c11004 * prog->aux->st_ops. Allow all kfuncs when st_ops is not yet set; in scx_kfunc_context_filter()
11005 * do_check_main() re-runs the filter with st_ops set and enforces the in scx_kfunc_context_filter()
11008 if (!prog->aux->st_ops) in scx_kfunc_context_filter()
11020 if (prog->aux->st_ops != &bpf_sched_ext_ops && in scx_kfunc_context_filter()
11021 prog->aux->st_ops != &bpf_sched_ext_ops_cid) in scx_kfunc_context_filter()
11030 if (prog->aux->st_ops == &bpf_sched_ext_ops_cid && in_cpu_only) in scx_init()