| /linux/net/bpf/ |
| H A D | bpf_dummy_struct_ops.c | 135 struct bpf_tramp_links *tlinks = NULL; in bpf_struct_ops_test_run() local 161 tlinks = kzalloc_objs(*tlinks, BPF_TRAMP_MAX); in bpf_struct_ops_test_run() 162 if (!tlinks) { in bpf_struct_ops_test_run() 178 err = bpf_struct_ops_prepare_trampoline(tlinks, link, in bpf_struct_ops_test_run() 201 kfree(tlinks); in bpf_struct_ops_test_run()
|
| /linux/kernel/bpf/ |
| H A D | trampoline.c | 444 struct bpf_tramp_links *tlinks; in bpf_trampoline_get_progs() local 449 tlinks = kzalloc_objs(*tlinks, BPF_TRAMP_MAX); in bpf_trampoline_get_progs() 450 if (!tlinks) in bpf_trampoline_get_progs() 454 tlinks[kind].nr_links = tr->progs_cnt[kind]; in bpf_trampoline_get_progs() 456 links = tlinks[kind].links; in bpf_trampoline_get_progs() 463 return tlinks; in bpf_trampoline_get_progs() 610 struct bpf_tramp_links *tlinks; in bpf_trampoline_update() local 615 tlinks = bpf_trampoline_get_progs(tr, &total, &ip_arg); in bpf_trampoline_update() 616 if (IS_ERR(tlinks)) in bpf_trampoline_update() 617 return PTR_ERR(tlinks); in bpf_trampoline_update() [all …]
|
| H A D | bpf_struct_ops.c | 597 int bpf_struct_ops_prepare_trampoline(struct bpf_tramp_links *tlinks, in bpf_struct_ops_prepare_trampoline() argument 608 tlinks[BPF_TRAMP_FENTRY].links[0] = link; in bpf_struct_ops_prepare_trampoline() 609 tlinks[BPF_TRAMP_FENTRY].nr_links = 1; in bpf_struct_ops_prepare_trampoline() 614 size = arch_bpf_trampoline_size(model, flags, tlinks, stub_func); in bpf_struct_ops_prepare_trampoline() 631 model, flags, tlinks, stub_func); in bpf_struct_ops_prepare_trampoline() 696 struct bpf_tramp_links *tlinks; in bpf_struct_ops_map_update_elem() local 723 tlinks = kzalloc_objs(*tlinks, BPF_TRAMP_MAX); in bpf_struct_ops_map_update_elem() 724 if (!tlinks) in bpf_struct_ops_map_update_elem() 835 err = bpf_struct_ops_prepare_trampoline(tlinks, link, in bpf_struct_ops_map_update_elem() 913 kfree(tlinks); in bpf_struct_ops_map_update_elem()
|
| /linux/arch/powerpc/net/ |
| H A D | bpf_jit_comp.c | 725 struct bpf_tramp_links *tlinks, in __arch_prepare_bpf_trampoline() argument 729 struct bpf_tramp_links *fmod_ret = &tlinks[BPF_TRAMP_MODIFY_RETURN]; in __arch_prepare_bpf_trampoline() 730 struct bpf_tramp_links *fentry = &tlinks[BPF_TRAMP_FENTRY]; in __arch_prepare_bpf_trampoline() 731 struct bpf_tramp_links *fexit = &tlinks[BPF_TRAMP_FEXIT]; in __arch_prepare_bpf_trampoline() 1059 struct bpf_tramp_links *tlinks, void *func_addr) in arch_bpf_trampoline_size() argument 1064 ret = __arch_prepare_bpf_trampoline(&im, NULL, NULL, NULL, m, flags, tlinks, func_addr); in arch_bpf_trampoline_size() 1070 struct bpf_tramp_links *tlinks, in arch_prepare_bpf_trampoline() argument 1086 flags, tlinks, func_addr); in arch_prepare_bpf_trampoline()
|
| /linux/arch/riscv/net/ |
| H A D | bpf_jit_comp64.c | 1024 struct bpf_tramp_links *tlinks, in __arch_prepare_bpf_trampoline() argument 1033 struct bpf_tramp_links *fentry = &tlinks[BPF_TRAMP_FENTRY]; in __arch_prepare_bpf_trampoline() 1034 struct bpf_tramp_links *fexit = &tlinks[BPF_TRAMP_FEXIT]; in __arch_prepare_bpf_trampoline() 1035 struct bpf_tramp_links *fmod_ret = &tlinks[BPF_TRAMP_MODIFY_RETURN]; in __arch_prepare_bpf_trampoline() 1118 cookie_cnt = bpf_fsession_cookie_cnt(tlinks); in __arch_prepare_bpf_trampoline() 1175 if (bpf_fsession_cnt(tlinks)) { in __arch_prepare_bpf_trampoline() 1241 if (bpf_fsession_cnt(tlinks)) in __arch_prepare_bpf_trampoline() 1308 struct bpf_tramp_links *tlinks, void *func_addr) in arch_bpf_trampoline_size() argument 1317 ret = __arch_prepare_bpf_trampoline(&im, m, tlinks, func_addr, flags, &ctx); in arch_bpf_trampoline_size() 1334 u32 flags, struct bpf_tramp_links *tlinks, in arch_prepare_bpf_trampoline() argument [all …]
|
| /linux/arch/s390/net/ |
| H A D | bpf_jit_comp.c | 2606 struct bpf_tramp_links *tlinks, in __arch_prepare_bpf_trampoline() argument 2609 struct bpf_tramp_links *fmod_ret = &tlinks[BPF_TRAMP_MODIFY_RETURN]; in __arch_prepare_bpf_trampoline() 2610 struct bpf_tramp_links *fentry = &tlinks[BPF_TRAMP_FENTRY]; in __arch_prepare_bpf_trampoline() 2611 struct bpf_tramp_links *fexit = &tlinks[BPF_TRAMP_FEXIT]; in __arch_prepare_bpf_trampoline() 2905 struct bpf_tramp_links *tlinks, void *orig_call) in arch_bpf_trampoline_size() argument 2914 tlinks, orig_call); in arch_bpf_trampoline_size() 2921 u32 flags, struct bpf_tramp_links *tlinks, in arch_prepare_bpf_trampoline() argument 2930 tlinks, func_addr); in arch_prepare_bpf_trampoline() 2944 tlinks, func_addr); in arch_prepare_bpf_trampoline()
|
| /linux/arch/x86/net/ |
| H A D | bpf_jit_comp.c | 3214 struct bpf_tramp_links *tlinks, in __arch_prepare_bpf_trampoline() argument 3219 struct bpf_tramp_links *fentry = &tlinks[BPF_TRAMP_FENTRY]; in __arch_prepare_bpf_trampoline() 3220 struct bpf_tramp_links *fexit = &tlinks[BPF_TRAMP_FEXIT]; in __arch_prepare_bpf_trampoline() 3221 struct bpf_tramp_links *fmod_ret = &tlinks[BPF_TRAMP_MODIFY_RETURN]; in __arch_prepare_bpf_trampoline() 3293 cookie_cnt = bpf_fsession_cookie_cnt(tlinks); in __arch_prepare_bpf_trampoline() 3386 if (bpf_fsession_cnt(tlinks)) { in __arch_prepare_bpf_trampoline() 3459 if (bpf_fsession_cnt(tlinks)) in __arch_prepare_bpf_trampoline() 3536 struct bpf_tramp_links *tlinks, in arch_prepare_bpf_trampoline() argument 3551 flags, tlinks, func_addr); in arch_prepare_bpf_trampoline() 3564 struct bpf_tramp_links *tlinks, void *func_addr) in arch_bpf_trampoline_size() argument [all …]
|
| /linux/arch/arm64/net/ |
| H A D | bpf_jit_comp.c | 2524 struct bpf_tramp_links *tlinks, void *func_addr, in prepare_trampoline() argument 2540 struct bpf_tramp_links *fentry = &tlinks[BPF_TRAMP_FENTRY]; in prepare_trampoline() 2541 struct bpf_tramp_links *fexit = &tlinks[BPF_TRAMP_FEXIT]; in prepare_trampoline() 2542 struct bpf_tramp_links *fmod_ret = &tlinks[BPF_TRAMP_MODIFY_RETURN]; in prepare_trampoline() 2547 int fsession_cnt = bpf_fsession_cnt(tlinks); in prepare_trampoline() 2593 cookie_cnt = bpf_fsession_cookie_cnt(tlinks); in prepare_trampoline() 2803 struct bpf_tramp_links *tlinks, void *func_addr) in arch_bpf_trampoline_size() argument 2817 ret = prepare_trampoline(&ctx, &im, tlinks, func_addr, m, &aaux, flags); in arch_bpf_trampoline_size() 2841 u32 flags, struct bpf_tramp_links *tlinks, in arch_prepare_bpf_trampoline() argument 2868 ret = prepare_trampoline(&ctx, im, tlinks, func_addr, m, &aaux, flags); in arch_prepare_bpf_trampoline()
|
| /linux/arch/loongarch/net/ |
| H A D | bpf_jit.c | 1614 const struct btf_func_model *m, struct bpf_tramp_links *tlinks, in __arch_prepare_bpf_trampoline() argument 1622 struct bpf_tramp_links *fentry = &tlinks[BPF_TRAMP_FENTRY]; in __arch_prepare_bpf_trampoline() 1623 struct bpf_tramp_links *fexit = &tlinks[BPF_TRAMP_FEXIT]; in __arch_prepare_bpf_trampoline() 1624 struct bpf_tramp_links *fmod_ret = &tlinks[BPF_TRAMP_MODIFY_RETURN]; in __arch_prepare_bpf_trampoline() 1872 u32 flags, struct bpf_tramp_links *tlinks, void *func_addr) in arch_prepare_bpf_trampoline() argument 1888 ret = __arch_prepare_bpf_trampoline(&ctx, im, m, tlinks, func_addr, flags); in arch_prepare_bpf_trampoline() 1909 struct bpf_tramp_links *tlinks, void *func_addr) in arch_bpf_trampoline_size() argument 1918 ret = __arch_prepare_bpf_trampoline(&ctx, &im, m, tlinks, func_addr, flags); in arch_bpf_trampoline_size()
|
| /linux/include/linux/ |
| H A D | bpf.h | 1266 struct bpf_tramp_links *tlinks, 1272 struct bpf_tramp_links *tlinks, void *func_addr); 2093 int bpf_struct_ops_prepare_trampoline(struct bpf_tramp_links *tlinks,
|