Home
last modified time | relevance | path

Searched refs:new_prog (Results 1 - 25 of 26) sorted by relevance

12

/kernel/linux/linux-5.10/tools/perf/util/
H A Dbpf-prologue.h19 struct bpf_insn *new_prog, size_t *new_cnt,
27 struct bpf_insn *new_prog __maybe_unused, in bpf__gen_prologue()
H A Dbpf-prologue.c365 struct bpf_insn *new_prog, size_t *new_cnt, in bpf__gen_prologue()
375 if (!new_prog || !new_cnt) in bpf__gen_prologue()
381 pos.begin = new_prog; in bpf__gen_prologue()
382 pos.end = new_prog + cnt_space; in bpf__gen_prologue()
383 pos.pos = new_prog; in bpf__gen_prologue()
364 bpf__gen_prologue(struct probe_trace_arg *args, int nargs, struct bpf_insn *new_prog, size_t *new_cnt, size_t cnt_space) bpf__gen_prologue() argument
/kernel/linux/linux-6.6/tools/perf/util/
H A Dbpf-prologue.h18 struct bpf_insn *new_prog, size_t *new_cnt,
27 struct bpf_insn *new_prog __maybe_unused, in bpf__gen_prologue()
/kernel/linux/linux-5.10/kernel/bpf/
H A Dbpf_iter.c367 struct bpf_prog *new_prog, in bpf_iter_link_replace()
378 if (link->prog->type != new_prog->type || in bpf_iter_link_replace()
379 link->prog->expected_attach_type != new_prog->expected_attach_type || in bpf_iter_link_replace()
380 link->prog->aux->attach_btf_id != new_prog->aux->attach_btf_id) { in bpf_iter_link_replace()
385 old_prog = xchg(&link->prog, new_prog); in bpf_iter_link_replace()
366 bpf_iter_link_replace(struct bpf_link *link, struct bpf_prog *new_prog, struct bpf_prog *old_prog) bpf_iter_link_replace() argument
H A Dnet_namespace.c164 struct bpf_prog *new_prog, in bpf_netns_link_update_prog()
176 if (new_prog->type != link->prog->type) in bpf_netns_link_update_prog()
191 ret = bpf_prog_array_update_at(run_array, idx, new_prog); in bpf_netns_link_update_prog()
195 old_prog = xchg(&link->prog, new_prog); in bpf_netns_link_update_prog()
163 bpf_netns_link_update_prog(struct bpf_link *link, struct bpf_prog *new_prog, struct bpf_prog *old_prog) bpf_netns_link_update_prog() argument
H A Dverifier.c10765 struct bpf_prog *new_prog, u32 off, u32 cnt) in adjust_insn_aux_data()
10768 struct bpf_insn *insn = new_prog->insnsi; in adjust_insn_aux_data()
10781 prog_len = new_prog->len; in adjust_insn_aux_data()
10826 struct bpf_prog *new_prog; in bpf_patch_insn_data() local
10836 new_prog = bpf_patch_insn_single(env->prog, off, patch, len); in bpf_patch_insn_data()
10837 if (IS_ERR(new_prog)) { in bpf_patch_insn_data()
10838 if (PTR_ERR(new_prog) == -ERANGE) in bpf_patch_insn_data()
10845 adjust_insn_aux_data(env, new_data, new_prog, off, len); in bpf_patch_insn_data()
10847 adjust_poke_descs(new_prog, off, len); in bpf_patch_insn_data()
10848 return new_prog; in bpf_patch_insn_data()
10763 adjust_insn_aux_data(struct bpf_verifier_env *env, struct bpf_insn_aux_data *new_data, struct bpf_prog *new_prog, u32 off, u32 cnt) adjust_insn_aux_data() argument
11117 struct bpf_prog *new_prog; opt_subreg_zext_lo32_rnd_hi32() local
11200 struct bpf_prog *new_prog; convert_ctx_accesses() local
11647 struct bpf_prog *new_prog; fixup_bpf_calls() local
[all...]
H A Dcgroup.c575 struct bpf_prog *new_prog) in __cgroup_bpf_replace()
582 if (link->link.prog->type != new_prog->type) in __cgroup_bpf_replace()
594 old_prog = xchg(&link->link.prog, new_prog); in __cgroup_bpf_replace()
600 static int cgroup_bpf_replace(struct bpf_link *link, struct bpf_prog *new_prog, in cgroup_bpf_replace() argument
618 ret = __cgroup_bpf_replace(cg_link->cgroup, cg_link, new_prog); in cgroup_bpf_replace()
573 __cgroup_bpf_replace(struct cgroup *cgrp, struct bpf_cgroup_link *link, struct bpf_prog *new_prog) __cgroup_bpf_replace() argument
H A Dsyscall.c4133 struct bpf_prog *old_prog = NULL, *new_prog; in link_update() local
4149 new_prog = bpf_prog_get(attr->link_update.new_prog_fd); in link_update()
4150 if (IS_ERR(new_prog)) { in link_update()
4151 ret = PTR_ERR(new_prog); in link_update()
4168 ret = link->ops->update_prog(link, new_prog, old_prog); in link_update()
4176 bpf_prog_put(new_prog); in link_update()
/kernel/linux/linux-6.6/kernel/bpf/
H A Dnet_namespace.c165 struct bpf_prog *new_prog, in bpf_netns_link_update_prog()
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()
164 bpf_netns_link_update_prog(struct bpf_link *link, struct bpf_prog *new_prog, struct bpf_prog *old_prog) bpf_netns_link_update_prog() argument
H A Dbpf_iter.c412 struct bpf_prog *new_prog, in bpf_iter_link_replace()
423 if (link->prog->type != new_prog->type || in bpf_iter_link_replace()
424 link->prog->expected_attach_type != new_prog->expected_attach_type || in bpf_iter_link_replace()
425 link->prog->aux->attach_btf_id != new_prog->aux->attach_btf_id) { in bpf_iter_link_replace()
430 old_prog = xchg(&link->prog, new_prog); in bpf_iter_link_replace()
411 bpf_iter_link_replace(struct bpf_link *link, struct bpf_prog *new_prog, struct bpf_prog *old_prog) bpf_iter_link_replace() argument
H A Dcgroup.c616 struct bpf_prog *new_prog = prog ? : link->link.prog; in __cgroup_bpf_attach() local
633 atype = bpf_cgroup_atype_find(type, new_prog->aux->attach_btf_id); in __cgroup_bpf_attach()
688 err = bpf_trampoline_link_cgroup_shim(new_prog, atype); in __cgroup_bpf_attach()
709 bpf_trampoline_unlink_cgroup_shim(new_prog); in __cgroup_bpf_attach()
788 * @new_prog: &struct bpf_prog for the target BPF program with its refcnt
795 struct bpf_prog *new_prog) in __cgroup_bpf_replace()
803 atype = bpf_cgroup_atype_find(link->type, new_prog->aux->attach_btf_id); in __cgroup_bpf_replace()
809 if (link->link.prog->type != new_prog->type) in __cgroup_bpf_replace()
821 old_prog = xchg(&link->link.prog, new_prog); in __cgroup_bpf_replace()
827 static int cgroup_bpf_replace(struct bpf_link *link, struct bpf_prog *new_prog, in cgroup_bpf_replace() argument
793 __cgroup_bpf_replace(struct cgroup *cgrp, struct bpf_cgroup_link *link, struct bpf_prog *new_prog) __cgroup_bpf_replace() argument
[all...]
H A Dverifier.c17786 struct bpf_prog *new_prog, u32 off, u32 cnt) in adjust_insn_aux_data()
17789 struct bpf_insn *insn = new_prog->insnsi; in adjust_insn_aux_data()
17802 prog_len = new_prog->len; in adjust_insn_aux_data()
17847 struct bpf_prog *new_prog; in bpf_patch_insn_data() local
17857 new_prog = bpf_patch_insn_single(env->prog, off, patch, len); in bpf_patch_insn_data()
17858 if (IS_ERR(new_prog)) { in bpf_patch_insn_data()
17859 if (PTR_ERR(new_prog) == -ERANGE) in bpf_patch_insn_data()
17866 adjust_insn_aux_data(env, new_data, new_prog, off, len); in bpf_patch_insn_data()
17868 adjust_poke_descs(new_prog, off, len); in bpf_patch_insn_data()
17869 return new_prog; in bpf_patch_insn_data()
17784 adjust_insn_aux_data(struct bpf_verifier_env *env, struct bpf_insn_aux_data *new_data, struct bpf_prog *new_prog, u32 off, u32 cnt) adjust_insn_aux_data() argument
18138 struct bpf_prog *new_prog; opt_subreg_zext_lo32_rnd_hi32() local
18242 struct bpf_prog *new_prog; convert_ctx_accesses() local
18865 struct bpf_prog *new_prog; do_misc_fixups() local
19394 struct bpf_prog *new_prog; inline_bpf_loop() local
19487 struct bpf_prog *new_prog; optimize_bpf_loop() local
[all...]
H A Doffload.c263 int bpf_prog_dev_bound_inherit(struct bpf_prog *new_prog, struct bpf_prog *old_prog) in bpf_prog_dev_bound_inherit() argument
273 new_prog->aux->dev_bound = old_prog->aux->dev_bound; in bpf_prog_dev_bound_inherit()
274 new_prog->aux->offload_requested = old_prog->aux->offload_requested; in bpf_prog_dev_bound_inherit()
282 err = __bpf_prog_dev_bound_init(new_prog, old_prog->aux->offload->netdev); in bpf_prog_dev_bound_inherit()
H A Dsyscall.c5059 struct bpf_prog *old_prog = NULL, *new_prog; in link_update() local
5080 new_prog = bpf_prog_get(attr->link_update.new_prog_fd); in link_update()
5081 if (IS_ERR(new_prog)) { in link_update()
5082 ret = PTR_ERR(new_prog); in link_update()
5099 ret = link->ops->update_prog(link, new_prog, old_prog); in link_update()
5107 bpf_prog_put(new_prog); in link_update()
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/prog_tests/
H A Dxdp_metadata.c283 struct bpf_program *new_prog, *prog; in test_xdp_metadata() local
377 new_prog = bpf_object__find_program_by_name(bpf_obj2->obj, "freplace_rx"); in test_xdp_metadata()
378 bpf_program__set_attach_target(new_prog, bpf_program__fd(prog), "rx"); in test_xdp_metadata()
/kernel/linux/linux-6.6/net/core/
H A Ddev.c9250 struct bpf_xdp_link *link, struct bpf_prog *new_prog, in dev_xdp_attach()
9264 if (link && (new_prog || old_prog)) in dev_xdp_attach()
9314 /* put effective new program into new_prog */ in dev_xdp_attach()
9316 new_prog = link->link.prog; in dev_xdp_attach()
9318 if (new_prog) { in dev_xdp_attach()
9331 if (!offload && bpf_prog_is_offloaded(new_prog->aux)) { in dev_xdp_attach()
9335 if (bpf_prog_is_dev_bound(new_prog->aux) && !bpf_offload_dev_match(new_prog, dev)) { in dev_xdp_attach()
9339 if (new_prog->expected_attach_type == BPF_XDP_DEVMAP) { in dev_xdp_attach()
9343 if (new_prog in dev_xdp_attach()
9249 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
9457 bpf_xdp_link_update(struct bpf_link *link, struct bpf_prog *new_prog, struct bpf_prog *old_prog) bpf_xdp_link_update() argument
9583 struct bpf_prog *new_prog = NULL, *old_prog = NULL; dev_change_xdp_fd() local
[all...]
H A Dfilter.c546 * @new_prog: allocated 'struct bpf_prog' or NULL
559 * bpf_convert_filter(old_prog, old_len, new_prog, &new_len, &seen_ld_abs)
562 struct bpf_prog *new_prog, int *new_len, in bpf_convert_filter()
577 if (new_prog) { in bpf_convert_filter()
578 first_insn = new_prog->insnsi; in bpf_convert_filter()
590 if (new_prog) { in bpf_convert_filter()
826 if (new_prog && new_prog->aux->stack_depth < stack_off) in bpf_convert_filter()
827 new_prog->aux->stack_depth = stack_off; in bpf_convert_filter()
876 if (new_prog) in bpf_convert_filter()
561 bpf_convert_filter(struct sock_filter *prog, int len, struct bpf_prog *new_prog, int *new_len, bool *seen_ld_abs) bpf_convert_filter() argument
[all...]
/kernel/linux/linux-5.10/net/core/
H A Ddev.c9148 struct bpf_xdp_link *link, struct bpf_prog *new_prog, in dev_xdp_attach()
9160 if (link && (new_prog || old_prog)) in dev_xdp_attach()
9202 /* put effective new program into new_prog */ in dev_xdp_attach()
9204 new_prog = link->link.prog; in dev_xdp_attach()
9206 if (new_prog) { in dev_xdp_attach()
9219 if (!offload && bpf_prog_is_dev_bound(new_prog->aux)) { in dev_xdp_attach()
9223 if (new_prog->expected_attach_type == BPF_XDP_DEVMAP) { in dev_xdp_attach()
9227 if (new_prog->expected_attach_type == BPF_XDP_CPUMAP) { in dev_xdp_attach()
9234 if (new_prog != cur_prog) { in dev_xdp_attach()
9241 err = dev_xdp_install(dev, mode, bpf_op, extack, flags, new_prog); in dev_xdp_attach()
9147 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
9341 bpf_xdp_link_update(struct bpf_link *link, struct bpf_prog *new_prog, struct bpf_prog *old_prog) bpf_xdp_link_update() argument
9465 struct bpf_prog *new_prog = NULL, *old_prog = NULL; dev_change_xdp_fd() local
[all...]
H A Dfilter.c546 * @new_prog: allocated 'struct bpf_prog' or NULL
559 * bpf_convert_filter(old_prog, old_len, new_prog, &new_len, &seen_ld_abs)
562 struct bpf_prog *new_prog, int *new_len, in bpf_convert_filter()
577 if (new_prog) { in bpf_convert_filter()
578 first_insn = new_prog->insnsi; in bpf_convert_filter()
590 if (new_prog) { in bpf_convert_filter()
826 if (new_prog && new_prog->aux->stack_depth < stack_off) in bpf_convert_filter()
827 new_prog->aux->stack_depth = stack_off; in bpf_convert_filter()
876 if (new_prog) in bpf_convert_filter()
561 bpf_convert_filter(struct sock_filter *prog, int len, struct bpf_prog *new_prog, int *new_len, bool *seen_ld_abs) bpf_convert_filter() argument
[all...]
/kernel/linux/linux-6.6/net/netfilter/
H A Dnf_bpf_link.c162 static int bpf_nf_link_update(struct bpf_link *link, struct bpf_prog *new_prog, in bpf_nf_link_update() argument
/kernel/linux/linux-5.10/drivers/net/ethernet/qlogic/qede/
H A Dqede.h525 struct bpf_prog *new_prog; member
H A Dqede_filter.c1027 old = xchg(&edev->xdp_prog, args->u.new_prog); in qede_xdp_reload_func()
1038 args.u.new_prog = prog; in qede_xdp_set()
/kernel/linux/linux-6.6/drivers/net/ethernet/qlogic/qede/
H A Dqede.h521 struct bpf_prog *new_prog; member
H A Dqede_filter.c1025 old = xchg(&edev->xdp_prog, args->u.new_prog); in qede_xdp_reload_func()
1036 args.u.new_prog = prog; in qede_xdp_set()
/kernel/linux/linux-6.6/include/linux/
H A Dbpf.h1534 int (*update_prog)(struct bpf_link *link, struct bpf_prog *new_prog,
2793 int bpf_prog_dev_bound_inherit(struct bpf_prog *new_prog, struct bpf_prog *old_prog);
2848 static inline int bpf_prog_dev_bound_inherit(struct bpf_prog *new_prog, in bpf_prog_dev_bound_inherit() argument

Completed in 141 milliseconds

12