Home
last modified time | relevance | path

Searched refs:prog (Results 1 – 25 of 452) sorted by relevance

12345678910>>...19

/linux/net/sched/
H A Dcls_bpf.c87 struct cls_bpf_prog *prog; in cls_bpf_classify() local
90 list_for_each_entry_rcu(prog, &head->plist, link) { in cls_bpf_classify()
93 qdisc_skb_cb(skb)->tc_classid = prog->res.classid; in cls_bpf_classify()
95 if (tc_skip_sw(prog->gen_flags)) { in cls_bpf_classify()
96 filter_res = prog->exts_integrated ? TC_ACT_UNSPEC : 0; in cls_bpf_classify()
100 filter_res = bpf_prog_run_data_pointers(prog->filter, skb); in cls_bpf_classify()
103 filter_res = bpf_prog_run_data_pointers(prog->filter, skb); in cls_bpf_classify()
108 if (prog->exts_integrated) { in cls_bpf_classify()
110 res->classid = TC_H_MAJ(prog->res.classid) | in cls_bpf_classify()
125 *res = prog in cls_bpf_classify()
138 cls_bpf_is_ebpf(const struct cls_bpf_prog * prog) cls_bpf_is_ebpf() argument
143 cls_bpf_offload_cmd(struct tcf_proto * tp,struct cls_bpf_prog * prog,struct cls_bpf_prog * oldprog,struct netlink_ext_ack * extack) cls_bpf_offload_cmd() argument
195 cls_bpf_offload(struct tcf_proto * tp,struct cls_bpf_prog * prog,struct cls_bpf_prog * oldprog,struct netlink_ext_ack * extack) cls_bpf_offload() argument
215 cls_bpf_stop_offload(struct tcf_proto * tp,struct cls_bpf_prog * prog,struct netlink_ext_ack * extack) cls_bpf_stop_offload() argument
226 cls_bpf_offload_update_stats(struct tcf_proto * tp,struct cls_bpf_prog * prog) cls_bpf_offload_update_stats() argument
256 cls_bpf_free_parms(struct cls_bpf_prog * prog) cls_bpf_free_parms() argument
267 __cls_bpf_delete_prog(struct cls_bpf_prog * prog) __cls_bpf_delete_prog() argument
278 struct cls_bpf_prog *prog = container_of(to_rcu_work(work), cls_bpf_delete_prog_work() local
286 __cls_bpf_delete(struct tcf_proto * tp,struct cls_bpf_prog * prog,struct netlink_ext_ack * extack) __cls_bpf_delete() argument
315 struct cls_bpf_prog *prog, *tmp; cls_bpf_destroy() local
327 struct cls_bpf_prog *prog; cls_bpf_get() local
337 cls_bpf_prog_from_ops(struct nlattr ** tb,struct cls_bpf_prog * prog) cls_bpf_prog_from_ops() argument
374 cls_bpf_prog_from_efd(struct nlattr ** tb,struct cls_bpf_prog * prog,u32 gen_flags,const struct tcf_proto * tp) cls_bpf_prog_from_efd() argument
418 struct cls_bpf_prog *prog; cls_bpf_change() local
538 cls_bpf_dump_bpf_info(const struct cls_bpf_prog * prog,struct sk_buff * skb) cls_bpf_dump_bpf_info() argument
556 cls_bpf_dump_ebpf_info(const struct cls_bpf_prog * prog,struct sk_buff * skb) cls_bpf_dump_ebpf_info() argument
580 struct cls_bpf_prog *prog = fh; cls_bpf_dump() local
633 struct cls_bpf_prog *prog = fh; cls_bpf_bind_class() local
642 struct cls_bpf_prog *prog; cls_bpf_walk() local
656 struct cls_bpf_prog *prog; cls_bpf_reoffload() local
[all...]
H A Dact_bpf.c40 struct tcf_bpf *prog = to_bpf(act); in tcf_bpf_act() local
44 tcf_lastuse_update(&prog->tcf_tm); in tcf_bpf_act()
45 bstats_update(this_cpu_ptr(prog->common.cpu_bstats), skb); in tcf_bpf_act()
47 filter = rcu_dereference(prog->filter); in tcf_bpf_act()
79 qstats_cpu_drop_inc(prog->common.cpu_qstats); in tcf_bpf_act()
82 action = prog->tcf_action; in tcf_bpf_act()
92 static bool tcf_bpf_is_ebpf(const struct tcf_bpf *prog) in tcf_bpf_is_ebpf() argument
94 return !prog->bpf_ops; in tcf_bpf_is_ebpf()
97 static int tcf_bpf_dump_bpf_info(const struct tcf_bpf *prog, in tcf_bpf_dump_bpf_info() argument
102 if (nla_put_u16(skb, TCA_ACT_BPF_OPS_LEN, prog in tcf_bpf_dump_bpf_info()
115 tcf_bpf_dump_ebpf_info(const struct tcf_bpf * prog,struct sk_buff * skb) tcf_bpf_dump_ebpf_info() argument
140 struct tcf_bpf *prog = to_bpf(act); tcf_bpf_dump() local
264 tcf_bpf_prog_fill_cfg(const struct tcf_bpf * prog,struct tcf_bpf_cfg * cfg) tcf_bpf_prog_fill_cfg() argument
288 struct tcf_bpf *prog; tcf_bpf_init() local
[all...]
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dexceptions.c44 ASSERT_OK(ret, #_prog " prog run ret"); \ in test_exceptions_success()
45 ASSERT_EQ(ropts.retval, return_val, #_prog " prog run retval"); \ in test_exceptions_success()
102 struct bpf_program *prog = NULL; \ in test_exceptions_success()
107 ASSERT_OK_PTR(bpf_program__name(prog), bpf_program__name(prog)); \ in test_exceptions_success()
120 if (!ASSERT_ERR_PTR(link = bpf_program__attach(prog), "attach err")) \ in test_exceptions_success()
123 if (!ASSERT_OK_PTR(link = bpf_program__attach(prog), "attach ok")) \ in test_exceptions_success()
132 prog = eskel->progs.pfentry; in test_exceptions_success()
133 bpf_program__set_autoload(prog, true); in test_exceptions_success()
134 if (!ASSERT_OK(bpf_program__set_attach_target(prog, in test_exceptions_success()
[all...]
H A Dtailcalls.c24 struct bpf_program *prog; in test_tailcall_1()
39 prog = bpf_object__find_program_by_name(obj, "entry"); in test_tailcall_1()
40 if (CHECK_FAIL(!prog)) in test_tailcall_1()
43 main_fd = bpf_program__fd(prog); in test_tailcall_1()
58 prog = bpf_object__find_program_by_name(obj, prog_name); in test_tailcall_1()
59 if (CHECK_FAIL(!prog)) in test_tailcall_1()
62 prog_fd = bpf_program__fd(prog); in test_tailcall_1()
88 prog = bpf_object__find_program_by_name(obj, prog_name); in test_tailcall_1()
89 if (CHECK_FAIL(!prog)) in test_tailcall_1()
92 prog_fd = bpf_program__fd(prog); in test_tailcall_1()
20 struct bpf_program *prog; test_tailcall_1() local
156 struct bpf_program *prog; test_tailcall_2() local
235 struct bpf_program *prog; test_tailcall_count() local
416 struct bpf_program *prog; test_tailcall_4() local
506 struct bpf_program *prog; test_tailcall_5() local
596 struct bpf_program *prog; test_tailcall_bpf2bpf_1() local
680 struct bpf_program *prog; test_tailcall_bpf2bpf_2() local
760 struct bpf_program *prog; test_tailcall_bpf2bpf_3() local
855 struct bpf_program *prog; test_tailcall_bpf2bpf_4() local
1019 struct bpf_program *prog; test_tailcall_bpf2bpf_fentry_entry() local
1201 struct bpf_program *prog, *fentry_prog; test_tailcall_hierarchy_count() local
[all...]
H A Dtrampoline_count.c13 struct bpf_program *prog; in load_prog() local
26 prog = bpf_object__find_program_by_name(obj, name); in load_prog()
27 if (!ASSERT_OK_PTR(prog, "obj_find_prog")) in load_prog()
30 return prog; in load_prog()
38 struct bpf_program *prog; in serial_test_trampoline_count()
51 prog = load_prog(file, progs[i % ARRAY_SIZE(progs)], &inst[i]); in serial_test_trampoline_count()
52 if (!prog) in serial_test_trampoline_count()
55 link = bpf_program__attach(prog); in serial_test_trampoline_count()
63 prog = load_prog(file, "fmod_ret_test", &inst[i]); in serial_test_trampoline_count()
64 if (!prog) in serial_test_trampoline_count()
39 struct bpf_program *prog; serial_test_trampoline_count() local
[all...]
H A Dtrace_ext.c24 struct bpf_program *prog; in test_trace_ext() local
42 prog = skel_pkt->progs.test_pkt_md_access; in test_trace_ext()
43 pkt_fd = bpf_program__fd(prog); in test_trace_ext()
51 prog = skel_ext->progs.test_pkt_md_access_new; in test_trace_ext()
52 bpf_program__set_attach_target(prog, pkt_fd, "test_pkt_md_access"); in test_trace_ext()
66 prog = skel_ext->progs.test_pkt_md_access_new; in test_trace_ext()
67 ext_fd = bpf_program__fd(prog); in test_trace_ext()
75 prog = skel_trace->progs.fentry; in test_trace_ext()
76 bpf_program__set_attach_target(prog, ext_fd, "test_pkt_md_access_new"); in test_trace_ext()
79 prog = skel_trace->progs.fexit; in test_trace_ext()
[all …]
H A Dfexit_bpf2bpf.c66 struct bpf_program **prog = NULL, *p; in test_fexit_bpf2bpf_common() local
93 prog = calloc(sizeof(struct bpf_program *), prog_cnt); in test_fexit_bpf2bpf_common()
94 if (!ASSERT_OK_PTR(prog, "prog_ptr")) in test_fexit_bpf2bpf_common()
122 prog[i] = NULL; in test_fexit_bpf2bpf_common()
126 prog[i] = pos; in test_fexit_bpf2bpf_common()
130 if (!ASSERT_OK_PTR(prog[i], prog_name[i])) in test_fexit_bpf2bpf_common()
133 link[i] = bpf_program__attach_trace(prog[i]); in test_fexit_bpf2bpf_common()
143 bpf_program__expected_attach_type(prog[i]), in test_fexit_bpf2bpf_common()
171 free(prog); in test_fexit_bpf2bpf_common()
233 struct bpf_program *prog in test_second_attach() local
291 struct bpf_program *prog; test_fmod_ret_freplace() local
359 struct bpf_program *prog; test_obj_load_failure_common() local
[all...]
/linux/arch/x86/net/
H A Dbpf_jit_comp.c40 do { prog = emit_code(prog, bytes, len); } while (0)
334 u8 *prog = *pprog; in push_r9()
337 *pprog = prog; in push_r9()
342 u8 *prog = *pprog; in pop_r9()
345 *pprog = prog; in pop_r9()
350 u8 *prog = *pprog; in push_r12()
353 *pprog = prog; in push_r12()
358 u8 *prog = *pprog; in push_callee_regs()
368 *pprog = prog; in push_callee_regs()
333 u8 *prog = *pprog; push_r9() local
341 u8 *prog = *pprog; pop_r9() local
349 u8 *prog = *pprog; push_r12() local
357 u8 *prog = *pprog; push_callee_regs() local
372 u8 *prog = *pprog; pop_r12() local
380 u8 *prog = *pprog; pop_callee_regs() local
395 u8 *prog = *pprog; emit_nops() local
420 u8 *prog = *pprog; emit_fineibt() local
437 u8 *prog = *pprog; emit_kcfi() local
451 u8 *prog = *pprog; emit_cfi() local
472 u8 *prog = *pprog; emit_prologue_tail_call() local
510 u8 *prog = *pprog; emit_prologue() local
561 u8 *prog = *pprog; emit_patch() local
598 u8 *prog; __bpf_arch_text_poke() local
658 u8 *prog = *pprog; __emit_indirect_jump() local
670 u8 *prog = *pprog; emit_indirect_jump() local
697 u8 *prog = *pprog; emit_return() local
732 u8 *prog = *pprog, *start = *pprog; emit_bpf_tail_call_indirect() local
821 u8 *prog = *pprog, *start = *pprog; emit_bpf_tail_call_direct() local
871 bpf_tail_call_direct_fixup(struct bpf_prog * prog) bpf_tail_call_direct_fixup() argument
912 u8 *prog = *pprog; emit_mov_imm32() local
953 u8 *prog = *pprog; emit_mov_imm64() local
977 u8 *prog = *pprog; emit_mov_reg() local
995 u8 *prog = *pprog; emit_movsx_reg() local
1027 u8 *prog = *pprog; emit_insn_suffix() local
1046 u8 *prog = *pprog; emit_insn_suffix_SIB() local
1061 u8 *prog = *pprog; maybe_emit_mod() local
1075 u8 *prog = *pprog; maybe_emit_1mod() local
1087 u8 *prog = *pprog; emit_ldx() local
1117 u8 *prog = *pprog; emit_ldsx() local
1139 u8 *prog = *pprog; emit_ldx_index() local
1165 u8 *prog = *pprog; emit_ldsx_index() local
1190 emit_ldsx_r12(u8 ** prog,u32 size,u32 dst_reg,u32 src_reg,int off) emit_ldsx_r12() argument
1198 u8 *prog = *pprog; emit_stx() local
1232 u8 *prog = *pprog; emit_stx_index() local
1264 u8 *prog = *pprog; emit_st_index() local
1307 u8 *prog = *pprog; emit_atomic_rmw() local
1350 u8 *prog = *pprog; emit_atomic_rmw_index() local
1535 u8 *prog = *pprog; emit_3vex() local
1571 u8 *prog = *pprog; emit_shiftx() local
1582 u8 *prog = *pprog; emit_priv_frame_ptr() local
1613 u8 *prog = *pprog; emit_spectre_bhb_barrier() local
1666 u8 *ip, *prog = temp; do_jit() local
2803 u8 *prog; clean_stack_garbage() local
2863 save_args(const struct btf_func_model * m,u8 ** prog,int stack_size,bool for_call_origin,u32 flags) save_args() argument
2941 restore_regs(const struct btf_func_model * m,u8 ** prog,int stack_size) restore_regs() argument
2978 u8 *prog = *pprog; invoke_bpf_prog() local
3064 u8 *target, *prog = *pprog; emit_align() local
3075 u8 *prog = *pprog; emit_cond_near_jump() local
3095 u8 *prog = *pprog; invoke_bpf() local
3116 u8 *prog = *pprog; invoke_bpf_mod_ret() local
3228 u8 *prog; __arch_prepare_bpf_trampoline() local
3591 u8 *jg_reloc, *prog = *pprog; emit_bpf_dispatcher() local
3671 u8 *prog = buf; arch_prepare_bpf_dispatcher() local
3690 priv_stack_check_guard(void __percpu * priv_stack_ptr,int alloc_size,struct bpf_prog * prog) priv_stack_check_guard() argument
3718 bpf_int_jit_compile(struct bpf_verifier_env * env,struct bpf_prog * prog) bpf_int_jit_compile() argument
3931 bpf_jit_free(struct bpf_prog * prog) bpf_jit_free() argument
[all...]
/linux/drivers/clk/at91/
H A Dclk-programmable.c35 struct clk_programmable *prog = to_clk_programmable(hw); in clk_programmable_recalc_rate() local
36 const struct clk_programmable_layout *layout = prog->layout; in clk_programmable_recalc_rate()
40 regmap_read(prog->regmap, AT91_PMC_PCKR(prog->id), &pckr); in clk_programmable_recalc_rate()
53 struct clk_programmable *prog = to_clk_programmable(hw); in clk_programmable_determine_rate() local
54 const struct clk_programmable_layout *layout = prog->layout; in clk_programmable_determine_rate()
105 struct clk_programmable *prog = to_clk_programmable(hw); in clk_programmable_set_parent() local
106 const struct clk_programmable_layout *layout = prog->layout; in clk_programmable_set_parent()
113 if (prog->mux_table) in clk_programmable_set_parent()
114 pckr = clk_mux_index_to_val(prog->mux_table, 0, index); in clk_programmable_set_parent()
123 regmap_update_bits(prog->regmap, AT91_PMC_PCKR(prog->id), mask, pckr); in clk_programmable_set_parent()
[all …]
/linux/tools/workqueue/
H A Dwq_dump.py95 worker_pool_idr = prog['worker_pool_idr']
96 workqueues = prog['workqueues']
97 wq_unbound_cpumask = prog['wq_unbound_cpumask']
98 wq_pod_types = prog['wq_pod_types']
99 wq_affn_dfl = prog['wq_affn_dfl']
100 wq_affn_names = prog['wq_affn_names']
102 WQ_BH = prog['WQ_BH']
103 WQ_UNBOUND = prog['WQ_UNBOUND']
104 WQ_ORDERED = prog['__WQ_ORDERED']
105 WQ_MEM_RECLAIM = prog['WQ_MEM_RECLAI
[all...]
H A Dwq_monitor.py54 workqueues = prog['workqueues']
56 WQ_UNBOUND = prog['WQ_UNBOUND']
57 WQ_MEM_RECLAIM = prog['WQ_MEM_RECLAIM']
59 PWQ_STAT_STARTED = prog['PWQ_STAT_STARTED'] # work items started execution
60 PWQ_STAT_COMPLETED = prog['PWQ_STAT_COMPLETED'] # work items completed execution
61 PWQ_STAT_CPU_TIME = prog['PWQ_STAT_CPU_TIME'] # total CPU time consumed
62 PWQ_STAT_CPU_INTENSIVE = prog['PWQ_STAT_CPU_INTENSIVE'] # wq_cpu_intensive_thresh_us violations
63 PWQ_STAT_CM_WAKEUP = prog['PWQ_STAT_CM_WAKEUP'] # concurrency-management worker wakeups
64 PWQ_STAT_REPATRIATED = prog['PWQ_STAT_REPATRIATED'] # unbound workers brought back into scope
65 PWQ_STAT_MAYDAY = prog['PWQ_STAT_MAYDAY'] # maydays to rescuer
[all …]
/linux/kernel/bpf/
H A Dmprog.c20 if (type && link->prog->type != type) { in bpf_mprog_link()
26 tuple->prog = link->prog; in bpf_mprog_link()
34 struct bpf_prog *prog = ERR_PTR(-EINVAL); in bpf_mprog_prog() local
38 prog = bpf_prog_by_id(id_or_fd); in bpf_mprog_prog()
40 prog = bpf_prog_get(id_or_fd); in bpf_mprog_prog()
41 if (IS_ERR(prog)) in bpf_mprog_prog()
42 return PTR_ERR(prog); in bpf_mprog_prog()
43 if (type && prog->type != type) { in bpf_mprog_prog()
44 bpf_prog_put(prog); in bpf_mprog_prog()
49 tuple->prog = prog; in bpf_mprog_prog()
[all …]
H A Dsyscall.c2351 static int find_prog_type(enum bpf_prog_type type, struct bpf_prog *prog) in bpf_prog_free_id()
2362 if (!bpf_prog_is_offloaded(prog->aux)) in __bpf_prog_put_rcu()
2363 prog->aux->ops = ops; in __bpf_prog_put_rcu()
2365 prog->aux->ops = &bpf_offload_prog_ops; in __bpf_prog_put_rcu()
2366 prog->type = type; in __bpf_prog_put_rcu()
2381 static void bpf_audit_prog(const struct bpf_prog *prog, unsigned int op) in __bpf_prog_put_noref()
2395 audit_log_format(ab, "prog-id=%u op=%s", in bpf_prog_put_deferred()
2396 prog->aux->id, bpf_audit_str[op]); in bpf_prog_put_deferred()
2400 static int bpf_prog_alloc_id(struct bpf_prog *prog) in bpf_prog_put_deferred()
2406 id = idr_alloc_cyclic(&prog_idr, prog, in __bpf_prog_put()
2272 find_prog_type(enum bpf_prog_type type,struct bpf_prog * prog) find_prog_type() argument
2302 bpf_audit_prog(const struct bpf_prog * prog,unsigned int op) bpf_audit_prog() argument
2321 bpf_prog_alloc_id(struct bpf_prog * prog) bpf_prog_alloc_id() argument
2340 bpf_prog_free_id(struct bpf_prog * prog) bpf_prog_free_id() argument
2369 __bpf_prog_put_noref(struct bpf_prog * prog,bool deferred) __bpf_prog_put_noref() argument
2394 struct bpf_prog *prog; bpf_prog_put_deferred() local
2404 __bpf_prog_put(struct bpf_prog * prog) __bpf_prog_put() argument
2418 bpf_prog_put(struct bpf_prog * prog) bpf_prog_put() argument
2426 struct bpf_prog *prog = filp->private_data; bpf_prog_release() local
2438 bpf_prog_inc_misses_counter(struct bpf_prog * prog) bpf_prog_inc_misses_counter() argument
2452 bpf_prog_get_stats(const struct bpf_prog * prog,struct bpf_prog_kstats * stats) bpf_prog_get_stats() argument
2482 const struct bpf_prog *prog = filp->private_data; bpf_prog_show_fdinfo() local
2519 bpf_prog_new_fd(struct bpf_prog * prog) bpf_prog_new_fd() argument
2531 bpf_prog_add(struct bpf_prog * prog,int i) bpf_prog_add() argument
2537 bpf_prog_sub(struct bpf_prog * prog,int i) bpf_prog_sub() argument
2548 bpf_prog_inc(struct bpf_prog * prog) bpf_prog_inc() argument
2555 bpf_prog_inc_not_zero(struct bpf_prog * prog) bpf_prog_inc_not_zero() argument
2568 bpf_prog_get_ok(struct bpf_prog * prog,enum bpf_prog_type * attach_type,bool attach_drv) bpf_prog_get_ok() argument
2587 struct bpf_prog *prog; __bpf_prog_get() local
2801 bpf_prog_verify_signature(struct bpf_prog * prog,union bpf_attr * attr,bool is_kernel) bpf_prog_verify_signature() argument
2844 bpf_prog_mark_insn_arrays_ready(struct bpf_prog * prog) bpf_prog_mark_insn_arrays_ready() argument
2867 struct bpf_prog *prog, *dst_prog = NULL; bpf_prog_load() local
3181 bpf_link_init_sleepable(struct bpf_link * link,enum bpf_link_type type,const struct bpf_link_ops * ops,struct bpf_prog * prog,enum bpf_attach_type attach_type,bool sleepable) bpf_link_init_sleepable() argument
3195 bpf_link_init(struct bpf_link * link,enum bpf_link_type type,const struct bpf_link_ops * ops,struct bpf_prog * prog,enum bpf_attach_type attach_type) bpf_link_init() argument
3352 const struct bpf_prog *prog = link->prog; bpf_link_show_fdinfo() local
3569 bpf_tracing_prog_attach(struct bpf_prog * prog,int tgt_prog_fd,u32 btf_id,u64 bpf_cookie,enum bpf_attach_type attach_type) bpf_tracing_prog_attach() argument
4191 bpf_perf_link_attach(const union bpf_attr * attr,struct bpf_prog * prog) bpf_perf_link_attach() argument
4237 bpf_perf_link_attach(const union bpf_attr * attr,struct bpf_prog * prog) bpf_perf_link_attach() argument
4243 bpf_raw_tp_link_attach(struct bpf_prog * prog,const char __user * user_tp_name,u64 cookie,enum bpf_attach_type attach_type) bpf_raw_tp_link_attach() argument
4318 struct bpf_prog *prog; bpf_raw_tracepoint_open() local
4412 bpf_prog_attach_check_attach_type(const struct bpf_prog * prog,enum bpf_attach_type attach_type) bpf_prog_attach_check_attach_type() argument
4520 struct bpf_prog *prog; bpf_prog_attach() local
4588 struct bpf_prog *prog = NULL; bpf_prog_detach() local
4723 struct bpf_prog *prog; bpf_prog_test_run() local
4797 struct bpf_prog *prog; bpf_prog_get_curr_or_next() local
4818 struct bpf_prog *prog; bpf_prog_by_id() local
4835 struct bpf_prog *prog; bpf_prog_get_fd_by_id() local
4894 bpf_map_from_imm(const struct bpf_prog * prog,unsigned long addr,u32 * off,u32 * type) bpf_map_from_imm() argument
4945 bpf_insn_prepare_dump(const struct bpf_prog * prog,const struct cred * f_cred) bpf_insn_prepare_dump() argument
5038 bpf_prog_get_info_by_fd(struct file * file,struct bpf_prog * prog,const union bpf_attr * attr,union bpf_attr __user * uattr) bpf_prog_get_info_by_fd() argument
5729 struct bpf_prog *prog; link_create() local
6094 struct bpf_prog *prog; bpf_prog_bind_map() local
6176 struct bpf_prog *prog; prog_stream_read() local
6196 struct bpf_prog *prog; prog_assoc_struct_ops() local
6392 syscall_prog_is_valid_access(int off,int size,enum bpf_access_type type,const struct bpf_prog * prog,struct bpf_insn_access_aux * info) syscall_prog_is_valid_access() argument
6430 struct bpf_prog * __maybe_unused prog; kern_sys_bpf() local
6480 tracing_prog_func_proto(enum bpf_func_id func_id,const struct bpf_prog * prog) tracing_prog_func_proto() argument
6530 syscall_prog_func_proto(enum bpf_func_id func_id,const struct bpf_prog * prog) syscall_prog_func_proto() argument
[all...]
H A Dfixups.c71 bpf_jit_find_kfunc_model(const struct bpf_prog *prog, in bpf_jit_find_kfunc_model() argument
81 tab = prog->aux->kfunc_tab; in bpf_jit_find_kfunc_model()
112 tab = env->prog->aux->kfunc_tab; in sort_kfunc_descs_by_imm_off()
155 /* single env->prog->insni[off] instruction was replaced with the range
170 * original insn at old prog. in adjust_insn_aux_data()
233 static void adjust_poke_descs(struct bpf_prog *prog, u32 off, u32 len) in adjust_poke_descs() argument
235 struct bpf_jit_poke_descriptor *tab = prog->aux->poke_tab; in adjust_poke_descs()
236 int i, sz = prog->aux->size_poke_tab; in adjust_poke_descs()
255 array_size(env->prog->len + len - 1, in bpf_patch_insn_data()
264 new_prog = bpf_patch_insn_single(env->prog, of in bpf_patch_insn_data()
283 adjust_jmp_off(struct bpf_prog * prog,u32 tgt_idx,u32 delta) adjust_jmp_off() argument
376 struct bpf_prog *prog = env->prog; bpf_adj_linfo_after_remove() local
1030 struct bpf_prog *prog = env->prog, **func, *tmp; jit_subprogs() local
1300 struct bpf_prog *prog, *orig_prog; bpf_jit_subprogs() local
1378 struct bpf_prog *prog = env->prog; bpf_fixup_call_args() local
1437 struct bpf_prog *prog; add_hidden_subprog() local
1464 struct bpf_prog *prog = env->prog; bpf_do_misc_fixups() local
[all...]
H A Dcore.c126 fp->aux->prog = fp; in bpf_prog_alloc_no_stats()
152 struct bpf_prog *prog; in bpf_prog_alloc() local
155 prog = bpf_prog_alloc_no_stats(size, gfp_extra_flags); in bpf_prog_alloc()
156 if (!prog) in bpf_prog_alloc()
159 prog->stats = alloc_percpu_gfp(struct bpf_prog_stats, gfp_flags); in bpf_prog_alloc()
160 if (!prog->stats) { in bpf_prog_alloc()
161 free_percpu(prog->active); in bpf_prog_alloc()
162 kfree(prog->aux); in bpf_prog_alloc()
163 vfree(prog); in bpf_prog_alloc()
170 pstats = per_cpu_ptr(prog in bpf_prog_alloc()
177 bpf_prog_alloc_jited_linfo(struct bpf_prog * prog) bpf_prog_alloc_jited_linfo() argument
191 bpf_prog_jit_attempt_done(struct bpf_prog * prog) bpf_prog_jit_attempt_done() argument
227 bpf_prog_fill_jited_linfo(struct bpf_prog * prog,const u32 * insn_to_jit_off) bpf_prog_fill_jited_linfo() argument
387 bpf_adj_branches(struct bpf_prog * prog,u32 pos,s32 end_old,s32 end_new,const bool probe_pass) bpf_adj_branches() argument
434 bpf_adj_linfo(struct bpf_prog * prog,u32 off,u32 delta) bpf_adj_linfo() argument
454 bpf_patch_insn_single(struct bpf_prog * prog,u32 off,const struct bpf_insn * patch,u32 len) bpf_patch_insn_single() argument
515 bpf_remove_insns(struct bpf_prog * prog,u32 off,u32 cnt) bpf_remove_insns() argument
554 bpf_prog_ksym_set_addr(struct bpf_prog * prog) bpf_prog_ksym_set_addr() argument
563 bpf_prog_ksym_set_name(struct bpf_prog * prog) bpf_prog_ksym_set_name() argument
785 struct bpf_prog *prog; search_bpf_extables() local
828 bpf_jit_add_poke_descriptor(struct bpf_prog * prog,struct bpf_jit_poke_descriptor * poke) bpf_jit_add_poke_descriptor() argument
1246 bpf_jit_get_func_addr(const struct bpf_prog * prog,const struct bpf_insn * insn,bool extra_pass,u64 * func_addr,bool * func_addr_fixed) bpf_jit_get_func_addr() argument
1286 bpf_jit_get_prog_name(struct bpf_prog * prog) bpf_jit_get_prog_name() argument
1498 bpf_jit_blind_constants(struct bpf_verifier_env * env,struct bpf_prog * prog) bpf_jit_blind_constants() argument
1577 bpf_insn_is_indirect_target(const struct bpf_verifier_env * env,const struct bpf_prog * prog,int insn_idx) bpf_insn_is_indirect_target() argument
2091 struct bpf_prog *prog; ___bpf_prog_run() local
2554 bpf_prog_jit_compile(struct bpf_verifier_env * env,struct bpf_prog * prog) bpf_prog_jit_compile() argument
2681 struct bpf_prog prog; global() member
2848 bpf_prog_array_update_at(struct bpf_prog_array * array,int index,struct bpf_prog * prog) bpf_prog_array_update_at() argument
3159 bpf_int_jit_compile(struct bpf_verifier_env * env,struct bpf_prog * prog) bpf_int_jit_compile() argument
3167 bpf_jit_compile(struct bpf_prog * prog) bpf_jit_compile() argument
3324 struct bpf_prog *prog; bpf_prog_report_may_goto_violation() local
3409 bpf_find_linfo(const struct bpf_prog * prog,u32 insn_off) bpf_find_linfo() argument
3446 bpf_prog_get_file_line(struct bpf_prog * prog,unsigned long ip,const char ** filep,const char ** linep,int * nump) bpf_prog_get_file_line() argument
3485 struct bpf_prog *prog; global() member
3491 struct bpf_prog *prog; find_from_stack_cb() local
[all...]
H A Dtrampoline.c177 bool bpf_prog_has_trampoline(const struct bpf_prog *prog)
179 enum bpf_attach_type eatype = prog->expected_attach_type;
180 enum bpf_prog_type ptype = prog->type;
525 *ip_arg |= node->link->prog->call_get_func_ip; in bpf_tramp_image_put()
782 static enum bpf_tramp_prog_type bpf_attach_type_to_tramp(struct bpf_prog *prog) in __bpf_trampoline_link_prog()
784 switch (prog->expected_attach_type) { in __bpf_trampoline_link_prog()
797 if (!prog->aux->attach_func_proto->type) in __bpf_trampoline_link_prog()
815 /* Program extensions can not extend target prog when the target in __bpf_trampoline_link_prog()
816 * prog has been updated to any prog_array map as tail callee. in __bpf_trampoline_link_prog()
818 * tgt prog entr in __bpf_trampoline_link_prog()
137 bpf_prog_has_trampoline(const struct bpf_prog * prog) bpf_prog_has_trampoline() argument
725 bpf_attach_type_to_tramp(struct bpf_prog * prog) bpf_attach_type_to_tramp() argument
923 cgroup_shim_alloc(const struct bpf_prog * prog,bpf_func_t bpf_func,int cgroup_atype,enum bpf_attach_type attach_type) cgroup_shim_alloc() argument
977 bpf_trampoline_link_cgroup_shim(struct bpf_prog * prog,int cgroup_atype,enum bpf_attach_type attach_type) bpf_trampoline_link_cgroup_shim() argument
1042 bpf_trampoline_unlink_cgroup_shim(struct bpf_prog * prog) bpf_trampoline_unlink_cgroup_shim() argument
1143 __bpf_prog_enter_recur(struct bpf_prog * prog,struct bpf_tramp_run_ctx * run_ctx) __bpf_prog_enter_recur() argument
1159 __update_prog_stats(struct bpf_prog * prog,u64 start) __update_prog_stats() argument
1180 update_prog_stats(struct bpf_prog * prog,u64 start) update_prog_stats() argument
1187 __bpf_prog_exit_recur(struct bpf_prog * prog,u64 start,struct bpf_tramp_run_ctx * run_ctx) __bpf_prog_exit_recur() argument
1198 __bpf_prog_enter_lsm_cgroup(struct bpf_prog * prog,struct bpf_tramp_run_ctx * run_ctx) __bpf_prog_enter_lsm_cgroup() argument
1212 __bpf_prog_exit_lsm_cgroup(struct bpf_prog * prog,u64 start,struct bpf_tramp_run_ctx * run_ctx) __bpf_prog_exit_lsm_cgroup() argument
1221 __bpf_prog_enter_sleepable_recur(struct bpf_prog * prog,struct bpf_tramp_run_ctx * run_ctx) __bpf_prog_enter_sleepable_recur() argument
1239 __bpf_prog_exit_sleepable_recur(struct bpf_prog * prog,u64 start,struct bpf_tramp_run_ctx * run_ctx) __bpf_prog_exit_sleepable_recur() argument
1250 __bpf_prog_enter_sleepable(struct bpf_prog * prog,struct bpf_tramp_run_ctx * run_ctx) __bpf_prog_enter_sleepable() argument
1262 __bpf_prog_exit_sleepable(struct bpf_prog * prog,u64 start,struct bpf_tramp_run_ctx * run_ctx) __bpf_prog_exit_sleepable() argument
1272 __bpf_prog_enter(struct bpf_prog * prog,struct bpf_tramp_run_ctx * run_ctx) __bpf_prog_enter() argument
1283 __bpf_prog_exit(struct bpf_prog * prog,u64 start,struct bpf_tramp_run_ctx * run_ctx) __bpf_prog_exit() argument
1303 bpf_trampoline_enter(const struct bpf_prog * prog) bpf_trampoline_enter() argument
1318 bpf_trampoline_exit(const struct bpf_prog * prog) bpf_trampoline_exit() argument
[all...]
H A Dprog_iter.c16 struct bpf_prog *prog; in bpf_prog_seq_start() local
18 prog = bpf_prog_get_curr_or_next(&info->prog_id); in bpf_prog_seq_start()
19 if (!prog) in bpf_prog_seq_start()
24 return prog; in bpf_prog_seq_start()
39 __bpf_md_ptr(struct bpf_prog *, prog);
42 DEFINE_BPF_ITER_FUNC(bpf_prog, struct bpf_iter_meta *meta, struct bpf_prog *prog) in DEFINE_BPF_ITER_FUNC() argument
48 struct bpf_prog *prog; in DEFINE_BPF_ITER_FUNC() local
52 ctx.prog = v; in DEFINE_BPF_ITER_FUNC()
54 prog = bpf_iter_get_info(&meta, in_stop); in DEFINE_BPF_ITER_FUNC()
55 if (prog) in DEFINE_BPF_ITER_FUNC()
[all …]
H A Dcgroup.c90 const struct bpf_prog *prog; in bpf_prog_run_array_cg()
101 while ((prog = READ_ONCE(item->prog))) { in __cgroup_bpf_run_lsm_sock()
103 func_ret = run_prog(prog, ctx); in __cgroup_bpf_run_lsm_sock()
259 struct bpf_prog *prog, in bpf_cgroup_storages_alloc()
270 map = prog->aux->cgroup_storage[stype]; in bpf_cgroup_storages_assign()
278 storages[stype] = bpf_cgroup_storage_alloc(prog, stype); in bpf_cgroup_storages_link()
344 if (pl->prog) { in cgroup_bpf_release()
345 if (pl->prog->expected_attach_type == BPF_LSM_CGROUP) in cgroup_bpf_release()
346 bpf_trampoline_unlink_cgroup_shim(pl->prog); in cgroup_bpf_release()
68 const struct bpf_prog *prog; bpf_prog_run_array_cg() local
238 bpf_cgroup_storages_alloc(struct bpf_cgroup_storage * storages[],struct bpf_cgroup_storage * new_storages[],enum bpf_attach_type type,struct bpf_prog * prog,struct cgroup * cgrp) bpf_cgroup_storages_alloc() argument
623 find_attach_entry(struct hlist_head * progs,struct bpf_prog * prog,struct bpf_cgroup_link * link,struct bpf_prog * replace_prog,bool allow_multi) find_attach_entry() argument
673 struct bpf_prog *prog = ERR_PTR(-EINVAL); bpf_get_anchor_prog() local
682 get_prog_list(struct hlist_head * progs,struct bpf_prog * prog,struct bpf_cgroup_link * link,u32 flags,u32 id_or_fd) get_prog_list() argument
751 insert_pl_to_hlist(struct bpf_prog_list * pl,struct hlist_head * progs,struct bpf_prog * prog,struct bpf_cgroup_link * link,u32 flags,u32 id_or_fd) insert_pl_to_hlist() argument
786 __cgroup_bpf_attach(struct cgroup * cgrp,struct bpf_prog * prog,struct bpf_prog * replace_prog,struct bpf_cgroup_link * link,enum bpf_attach_type type,u32 flags,u32 id_or_fd,u64 revision) __cgroup_bpf_attach() argument
907 cgroup_bpf_attach(struct cgroup * cgrp,struct bpf_prog * prog,struct bpf_prog * replace_prog,struct bpf_cgroup_link * link,enum bpf_attach_type type,u32 flags,u32 id_or_fd,u64 revision) cgroup_bpf_attach() argument
1036 find_detach_entry(struct hlist_head * progs,struct bpf_prog * prog,struct bpf_cgroup_link * link,bool allow_multi) find_detach_entry() argument
1077 purge_effective_progs(struct cgroup * cgrp,struct bpf_prog * prog,struct bpf_cgroup_link * link,enum cgroup_bpf_attach_type atype) purge_effective_progs() argument
1135 __cgroup_bpf_detach(struct cgroup * cgrp,struct bpf_prog * prog,struct bpf_cgroup_link * link,enum bpf_attach_type type,u64 revision) __cgroup_bpf_detach() argument
1198 cgroup_bpf_detach(struct cgroup * cgrp,struct bpf_prog * prog,enum bpf_attach_type type,u64 revision) cgroup_bpf_detach() argument
1282 struct bpf_prog *prog; __cgroup_bpf_query() local
1326 cgroup_bpf_prog_attach(const union bpf_attr * attr,enum bpf_prog_type ptype,struct bpf_prog * prog) cgroup_bpf_prog_attach() argument
1357 struct bpf_prog *prog; cgroup_bpf_prog_detach() local
1477 cgroup_bpf_link_attach(const union bpf_attr * attr,struct bpf_prog * prog) cgroup_bpf_link_attach() argument
1814 cgroup_dev_func_proto(enum bpf_func_id func_id,const struct bpf_prog * prog) cgroup_dev_func_proto() argument
1832 cgroup_dev_is_valid_access(int off,int size,enum bpf_access_type type,const struct bpf_prog * prog,struct bpf_insn_access_aux * info) cgroup_dev_is_valid_access() argument
2361 sysctl_func_proto(enum bpf_func_id func_id,const struct bpf_prog * prog) sysctl_func_proto() argument
2388 sysctl_is_valid_access(int off,int size,enum bpf_access_type type,const struct bpf_prog * prog,struct bpf_insn_access_aux * info) sysctl_is_valid_access() argument
2417 sysctl_convert_ctx_access(enum bpf_access_type type,const struct bpf_insn * si,struct bpf_insn * insn_buf,struct bpf_prog * prog,u32 * target_size) sysctl_convert_ctx_access() argument
2504 cg_sockopt_func_proto(enum bpf_func_id func_id,const struct bpf_prog * prog) cg_sockopt_func_proto() argument
2542 cg_sockopt_is_valid_access(int off,int size,enum bpf_access_type type,const struct bpf_prog * prog,struct bpf_insn_access_aux * info) cg_sockopt_is_valid_access() argument
2617 cg_sockopt_convert_ctx_access(enum bpf_access_type type,const struct bpf_insn * si,struct bpf_insn * insn_buf,struct bpf_prog * prog,u32 * target_size) cg_sockopt_convert_ctx_access() argument
2694 cg_sockopt_get_prologue(struct bpf_insn * insn_buf,bool direct_write,const struct bpf_prog * prog) cg_sockopt_get_prologue() argument
2713 cgroup_common_func_proto(enum bpf_func_id func_id,const struct bpf_prog * prog) cgroup_common_func_proto() argument
[all...]
/linux/drivers/net/hyperv/
H A Dnetvsc_bpf.c31 struct bpf_prog *prog; in netvsc_run_xdp() local
38 prog = rcu_dereference(nvchan->bpf_prog); in netvsc_run_xdp()
40 if (!prog) in netvsc_run_xdp()
61 act = bpf_prog_run_xdp(prog, xdp); in netvsc_run_xdp()
73 if (!xdp_do_redirect(ndev, xdp, prog)) { in netvsc_run_xdp()
95 trace_xdp_exception(ndev, prog, act); in netvsc_run_xdp()
99 bpf_warn_invalid_xdp_action(ndev, prog, act); in netvsc_run_xdp()
124 int netvsc_xdp_set(struct net_device *dev, struct bpf_prog *prog, in netvsc_xdp_set() argument
133 if (!old_prog && !prog) in netvsc_xdp_set()
137 if (prog && buf_max > PAGE_SIZE) { in netvsc_xdp_set()
[all …]
/linux/tools/lib/bpf/
H A Dlibbpf.c76 static bool prog_is_subprog(const struct bpf_object *obj, const struct bpf_program *prog);
772 struct bpf_program *prog;
795 void bpf_program__unload(struct bpf_program *prog) in bpf_program__unload()
797 if (!prog) in bpf_program__unload()
800 zclose(prog->fd); in bpf_program__unload()
802 zfree(&prog->func_info); in bpf_program__exit() argument
803 zfree(&prog->line_info); in bpf_program__exit()
804 zfree(&prog->subprogs); in bpf_program__exit()
807 static void bpf_program__exit(struct bpf_program *prog) in bpf_program__exit()
809 if (!prog) in bpf_program__exit()
767 struct bpf_program *prog; global() member
790 bpf_program__unload(struct bpf_program * prog) bpf_program__unload() argument
839 bpf_object__init_prog(struct bpf_object * obj,struct bpf_program * prog,const char * name,size_t sec_idx,const char * sec_name,size_t sec_off,void * insn_data,size_t insn_data_sz) bpf_object__init_prog() argument
904 struct bpf_program *prog, *progs; bpf_object__add_programs() local
988 struct bpf_program *prog = obj->programs; bpf_object_bswap_progs() local
1107 is_valid_st_ops_program(struct bpf_object * obj,const struct bpf_program * prog) is_valid_st_ops_program() argument
1126 struct bpf_program *prog, *slot_prog; bpf_object_adjust_struct_ops_autoload() local
1211 struct bpf_program *prog; bpf_map__init_kern_struct_ops() local
3474 prog_needs_vmlinux_btf(struct bpf_program * prog) prog_needs_vmlinux_btf() argument
3496 struct bpf_program *prog; obj_needs_vmlinux_btf() local
3578 struct bpf_program *prog = &obj->programs[i]; bpf_object__sanitize_and_load_btf() local
4469 prog_is_subprog(const struct bpf_object * obj,const struct bpf_program * prog) prog_is_subprog() argument
4478 struct bpf_program *prog; bpf_object__find_program_by_name() local
4526 bpf_prog_compute_hash(struct bpf_program * prog) bpf_prog_compute_hash() argument
4564 bpf_program__record_reloc(struct bpf_program * prog,struct reloc_desc * reloc_desc,__u32 insn_idx,const char * sym_name,const Elf64_Sym * sym,const Elf64_Rel * rel) bpf_program__record_reloc() argument
4746 prog_contains_insn(const struct bpf_program * prog,size_t insn_idx) prog_contains_insn() argument
4756 struct bpf_program *prog; find_prog_by_sec_insn() local
4785 struct bpf_program *prog; bpf_object__collect_prog_relos() local
5949 record_relo_core(struct bpf_program * prog,const struct bpf_core_relo * core_relo,int insn_idx) record_relo_core() argument
5967 find_relo_core(struct bpf_program * prog,int insn_idx) find_relo_core() argument
5983 bpf_core_resolve_relo(struct bpf_program * prog,const struct bpf_core_relo * relo,int relo_idx,const struct btf * local_btf,struct hashmap * cand_cache,struct bpf_core_relo_res * targ_res) bpf_core_resolve_relo() argument
6035 struct bpf_program *prog; bpf_object__relocate_core() local
6149 poison_map_ldimm64(struct bpf_program * prog,int relo_idx,int insn_idx,struct bpf_insn * insn,int map_idx,const struct bpf_map * map) poison_map_ldimm64() argument
6179 poison_kfunc_call(struct bpf_program * prog,int relo_idx,int insn_idx,struct bpf_insn * insn,int ext_idx,const struct extern_desc * ext) poison_kfunc_call() argument
6199 find_jt_map(struct bpf_object * obj,struct bpf_program * prog,unsigned int sym_off) find_jt_map() argument
6217 add_jt_map(struct bpf_object * obj,struct bpf_program * prog,unsigned int sym_off,int map_fd) add_jt_map() argument
6236 find_subprog_idx(struct bpf_program * prog,int insn_idx) find_subprog_idx() argument
6248 create_jt_map(struct bpf_object * obj,struct bpf_program * prog,struct reloc_desc * relo) create_jt_map() argument
6356 bpf_object__relocate_data(struct bpf_object * obj,struct bpf_program * prog) bpf_object__relocate_data() argument
6470 adjust_prog_btf_ext_info(const struct bpf_object * obj,const struct bpf_program * prog,const struct btf_ext_info * ext_info,void ** prog_info,__u32 * prog_rec_cnt,__u32 * prog_rec_sz) adjust_prog_btf_ext_info() argument
6540 reloc_prog_func_and_line_info(const struct bpf_object * obj,struct bpf_program * main_prog,const struct bpf_program * prog) reloc_prog_func_and_line_info() argument
6619 find_prog_insn_relo(const struct bpf_program * prog,size_t insn_idx) find_prog_insn_relo() argument
6716 bpf_object__reloc_code(struct bpf_object * obj,struct bpf_program * main_prog,struct bpf_program * prog) bpf_object__reloc_code() argument
6905 bpf_object__relocate_calls(struct bpf_object * obj,struct bpf_program * prog) bpf_object__relocate_calls() argument
6931 struct bpf_program *prog; bpf_object__free_relocs() local
6971 bpf_prog_assign_exc_cb(struct bpf_object * obj,struct bpf_program * prog) bpf_prog_assign_exc_cb() argument
7093 need_func_arg_type_fixup(const struct btf * btf,const struct bpf_program * prog,const char * subprog_name,int arg_idx,int arg_type_id,const char * ctx_name) need_func_arg_type_fixup() argument
7164 clone_func_btf_info(struct btf * btf,int orig_fn_id,struct bpf_program * prog) clone_func_btf_info() argument
7233 bpf_program_fixup_func_info(struct bpf_object * obj,struct bpf_program * prog) bpf_program_fixup_func_info() argument
7374 struct bpf_program *prog; bpf_object__relocate() local
7677 bpf_object__sanitize_prog(struct bpf_object * obj,struct bpf_program * prog) bpf_object__sanitize_prog() argument
7716 libbpf_prepare_prog_load(struct bpf_program * prog,struct bpf_prog_load_opts * opts,long cookie) libbpf_prepare_prog_load() argument
7783 bpf_object_load_prog(struct bpf_object * obj,struct bpf_program * prog,struct bpf_insn * insns,int insns_cnt,const char * license,__u32 kern_version,int * prog_fd) bpf_object_load_prog() argument
8013 fixup_log_failed_core_relo(struct bpf_program * prog,char * buf,size_t buf_sz,size_t log_sz,char * line1,char * line2,char * line3) fixup_log_failed_core_relo() argument
8052 fixup_log_missing_map_load(struct bpf_program * prog,char * buf,size_t buf_sz,size_t log_sz,char * line1,char * line2,char * line3) fixup_log_missing_map_load() argument
8085 fixup_log_missing_kfunc_call(struct bpf_program * prog,char * buf,size_t buf_sz,size_t log_sz,char * line1,char * line2,char * line3) fixup_log_missing_kfunc_call() argument
8118 fixup_verifier_log(struct bpf_program * prog,char * buf,size_t buf_sz) fixup_verifier_log() argument
8168 bpf_program_record_relos(struct bpf_program * prog) bpf_program_record_relos() argument
8214 struct bpf_program *prog; bpf_object__load_progs() local
8245 struct bpf_program *prog; bpf_object_prepare_progs() local
8262 struct bpf_program *prog; bpf_object_init_progs() local
8841 struct bpf_program *prog = st_ops->progs[i]; bpf_map_prepare_vdata() local
9047 bpf_program__pin(struct bpf_program * prog,const char * path) bpf_program__pin() argument
9074 bpf_program__unpin(struct bpf_program * prog,const char * path) bpf_program__unpin() argument
9313 struct bpf_program *prog; bpf_object__pin_programs() local
9350 struct bpf_program *prog; bpf_object__unpin_programs() local
9577 struct bpf_program *prog = prev; bpf_object__next_program() local
9589 struct bpf_program *prog = next; bpf_object__prev_program() local
9598 bpf_program__set_ifindex(struct bpf_program * prog,__u32 ifindex) bpf_program__set_ifindex() argument
9603 bpf_program__name(const struct bpf_program * prog) bpf_program__name() argument
9608 bpf_program__section_name(const struct bpf_program * prog) bpf_program__section_name() argument
9613 bpf_program__autoload(const struct bpf_program * prog) bpf_program__autoload() argument
9618 bpf_program__set_autoload(struct bpf_program * prog,bool autoload) bpf_program__set_autoload() argument
9627 bpf_program__autoattach(const struct bpf_program * prog) bpf_program__autoattach() argument
9632 bpf_program__set_autoattach(struct bpf_program * prog,bool autoattach) bpf_program__set_autoattach() argument
9637 bpf_program__insns(const struct bpf_program * prog) bpf_program__insns() argument
9642 bpf_program__insn_cnt(const struct bpf_program * prog) bpf_program__insn_cnt() argument
9647 bpf_program__set_insns(struct bpf_program * prog,struct bpf_insn * new_insns,size_t new_insn_cnt) bpf_program__set_insns() argument
9668 bpf_program__fd(const struct bpf_program * prog) bpf_program__fd() argument
9682 bpf_program__type(const struct bpf_program * prog) bpf_program__type() argument
9693 bpf_program__set_type(struct bpf_program * prog,enum bpf_prog_type type) bpf_program__set_type() argument
9718 bpf_program__expected_attach_type(const struct bpf_program * prog) bpf_program__expected_attach_type() argument
9723 bpf_program__set_expected_attach_type(struct bpf_program * prog,enum bpf_attach_type type) bpf_program__set_expected_attach_type() argument
9733 bpf_program__flags(const struct bpf_program * prog) bpf_program__flags() argument
9738 bpf_program__set_flags(struct bpf_program * prog,__u32 flags) bpf_program__set_flags() argument
9747 bpf_program__log_level(const struct bpf_program * prog) bpf_program__log_level() argument
9752 bpf_program__set_log_level(struct bpf_program * prog,__u32 log_level) bpf_program__set_log_level() argument
9761 bpf_program__log_buf(const struct bpf_program * prog,size_t * log_size) bpf_program__log_buf() argument
9767 bpf_program__set_log_buf(struct bpf_program * prog,char * log_buf,size_t log_size) bpf_program__set_log_buf() argument
9781 bpf_program__func_info(const struct bpf_program * prog) bpf_program__func_info() argument
9788 bpf_program__func_info_cnt(const struct bpf_program * prog) bpf_program__func_info_cnt() argument
9793 bpf_program__line_info(const struct bpf_program * prog) bpf_program__line_info() argument
9800 bpf_program__line_info_cnt(const struct bpf_program * prog) bpf_program__line_info_cnt() argument
10199 struct bpf_program *prog; bpf_object__collect_st_ops_relos() local
10466 libbpf_find_attach_btf_id(struct bpf_program * prog,const char * attach_name,int * btf_obj_fd,int * btf_type_id) libbpf_find_attach_btf_id() argument
10834 bpf_map__set_exclusive_program(struct bpf_map * map,struct bpf_program * prog) bpf_map__set_exclusive_program() argument
11073 bpf_link__update_program(struct bpf_link * link,struct bpf_program * prog) bpf_link__update_program() argument
11260 bpf_program__attach_perf_event_opts(const struct bpf_program * prog,int pfd,const struct bpf_perf_event_opts * opts) bpf_program__attach_perf_event_opts() argument
11338 bpf_program__attach_perf_event(const struct bpf_program * prog,int pfd) bpf_program__attach_perf_event() argument
11655 bpf_program__attach_kprobe_opts(const struct bpf_program * prog,const char * func_name,const struct bpf_kprobe_opts * opts) bpf_program__attach_kprobe_opts() argument
11749 bpf_program__attach_kprobe(const struct bpf_program * prog,bool retprobe,const char * func_name) bpf_program__attach_kprobe() argument
11760 bpf_program__attach_ksyscall(const struct bpf_program * prog,const char * syscall_name,const struct bpf_ksyscall_opts * opts) bpf_program__attach_ksyscall() argument
12000 bpf_program__attach_kprobe_multi_opts(const struct bpf_program * prog,const char * pattern,const struct bpf_kprobe_multi_opts * opts) bpf_program__attach_kprobe_multi_opts() argument
12101 attach_kprobe(const struct bpf_program * prog,long cookie,struct bpf_link ** link) attach_kprobe() argument
12138 attach_ksyscall(const struct bpf_program * prog,long cookie,struct bpf_link ** link) attach_ksyscall() argument
12159 attach_kprobe_multi(const struct bpf_program * prog,long cookie,struct bpf_link ** link) attach_kprobe_multi() argument
12190 attach_kprobe_session(const struct bpf_program * prog,long cookie,struct bpf_link ** link) attach_kprobe_session() argument
12216 attach_uprobe_multi(const struct bpf_program * prog,long cookie,struct bpf_link ** link) attach_uprobe_multi() argument
12458 bpf_program__attach_uprobe_multi(const struct bpf_program * prog,pid_t pid,const char * path,const char * func_pattern,const struct bpf_uprobe_multi_opts * opts) bpf_program__attach_uprobe_multi() argument
12586 bpf_program__attach_uprobe_opts(const struct bpf_program * prog,pid_t pid,const char * binary_path,size_t func_offset,const struct bpf_uprobe_opts * opts) bpf_program__attach_uprobe_opts() argument
12732 attach_uprobe(const struct bpf_program * prog,long cookie,struct bpf_link ** link) attach_uprobe() argument
12787 bpf_program__attach_uprobe(const struct bpf_program * prog,bool retprobe,pid_t pid,const char * binary_path,size_t func_offset) bpf_program__attach_uprobe() argument
12797 bpf_program__attach_usdt(const struct bpf_program * prog,pid_t pid,const char * binary_path,const char * usdt_provider,const char * usdt_name,const struct bpf_usdt_opts * opts) bpf_program__attach_usdt() argument
12850 attach_usdt(const struct bpf_program * prog,long cookie,struct bpf_link ** link) attach_usdt() argument
12929 bpf_program__attach_tracepoint_opts(const struct bpf_program * prog,const char * tp_category,const char * tp_name,const struct bpf_tracepoint_opts * opts) bpf_program__attach_tracepoint_opts() argument
12962 bpf_program__attach_tracepoint(const struct bpf_program * prog,const char * tp_category,const char * tp_name) bpf_program__attach_tracepoint() argument
12969 attach_tp(const struct bpf_program * prog,long cookie,struct bpf_link ** link) attach_tp() argument
13002 bpf_program__attach_raw_tracepoint_opts(const struct bpf_program * prog,const char * tp_name,struct bpf_raw_tracepoint_opts * opts) bpf_program__attach_raw_tracepoint_opts() argument
13038 bpf_program__attach_raw_tracepoint(const struct bpf_program * prog,const char * tp_name) bpf_program__attach_raw_tracepoint() argument
13044 attach_raw_tp(const struct bpf_program * prog,long cookie,struct bpf_link ** link) attach_raw_tp() argument
13086 bpf_program__attach_btf_id(const struct bpf_program * prog,const struct bpf_trace_opts * opts) bpf_program__attach_btf_id() argument
13121 bpf_program__attach_trace(const struct bpf_program * prog) bpf_program__attach_trace() argument
13126 bpf_program__attach_trace_opts(const struct bpf_program * prog,const struct bpf_trace_opts * opts) bpf_program__attach_trace_opts() argument
13132 bpf_program__attach_lsm(const struct bpf_program * prog) bpf_program__attach_lsm() argument
13137 attach_trace(const struct bpf_program * prog,long cookie,struct bpf_link ** link) attach_trace() argument
13143 attach_lsm(const struct bpf_program * prog,long cookie,struct bpf_link ** link) attach_lsm() argument
13150 bpf_program_attach_fd(const struct bpf_program * prog,int target_fd,const char * target_name,const struct bpf_link_create_opts * opts) bpf_program_attach_fd() argument
13184 bpf_program__attach_cgroup(const struct bpf_program * prog,int cgroup_fd) bpf_program__attach_cgroup() argument
13190 bpf_program__attach_netns(const struct bpf_program * prog,int netns_fd) bpf_program__attach_netns() argument
13196 bpf_program__attach_sockmap(const struct bpf_program * prog,int map_fd) bpf_program__attach_sockmap() argument
13201 bpf_program__attach_xdp(const struct bpf_program * prog,int ifindex) bpf_program__attach_xdp() argument
13208 bpf_program__attach_cgroup_opts(const struct bpf_program * prog,int cgroup_fd,const struct bpf_cgroup_opts * opts) bpf_program__attach_cgroup_opts() argument
13236 bpf_program__attach_tcx(const struct bpf_program * prog,int ifindex,const struct bpf_tcx_opts * opts) bpf_program__attach_tcx() argument
13271 bpf_program__attach_netkit(const struct bpf_program * prog,int ifindex,const struct bpf_netkit_opts * opts) bpf_program__attach_netkit() argument
13304 bpf_program__attach_freplace(const struct bpf_program * prog,int target_fd,const char * attach_func_name) bpf_program__attach_freplace() argument
13342 bpf_program__attach_iter(const struct bpf_program * prog,const struct bpf_iter_attach_opts * opts) bpf_program__attach_iter() argument
13380 attach_iter(const struct bpf_program * prog,long cookie,struct bpf_link ** link) attach_iter() argument
13386 bpf_program__attach_netfilter(const struct bpf_program * prog,const struct bpf_netfilter_opts * opts) bpf_program__attach_netfilter() argument
13426 bpf_program__attach(const struct bpf_program * prog) bpf_program__attach() argument
14123 bpf_program__set_attach_target(struct bpf_program * prog,int attach_prog_fd,const char * attach_func_name) bpf_program__set_attach_target() argument
14169 bpf_program__assoc_struct_ops(struct bpf_program * prog,struct bpf_map * map,struct bpf_prog_assoc_struct_ops_opts * opts) bpf_program__assoc_struct_ops() argument
14336 struct bpf_program **prog = prog_skel->prog; populate_skeleton_progs() local
14480 struct bpf_program *prog = *prog_skel->prog; bpf_object__attach_skeleton() local
[all...]
/linux/drivers/net/netdevsim/
H A Dbpf.c31 struct bpf_prog *prog; member
68 state = env->prog->aux->offload->dev_priv; in nsim_bpf_verify_insn()
72 if (insn_idx == env->prog->len - 1) { in nsim_bpf_verify_insn()
89 return ns->xdp_hw.prog; in nsim_xdp_offload_active()
92 static void nsim_prog_set_loaded(struct bpf_prog *prog, bool loaded) in nsim_prog_set_loaded() argument
96 if (!prog || !bpf_prog_is_offloaded(prog->aux)) in nsim_prog_set_loaded()
99 state = prog->aux->offload->dev_priv; in nsim_prog_set_loaded()
104 nsim_bpf_offload(struct netdevsim *ns, struct bpf_prog *prog, bool oldprog) in nsim_bpf_offload() argument
111 ns->bpf_offloaded = prog; in nsim_bpf_offload()
122 struct bpf_prog *prog = cls_bpf->prog; nsim_bpf_setup_tc_block_cb() local
219 nsim_bpf_create_prog(struct nsim_dev * nsim_dev,struct bpf_prog * prog) nsim_bpf_create_prog() argument
256 nsim_bpf_verifier_prep(struct bpf_prog * prog) nsim_bpf_verifier_prep() argument
267 nsim_bpf_translate(struct bpf_prog * prog) nsim_bpf_translate() argument
275 nsim_bpf_destroy_prog(struct bpf_prog * prog) nsim_bpf_destroy_prog() argument
[all...]
/linux/drivers/net/ethernet/netronome/nfp/bpf/
H A Doffload.c112 struct bpf_prog *prog) in nfp_map_ptrs_record() argument
116 mutex_lock(&prog->aux->used_maps_mutex); in nfp_map_ptrs_record()
120 for (i = 0; i < prog->aux->used_map_cnt; i++) in nfp_map_ptrs_record()
121 if (bpf_map_offload_neutral(prog->aux->used_maps[i])) in nfp_map_ptrs_record()
132 for (i = 0; i < prog->aux->used_map_cnt; i++) in nfp_map_ptrs_record()
133 if (bpf_map_offload_neutral(prog->aux->used_maps[i])) { in nfp_map_ptrs_record()
135 prog->aux->used_maps[i]); in nfp_map_ptrs_record()
144 mutex_unlock(&prog->aux->used_maps_mutex); in nfp_map_ptrs_record()
149 nfp_prog_prepare(struct nfp_prog *nfp_prog, const struct bpf_insn *prog, in nfp_prog_prepare() argument
160 meta->insn = prog[i]; in nfp_prog_prepare()
[all …]
/linux/drivers/media/rc/
H A Dbpf-lirc.c83 lirc_mode2_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in lirc_mode2_func_proto() argument
113 if (bpf_token_capable(prog->aux->token, CAP_PERFMON)) in lirc_mode2_func_proto()
123 const struct bpf_prog *prog, in lirc_mode2_is_valid_access() argument
137 static int lirc_bpf_attach(struct rc_dev *rcdev, struct bpf_prog *prog) in lirc_bpf_attach() argument
163 ret = bpf_prog_array_copy(old_array, NULL, prog, 0, &new_array); in lirc_bpf_attach()
175 static int lirc_bpf_detach(struct rc_dev *rcdev, struct bpf_prog *prog) in lirc_bpf_detach() argument
196 ret = bpf_prog_array_copy(old_array, prog, NULL, 0, &new_array); in lirc_bpf_detach()
207 bpf_prog_put(prog); in lirc_bpf_detach()
242 for (item = array->items; item->prog; item++) in lirc_bpf_free()
243 bpf_prog_put(item->prog); in lirc_bpf_free()
[all …]
/linux/include/linux/
H A Dbpf.h288 * same prog type, JITed flag and xdp_has_frags flag.
655 struct bpf_map *bpf_prog_arena(struct bpf_prog *prog); in bpf_map_support_seq_show()
1009 bool (*allowed)(const struct bpf_prog *prog);
1087 /* The information passed from prog-specific *_is_valid_access in bpf_atomic_is_load_store()
1137 int (*test_run)(struct bpf_prog *prog, const union bpf_attr *kattr,
1146 const struct bpf_prog *prog);
1152 const struct bpf_prog *prog,
1155 const struct bpf_prog *prog);
1156 int (*gen_epilogue)(struct bpf_insn *insn, const struct bpf_prog *prog,
1163 struct bpf_prog *prog, u3
1141 struct bpf_prog *prog; global() member
1305 bool prog; global() member
1373 struct bpf_prog *prog; global() member
1576 bpf_prog_has_trampoline(const struct bpf_prog * prog) bpf_prog_has_trampoline() argument
1725 struct bpf_prog *prog; global() member
1829 struct bpf_prog *prog; global() member
2045 bpf_prog_get_recursion_context(struct bpf_prog * prog) bpf_prog_get_recursion_context() argument
2065 bpf_prog_put_recursion_context(struct bpf_prog * prog) bpf_prog_put_recursion_context() argument
2171 bpf_prog_assoc_struct_ops(struct bpf_prog * prog,struct bpf_map * map) bpf_prog_assoc_struct_ops() argument
2175 bpf_prog_disassoc_struct_ops(struct bpf_prog * prog) bpf_prog_disassoc_struct_ops() argument
2232 bpf_trampoline_link_cgroup_shim(struct bpf_prog * prog,int cgroup_atype,enum bpf_attach_type attach_type) bpf_trampoline_link_cgroup_shim() argument
2238 bpf_trampoline_unlink_cgroup_shim(struct bpf_prog * prog) bpf_trampoline_unlink_cgroup_shim() argument
2362 struct bpf_prog *prog; global() member
2455 const struct bpf_prog *prog; bpf_prog_run_array() local
2495 const struct bpf_prog *prog; bpf_prog_run_array_uprobe() local
3003 bpf_tracing_btf_ctx_access(int off,int size,enum bpf_access_type type,const struct bpf_prog * prog,struct bpf_insn_access_aux * info) bpf_tracing_btf_ctx_access() argument
3101 bpf_prog_add(struct bpf_prog * prog,int i) bpf_prog_add() argument
3105 bpf_prog_sub(struct bpf_prog * prog,int i) bpf_prog_sub() argument
3109 bpf_prog_put(struct bpf_prog * prog) bpf_prog_put() argument
3113 bpf_prog_inc(struct bpf_prog * prog) bpf_prog_inc() argument
3118 bpf_prog_inc_not_zero(struct bpf_prog * prog) bpf_prog_inc_not_zero() argument
3125 bpf_link_init(struct bpf_link * link,enum bpf_link_type type,const struct bpf_link_ops * ops,struct bpf_prog * prog,enum bpf_attach_type attach_type) bpf_link_init() argument
3130 bpf_link_init_sleepable(struct bpf_link * link,enum bpf_link_type type,const struct bpf_link_ops * ops,struct bpf_prog * prog,enum bpf_attach_type attach_type,bool sleepable) bpf_link_init_sleepable() argument
3262 bpf_prog_test_run_xdp(struct bpf_prog * prog,const union bpf_attr * kattr,union bpf_attr __user * uattr) bpf_prog_test_run_xdp() argument
3269 bpf_prog_test_run_skb(struct bpf_prog * prog,const union bpf_attr * kattr,union bpf_attr __user * uattr) bpf_prog_test_run_skb() argument
3276 bpf_prog_test_run_tracing(struct bpf_prog * prog,const union bpf_attr * kattr,union bpf_attr __user * uattr) bpf_prog_test_run_tracing() argument
3283 bpf_prog_test_run_flow_dissector(struct bpf_prog * prog,const union bpf_attr * kattr,union bpf_attr __user * uattr) bpf_prog_test_run_flow_dissector() argument
3290 bpf_prog_test_run_sk_lookup(struct bpf_prog * prog,const union bpf_attr * kattr,union bpf_attr __user * uattr) bpf_prog_test_run_sk_lookup() argument
3316 bpf_base_func_proto(enum bpf_func_id func_id,const struct bpf_prog * prog) bpf_base_func_proto() argument
3325 bpf_prog_has_kfunc_call(const struct bpf_prog * prog) bpf_prog_has_kfunc_call() argument
3331 bpf_jit_find_kfunc_model(const struct bpf_prog * prog,const struct bpf_insn * insn) bpf_jit_find_kfunc_model() argument
3338 bpf_get_kfunc_addr(const struct bpf_prog * prog,u32 func_id,u16 btf_fd_idx,u8 ** func_addr) bpf_get_kfunc_addr() argument
3354 bpf_prog_inc_misses_counter(struct bpf_prog * prog) bpf_prog_inc_misses_counter() argument
3488 bpf_dev_bound_resolve_kfunc(struct bpf_prog * prog,u32 func_id) bpf_dev_bound_resolve_kfunc() argument
3494 bpf_prog_dev_bound_init(struct bpf_prog * prog,union bpf_attr * attr) bpf_prog_dev_bound_init() argument
3544 bpf_prog_test_run_syscall(struct bpf_prog * prog,const union bpf_attr * kattr,union bpf_attr __user * uattr) bpf_prog_test_run_syscall() argument
3553 sock_map_get_from_fd(const union bpf_attr * attr,struct bpf_prog * prog) sock_map_get_from_fd() argument
3576 sock_map_link_create(const union bpf_attr * attr,struct bpf_prog * prog) sock_map_link_create() argument
3587 struct bpf_prog *prog; bpf_prog_inc_misses_counters() local
3783 bpf_sock_convert_ctx_access(enum bpf_access_type type,const struct bpf_insn * si,struct bpf_insn * insn_buf,struct bpf_prog * prog,u32 * target_size) bpf_sock_convert_ctx_access() argument
3834 bpf_tcp_sock_convert_ctx_access(enum bpf_access_type type,const struct bpf_insn * si,struct bpf_insn * insn_buf,struct bpf_prog * prog,u32 * target_size) bpf_tcp_sock_convert_ctx_access() argument
3849 bpf_xdp_sock_convert_ctx_access(enum bpf_access_type type,const struct bpf_insn * si,struct bpf_insn * insn_buf,struct bpf_prog * prog,u32 * target_size) bpf_xdp_sock_convert_ctx_access() argument
3915 bpf_stream_stage(ss,prog,stream_id,expr) global() argument
3952 bpf_is_subprog(const struct bpf_prog * prog) bpf_is_subprog() argument
3974 bpf_prog_update_insn_ptrs(struct bpf_prog * prog,u32 * offsets,void * image) bpf_prog_update_insn_ptrs() argument
[all...]
/linux/samples/bpf/
H A Dtracex5_user.c27 struct sock_fprog prog = { in install_accept_all_seccomp() local
31 if (prctl(PR_SET_SECCOMP, 2, &prog)) in install_accept_all_seccomp()
38 struct bpf_program *prog; in main() local
52 prog = bpf_object__find_program_by_name(obj, "bpf_prog1"); in main()
53 if (!prog) { in main()
64 link = bpf_program__attach(prog); in main()
77 bpf_object__for_each_program(prog, obj) { in main()
78 section = bpf_program__section_name(prog); in main()
83 fd = bpf_program__fd(prog); in main()

12345678910>>...19