Searched refs:st_ops (Results 1 – 8 of 8) sorted by relevance
/linux/kernel/bpf/ |
H A D | bpf_struct_ops.c | 317 struct bpf_struct_ops *st_ops = st_ops_desc->st_ops; in bpf_struct_ops_desc_init() local 326 if (strlen(st_ops->name) + VALUE_PREFIX_LEN >= in bpf_struct_ops_desc_init() 329 st_ops->name); in bpf_struct_ops_desc_init() 332 sprintf(value_name, "%s%s", VALUE_PREFIX, st_ops->name); in bpf_struct_ops_desc_init() 334 if (!st_ops->cfi_stubs) { in bpf_struct_ops_desc_init() 335 pr_warn("struct_ops for %s has no cfi_stubs\n", st_ops->name); in bpf_struct_ops_desc_init() 339 type_id = btf_find_by_name_kind(btf, st_ops->name, in bpf_struct_ops_desc_init() 343 st_ops->name, btf_get_name(btf)); in bpf_struct_ops_desc_init() 349 btf_type_vlen(t), st_ops->name); in bpf_struct_ops_desc_init() 380 st_ops->name); in bpf_struct_ops_desc_init() [all …]
|
H A D | btf.c | 9299 btf_add_struct_ops(struct btf *btf, struct bpf_struct_ops *st_ops, in btf_add_struct_ops() argument 9316 if (tab->ops[i].st_ops == st_ops) in btf_add_struct_ops() 9331 tab->ops[btf->struct_ops_tab->cnt].st_ops = st_ops; in btf_add_struct_ops() 9386 int __register_bpf_struct_ops(struct bpf_struct_ops *st_ops) in __register_bpf_struct_ops() argument 9392 btf = btf_get_module_btf(st_ops->owner); in __register_bpf_struct_ops() 9394 return check_btf_kconfigs(st_ops->owner, "struct_ops"); in __register_bpf_struct_ops() 9406 err = btf_add_struct_ops(btf, st_ops, log); in __register_bpf_struct_ops()
|
H A D | verifier.c | 21974 const struct bpf_struct_ops *st_ops; in check_struct_ops_btf_id() local 22008 st_ops = st_ops_desc->st_ops; in check_struct_ops_btf_id() 22014 member_idx, st_ops->name); in check_struct_ops_btf_id() 22024 mname, member_idx, st_ops->name); in check_struct_ops_btf_id() 22028 err = bpf_struct_ops_supported(st_ops, __btf_member_bit_offset(t, member) / 8); in check_struct_ops_btf_id() 22031 mname, st_ops->name); in check_struct_ops_btf_id() 22035 if (st_ops->check_member) { in check_struct_ops_btf_id() 22036 err = st_ops->check_member(t, member, prog); in check_struct_ops_btf_id() 22040 mname, st_ops->name); in check_struct_ops_btf_id() 22058 env->ops = st_ops->verifier_ops; in check_struct_ops_btf_id()
|
/linux/tools/testing/selftests/bpf/bpf_testmod/ |
H A D | bpf_testmod.c | 1012 static struct bpf_testmod_st_ops *st_ops; variable 1019 if (st_ops && st_ops->test_prologue) in bpf_kfunc_st_ops_test_prologue() 1020 ret = st_ops->test_prologue(args); in bpf_kfunc_st_ops_test_prologue() 1031 if (st_ops && st_ops->test_epilogue) in bpf_kfunc_st_ops_test_epilogue() 1032 ret = st_ops->test_epilogue(args); in bpf_kfunc_st_ops_test_epilogue() 1043 if (st_ops && st_ops->test_pro_epilogue) in bpf_kfunc_st_ops_test_pro_epilogue() 1044 ret = st_ops->test_pro_epilogue(args); in bpf_kfunc_st_ops_test_pro_epilogue() 1377 if (st_ops) { in st_ops_reg() 1382 st_ops = kdata; in st_ops_reg() 1392 st_ops = NULL; in st_ops_unreg()
|
/linux/net/bpf/ |
H A D | bpf_dummy_struct_ops.c | 132 const struct bpf_struct_ops *st_ops = &bpf_bpf_dummy_ops; in bpf_struct_ops_test_run() local 178 &st_ops->func_models[op_idx], in bpf_struct_ops_test_run()
|
/linux/tools/lib/bpf/ |
H A D | libbpf.c | 566 struct bpf_struct_ops *st_ops; member 1107 type = btf__type_by_id(obj->btf, map->st_ops->type_id); in bpf_object_adjust_struct_ops_autoload() 1110 slot_prog = map->st_ops->progs[k]; in bpf_object_adjust_struct_ops_autoload() 1134 struct bpf_struct_ops *st_ops; in bpf_map__init_kern_struct_ops() local 1141 st_ops = map->st_ops; in bpf_map__init_kern_struct_ops() 1142 type = btf__type_by_id(btf, st_ops->type_id); in bpf_map__init_kern_struct_ops() 1154 map->name, st_ops->type_id, kern_type_id, kern_vtype_id); in bpf_map__init_kern_struct_ops() 1160 st_ops->kern_vdata = calloc(1, kern_vtype->size); in bpf_map__init_kern_struct_ops() 1161 if (!st_ops->kern_vdata) in bpf_map__init_kern_struct_ops() 1164 data = st_ops->data; in bpf_map__init_kern_struct_ops() [all …]
|
/linux/include/linux/ |
H A D | bpf.h | 1827 struct bpf_struct_ops *st_ops; member 1855 #define register_bpf_struct_ops(st_ops, type) \ argument 1862 __register_bpf_struct_ops(st_ops); \ 1867 int bpf_struct_ops_supported(const struct bpf_struct_ops *st_ops, u32 moff); 1915 #define register_bpf_struct_ops(st_ops, type) ({ (void *)(st_ops); 0; }) argument 1924 static inline int bpf_struct_ops_supported(const struct bpf_struct_ops *st_ops, u32 moff) in bpf_struct_ops_supported() argument
|
H A D | btf.h | 522 int __register_bpf_struct_ops(struct bpf_struct_ops *st_ops);
|