| /linux/kernel/bpf/ |
| H A D | fixups.c | 222 struct bpf_prog *new_prog, u32 off, u32 cnt) in adjust_insn_aux_data() argument 225 struct bpf_insn *insn = new_prog->insnsi; in adjust_insn_aux_data() 234 data[off].zext_dst = bpf_insn_def32(new_prog, insn + off + cnt - 1) >= 0; in adjust_insn_aux_data() 238 prog_len = new_prog->len; in adjust_insn_aux_data() 247 data[i].zext_dst = bpf_insn_def32(new_prog, insn + i) >= 0; in adjust_insn_aux_data() 326 struct bpf_prog *new_prog; in bpf_patch_insn_data() local 343 new_prog = bpf_patch_insn_single(env->prog, off, patch, len); in bpf_patch_insn_data() 344 if (IS_ERR(new_prog)) { in bpf_patch_insn_data() 345 if (PTR_ERR(new_prog) == -ERANGE) in bpf_patch_insn_data() 351 adjust_insn_aux_data(env, new_prog, off, len); in bpf_patch_insn_data() [all …]
|
| H A D | net_namespace.c | 164 struct bpf_prog *new_prog, in bpf_netns_link_update_prog() argument 178 if (new_prog->type != link->prog->type) in bpf_netns_link_update_prog() 189 ret = bpf_prog_array_update_at(run_array, idx, new_prog); in bpf_netns_link_update_prog() 193 old_prog = xchg(&link->prog, new_prog); in bpf_netns_link_update_prog()
|
| H A D | bpf_iter.c | 409 struct bpf_prog *new_prog, in bpf_iter_link_replace() argument 420 if (link->prog->type != new_prog->type || in bpf_iter_link_replace() 421 link->prog->expected_attach_type != new_prog->expected_attach_type || in bpf_iter_link_replace() 422 link->prog->aux->attach_btf_id != new_prog->aux->attach_btf_id) { in bpf_iter_link_replace() 427 old_prog = xchg(&link->prog, new_prog); in bpf_iter_link_replace()
|
| H A D | cgroup.c | 817 struct bpf_prog *new_prog = prog ? : link->link.prog; in __cgroup_bpf_attach() local 838 atype = bpf_cgroup_atype_find(type, new_prog->aux->attach_btf_id); in __cgroup_bpf_attach() 895 err = bpf_trampoline_link_cgroup_shim(new_prog, atype, type); in __cgroup_bpf_attach() 917 bpf_trampoline_unlink_cgroup_shim(new_prog); in __cgroup_bpf_attach() 1030 struct bpf_prog *new_prog) in cgroup_bpf_storages_compatible() argument 1036 new_prog->aux->cgroup_storage[stype]) in cgroup_bpf_storages_compatible() 1055 struct bpf_prog *new_prog) in __cgroup_bpf_replace() argument 1063 atype = bpf_cgroup_atype_find(link->link.attach_type, new_prog->aux->attach_btf_id); in __cgroup_bpf_replace() 1069 if (link->link.prog->type != new_prog->type) in __cgroup_bpf_replace() 1081 if (!cgroup_bpf_storages_compatible(link->link.prog, new_prog)) in __cgroup_bpf_replace() [all …]
|
| H A D | offload.c | 261 int bpf_prog_dev_bound_inherit(struct bpf_prog *new_prog, struct bpf_prog *old_prog) in bpf_prog_dev_bound_inherit() argument 271 new_prog->aux->dev_bound = old_prog->aux->dev_bound; in bpf_prog_dev_bound_inherit() 272 new_prog->aux->offload_requested = old_prog->aux->offload_requested; in bpf_prog_dev_bound_inherit() 280 err = __bpf_prog_dev_bound_init(new_prog, old_prog->aux->offload->netdev); in bpf_prog_dev_bound_inherit()
|
| H A D | syscall.c | 5949 struct bpf_prog *old_prog = NULL, *new_prog; in link_update() 5970 new_prog = bpf_prog_get(attr->link_update.new_prog_fd); in link_update() 5971 if (IS_ERR(new_prog)) { in link_update() 5972 ret = PTR_ERR(new_prog); in link_update() 5989 ret = link->ops->update_prog(link, new_prog, old_prog); in link_detach() 5997 bpf_prog_put(new_prog); in link_detach() 5932 struct bpf_prog *old_prog = NULL, *new_prog; link_update() local
|
| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | xdp_metadata.c | 353 struct bpf_program *new_prog, *prog; in test_xdp_metadata() local 416 new_prog = bpf_object__find_program_by_name(bpf_obj->obj, "redirect"); in test_xdp_metadata() 417 bpf_program__set_ifindex(new_prog, rx_ifindex); in test_xdp_metadata() 418 bpf_program__set_flags(new_prog, BPF_F_XDP_DEV_BOUND_ONLY); in test_xdp_metadata() 507 new_prog = bpf_object__find_program_by_name(bpf_obj2->obj, "freplace_rx"); in test_xdp_metadata() 508 bpf_program__set_attach_target(new_prog, bpf_program__fd(prog), "rx"); in test_xdp_metadata()
|
| /linux/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/net/core/ |
| H A D | dev.c | 10532 struct bpf_xdp_link *link, struct bpf_prog *new_prog, in dev_xdp_attach() 10546 if (link && (new_prog || old_prog)) in dev_xdp_attach() 10596 /* put effective new program into new_prog */ in dev_xdp_attach_link() 10598 new_prog = link->link.prog; in dev_xdp_attach_link() 10600 if (new_prog) { in dev_xdp_attach_link() 10608 if (new_prog != cur_prog) { in dev_xdp_detach_link() 10615 err = dev_xdp_install(dev, mode, bpf_op, extack, flags, new_prog); in dev_xdp_detach_link() 10623 dev_xdp_set_prog(dev, mode, new_prog); in bpf_xdp_link_release() 10717 static int bpf_xdp_link_update(struct bpf_link *link, struct bpf_prog *new_prog, in bpf_xdp_link_update() 10738 if (old_prog->type != new_prog 10498 dev_xdp_attach(struct net_device * dev,struct netlink_ext_ack * extack,struct bpf_xdp_link * link,struct bpf_prog * new_prog,struct bpf_prog * old_prog,u32 flags) dev_xdp_attach() argument 10683 bpf_xdp_link_update(struct bpf_link * link,struct bpf_prog * new_prog,struct bpf_prog * old_prog) bpf_xdp_link_update() argument 10814 struct bpf_prog *new_prog = NULL, *old_prog = NULL; dev_change_xdp_fd() local [all...] |
| H A D | filter.c | 585 struct bpf_prog *new_prog, int *new_len, in bpf_convert_filter() argument 600 if (new_prog) { in bpf_convert_filter() 601 first_insn = new_prog->insnsi; in bpf_convert_filter() 612 if (new_prog) { in bpf_convert_filter() 848 if (new_prog && new_prog->aux->stack_depth < stack_off) in bpf_convert_filter() 849 new_prog->aux->stack_depth = stack_off; in bpf_convert_filter() 898 if (new_prog) in bpf_convert_filter() 904 if (!new_prog) { in bpf_convert_filter()
|
| /linux/drivers/net/ethernet/qlogic/qede/ |
| H A D | qede.h | 521 struct bpf_prog *new_prog; member
|
| H A D | qede_filter.c | 1022 old = xchg(&edev->xdp_prog, args->u.new_prog); in qede_xdp_reload_func() 1033 args.u.new_prog = prog; in qede_xdp_set()
|
| /linux/include/linux/ |
| H A D | bpf.h | 1993 int (*update_prog)(struct bpf_link *link, struct bpf_prog *new_prog, 3669 int bpf_prog_dev_bound_inherit(struct bpf_prog *new_prog, struct bpf_prog *old_prog); 3725 static inline int bpf_prog_dev_bound_inherit(struct bpf_prog *new_prog, in bpf_map_offload_map_free() 3688 bpf_prog_dev_bound_inherit(struct bpf_prog * new_prog,struct bpf_prog * old_prog) bpf_prog_dev_bound_inherit() argument
|