| /linux-6.15/kernel/bpf/ |
| H A D | net_namespace.c | 165 struct bpf_prog *new_prog, in bpf_netns_link_update_prog() argument 177 if (new_prog->type != link->prog->type) in bpf_netns_link_update_prog() 192 ret = bpf_prog_array_update_at(run_array, idx, new_prog); in bpf_netns_link_update_prog() 196 old_prog = xchg(&link->prog, new_prog); in bpf_netns_link_update_prog()
|
| H A D | verifier.c | 20340 return new_prog; in bpf_patch_insn_data() 20735 if (!new_prog) in opt_subreg_zext_lo32_rnd_hi32() 20780 if (!new_prog) in convert_ctx_accesses() 20803 if (!new_prog) in convert_ctx_accesses() 20884 if (!new_prog) in convert_ctx_accesses() 21009 if (!new_prog) in convert_ctx_accesses() 21606 if (!new_prog) in do_misc_fixups() 21701 if (!new_prog) in do_misc_fixups() 21731 if (!new_prog) in do_misc_fixups() 22424 if (!new_prog) in do_misc_fixups() [all …]
|
| H A D | bpf_iter.c | 410 struct bpf_prog *new_prog, in bpf_iter_link_replace() argument 421 if (link->prog->type != new_prog->type || in bpf_iter_link_replace() 422 link->prog->expected_attach_type != new_prog->expected_attach_type || in bpf_iter_link_replace() 423 link->prog->aux->attach_btf_id != new_prog->aux->attach_btf_id) { in bpf_iter_link_replace() 428 old_prog = xchg(&link->prog, new_prog); in bpf_iter_link_replace()
|
| H A D | offload.c | 271 int bpf_prog_dev_bound_inherit(struct bpf_prog *new_prog, struct bpf_prog *old_prog) in bpf_prog_dev_bound_inherit() argument 281 new_prog->aux->dev_bound = old_prog->aux->dev_bound; in bpf_prog_dev_bound_inherit() 282 new_prog->aux->offload_requested = old_prog->aux->offload_requested; in bpf_prog_dev_bound_inherit() 290 err = __bpf_prog_dev_bound_init(new_prog, old_prog->aux->offload->netdev); in bpf_prog_dev_bound_inherit()
|
| H A D | cgroup.c | 649 struct bpf_prog *new_prog = prog ? : link->link.prog; in __cgroup_bpf_attach() local 666 atype = bpf_cgroup_atype_find(type, new_prog->aux->attach_btf_id); in __cgroup_bpf_attach() 722 err = bpf_trampoline_link_cgroup_shim(new_prog, atype); in __cgroup_bpf_attach() 743 bpf_trampoline_unlink_cgroup_shim(new_prog); in __cgroup_bpf_attach() 829 struct bpf_prog *new_prog) in __cgroup_bpf_replace() argument 837 atype = bpf_cgroup_atype_find(link->type, new_prog->aux->attach_btf_id); in __cgroup_bpf_replace() 843 if (link->link.prog->type != new_prog->type) in __cgroup_bpf_replace() 855 old_prog = xchg(&link->link.prog, new_prog); in __cgroup_bpf_replace() 861 static int cgroup_bpf_replace(struct bpf_link *link, struct bpf_prog *new_prog, in cgroup_bpf_replace() argument 879 ret = __cgroup_bpf_replace(cg_link->cgroup, cg_link, new_prog); in cgroup_bpf_replace()
|
| H A D | syscall.c | 5488 struct bpf_prog *old_prog = NULL, *new_prog; in link_update() local 5509 new_prog = bpf_prog_get(attr->link_update.new_prog_fd); in link_update() 5510 if (IS_ERR(new_prog)) { in link_update() 5511 ret = PTR_ERR(new_prog); in link_update() 5528 ret = link->ops->update_prog(link, new_prog, old_prog); in link_update() 5536 bpf_prog_put(new_prog); in link_update()
|
| /linux-6.15/tools/testing/selftests/bpf/prog_tests/ |
| H A D | xdp_metadata.c | 353 struct bpf_program *new_prog, *prog; in test_xdp_metadata() local 487 new_prog = bpf_object__find_program_by_name(bpf_obj2->obj, "freplace_rx"); in test_xdp_metadata() 488 bpf_program__set_attach_target(new_prog, bpf_program__fd(prog), "rx"); in test_xdp_metadata()
|
| /linux-6.15/net/core/ |
| H A D | dev.c | 9981 if (link && (new_prog || old_prog)) in dev_xdp_attach() 10033 new_prog = link->link.prog; in dev_xdp_attach() 10035 if (new_prog) { in dev_xdp_attach() 10052 if (bpf_prog_is_dev_bound(new_prog->aux) && !bpf_offload_dev_match(new_prog, dev)) { in dev_xdp_attach() 10071 if (new_prog != cur_prog) { in dev_xdp_attach() 10207 if (old_prog == new_prog) { in bpf_xdp_link_update() 10209 bpf_prog_put(new_prog); in bpf_xdp_link_update() 10318 if (IS_ERR(new_prog)) in dev_change_xdp_fd() 10319 return PTR_ERR(new_prog); in dev_change_xdp_fd() 10335 if (err && new_prog) in dev_change_xdp_fd() [all …]
|
| H A D | filter.c | 577 struct bpf_prog *new_prog, int *new_len, in bpf_convert_filter() argument 592 if (new_prog) { in bpf_convert_filter() 593 first_insn = new_prog->insnsi; in bpf_convert_filter() 605 if (new_prog) { in bpf_convert_filter() 841 if (new_prog && new_prog->aux->stack_depth < stack_off) in bpf_convert_filter() 842 new_prog->aux->stack_depth = stack_off; in bpf_convert_filter() 891 if (new_prog) in bpf_convert_filter() 897 if (!new_prog) { in bpf_convert_filter()
|
| /linux-6.15/net/netfilter/ |
| H A D | nf_bpf_link.c | 165 static int bpf_nf_link_update(struct bpf_link *link, struct bpf_prog *new_prog, in bpf_nf_link_update() argument
|
| /linux-6.15/drivers/net/ethernet/qlogic/qede/ |
| H A D | qede.h | 521 struct bpf_prog *new_prog; member
|
| H A D | qede_filter.c | 1025 old = xchg(&edev->xdp_prog, args->u.new_prog); in qede_xdp_reload_func() 1036 args.u.new_prog = prog; in qede_xdp_set()
|
| /linux-6.15/include/linux/ |
| H A D | bpf.h | 1708 int (*update_prog)(struct bpf_link *link, struct bpf_prog *new_prog, 3127 int bpf_prog_dev_bound_inherit(struct bpf_prog *new_prog, struct bpf_prog *old_prog); 3183 static inline int bpf_prog_dev_bound_inherit(struct bpf_prog *new_prog, in bpf_prog_dev_bound_inherit() argument
|