/linux-6.3-rc2/net/bpf/ |
A D | bpf_dummy_struct_ops.c | 83 struct bpf_tramp_links *tlinks; in bpf_struct_ops_test_run() local 98 tlinks = kcalloc(BPF_TRAMP_MAX, sizeof(*tlinks), GFP_KERNEL); in bpf_struct_ops_test_run() 99 if (!tlinks) { in bpf_struct_ops_test_run() 121 err = bpf_struct_ops_prepare_trampoline(tlinks, link, in bpf_struct_ops_test_run() 140 kfree(tlinks); in bpf_struct_ops_test_run()
|
/linux-6.3-rc2/kernel/bpf/ |
A D | trampoline.c | 260 struct bpf_tramp_links *tlinks; in bpf_trampoline_get_progs() local 265 tlinks = kcalloc(BPF_TRAMP_MAX, sizeof(*tlinks), GFP_KERNEL); in bpf_trampoline_get_progs() 266 if (!tlinks) in bpf_trampoline_get_progs() 272 links = tlinks[kind].links; in bpf_trampoline_get_progs() 279 return tlinks; in bpf_trampoline_get_progs() 419 struct bpf_tramp_links *tlinks; in bpf_trampoline_update() local 425 if (IS_ERR(tlinks)) in bpf_trampoline_update() 426 return PTR_ERR(tlinks); in bpf_trampoline_update() 445 if (tlinks[BPF_TRAMP_FEXIT].nr_links || in bpf_trampoline_update() 509 kfree(tlinks); in bpf_trampoline_update() [all …]
|
A D | bpf_struct_ops.c | 335 int bpf_struct_ops_prepare_trampoline(struct bpf_tramp_links *tlinks, in bpf_struct_ops_prepare_trampoline() argument 342 tlinks[BPF_TRAMP_FENTRY].links[0] = link; in bpf_struct_ops_prepare_trampoline() 343 tlinks[BPF_TRAMP_FENTRY].nr_links = 1; in bpf_struct_ops_prepare_trampoline() 349 model, flags, tlinks, NULL); in bpf_struct_ops_prepare_trampoline() 360 struct bpf_tramp_links *tlinks = NULL; in bpf_struct_ops_map_update_elem() local 384 tlinks = kcalloc(BPF_TRAMP_MAX, sizeof(*tlinks), GFP_KERNEL); in bpf_struct_ops_map_update_elem() 385 if (!tlinks) in bpf_struct_ops_map_update_elem() 481 err = bpf_struct_ops_prepare_trampoline(tlinks, link, in bpf_struct_ops_map_update_elem() 522 kfree(tlinks); in bpf_struct_ops_map_update_elem()
|
/linux-6.3-rc2/arch/riscv/net/ |
A D | bpf_jit_comp64.c | 783 struct bpf_tramp_links *tlinks, in __arch_prepare_bpf_trampoline() argument 792 struct bpf_tramp_links *fentry = &tlinks[BPF_TRAMP_FENTRY]; in __arch_prepare_bpf_trampoline() 793 struct bpf_tramp_links *fexit = &tlinks[BPF_TRAMP_FEXIT]; in __arch_prepare_bpf_trampoline() 794 struct bpf_tramp_links *fmod_ret = &tlinks[BPF_TRAMP_MODIFY_RETURN]; in __arch_prepare_bpf_trampoline() 990 u32 flags, struct bpf_tramp_links *tlinks, in arch_prepare_bpf_trampoline() argument 998 ret = __arch_prepare_bpf_trampoline(im, m, tlinks, func_addr, flags, &ctx); in arch_prepare_bpf_trampoline() 1007 ret = __arch_prepare_bpf_trampoline(im, m, tlinks, func_addr, flags, &ctx); in arch_prepare_bpf_trampoline()
|
/linux-6.3-rc2/arch/arm64/net/ |
A D | bpf_jit_comp.c | 1766 struct bpf_tramp_links *tlinks, void *orig_call, in prepare_trampoline() argument 1778 struct bpf_tramp_links *fentry = &tlinks[BPF_TRAMP_FENTRY]; in prepare_trampoline() 1779 struct bpf_tramp_links *fexit = &tlinks[BPF_TRAMP_FEXIT]; in prepare_trampoline() 1780 struct bpf_tramp_links *fmod_ret = &tlinks[BPF_TRAMP_MODIFY_RETURN]; in prepare_trampoline() 1965 u32 flags, struct bpf_tramp_links *tlinks, in arch_prepare_bpf_trampoline() argument 1986 ret = prepare_trampoline(&ctx, im, tlinks, orig_call, nargs, flags); in arch_prepare_bpf_trampoline() 1997 ret = prepare_trampoline(&ctx, im, tlinks, orig_call, nargs, flags); in arch_prepare_bpf_trampoline()
|
/linux-6.3-rc2/arch/s390/net/ |
A D | bpf_jit_comp.c | 2195 struct bpf_tramp_links *tlinks, in __arch_prepare_bpf_trampoline() argument 2198 struct bpf_tramp_links *fmod_ret = &tlinks[BPF_TRAMP_MODIFY_RETURN]; in __arch_prepare_bpf_trampoline() 2199 struct bpf_tramp_links *fentry = &tlinks[BPF_TRAMP_FENTRY]; in __arch_prepare_bpf_trampoline() 2200 struct bpf_tramp_links *fexit = &tlinks[BPF_TRAMP_FEXIT]; in __arch_prepare_bpf_trampoline() 2468 u32 flags, struct bpf_tramp_links *tlinks, in arch_prepare_bpf_trampoline() argument 2485 tlinks, func_addr); in arch_prepare_bpf_trampoline()
|
/linux-6.3-rc2/arch/x86/net/ |
A D | bpf_jit_comp.c | 2135 struct bpf_tramp_links *tlinks, in arch_prepare_bpf_trampoline() argument 2140 struct bpf_tramp_links *fentry = &tlinks[BPF_TRAMP_FENTRY]; in arch_prepare_bpf_trampoline() 2141 struct bpf_tramp_links *fexit = &tlinks[BPF_TRAMP_FEXIT]; in arch_prepare_bpf_trampoline() 2142 struct bpf_tramp_links *fmod_ret = &tlinks[BPF_TRAMP_MODIFY_RETURN]; in arch_prepare_bpf_trampoline()
|
/linux-6.3-rc2/include/linux/ |
A D | bpf.h | 1016 struct bpf_tramp_links *tlinks, 1490 int bpf_struct_ops_prepare_trampoline(struct bpf_tramp_links *tlinks,
|