Home
last modified time | relevance | path

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

12345678910>>...20

/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->res; in cls_bpf_classify()
[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_bh(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->bpf_num_ops)) in tcf_bpf_dump_bpf_info()
[all …]
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dexceptions.c103 struct bpf_program *prog = NULL; \ in test_exceptions_success()
108 ASSERT_OK_PTR(bpf_program__name(prog), bpf_program__name(prog)); \ in test_exceptions_success()
121 if (!ASSERT_ERR_PTR(link = bpf_program__attach(prog), "attach err")) \ in test_exceptions_success()
124 if (!ASSERT_OK_PTR(link = bpf_program__attach(prog), "attach ok")) \ in test_exceptions_success()
133 prog = eskel->progs.pfentry; in test_exceptions_success()
134 bpf_program__set_autoload(prog, true); in test_exceptions_success()
135 if (!ASSERT_OK(bpf_program__set_attach_target(prog, in test_exceptions_success()
143 prog = eskel->progs.throwing_fentry; in test_exceptions_success()
144 bpf_program__set_autoload(prog, true); in test_exceptions_success()
145 if (!ASSERT_OK(bpf_program__set_attach_target(prog, in test_exceptions_success()
[all …]
H A Dtailcalls.c27 struct bpf_program *prog; in test_tailcall_1() local
42 prog = bpf_object__find_program_by_name(obj, "entry"); in test_tailcall_1()
43 if (CHECK_FAIL(!prog)) in test_tailcall_1()
46 main_fd = bpf_program__fd(prog); in test_tailcall_1()
61 prog = bpf_object__find_program_by_name(obj, prog_name); in test_tailcall_1()
62 if (CHECK_FAIL(!prog)) in test_tailcall_1()
65 prog_fd = bpf_program__fd(prog); in test_tailcall_1()
91 prog = bpf_object__find_program_by_name(obj, prog_name); in test_tailcall_1()
92 if (CHECK_FAIL(!prog)) in test_tailcall_1()
95 prog_fd = bpf_program__fd(prog); in test_tailcall_1()
[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 Dlibarena.c13 static void run_libarena_test(struct libarena *skel, struct bpf_program *prog, in run_libarena_test() argument
29 ret = libarena_run_prog(bpf_program__fd(prog)); in run_libarena_test()
36 struct bpf_program *prog = arg; in run_libarena_parallel_prog() local
38 return (void *)(long)libarena_run_prog(bpf_program__fd(prog)); in run_libarena_parallel_prog()
149 struct bpf_program *prog; in libarena_parallel_test_enabled() local
158 prog = bpf_object__find_program_by_name(skel->obj, progname); in libarena_parallel_test_enabled()
159 if (!prog) in libarena_parallel_test_enabled()
162 ret = libarena_run_prog(bpf_program__fd(prog)); in libarena_parallel_test_enabled()
170 static void run_libarena_parallel_test(struct libarena *skel, struct bpf_program *prog, in run_libarena_parallel_test() argument
210 ret = libarena_run_prog(bpf_program__fd(prog)); in run_libarena_parallel_test()
[all …]
/linux/arch/riscv/net/
H A Dbpf_jit_core.c21 const struct bpf_prog *prog = ctx->prog; in build_body() local
24 for (i = 0; i < prog->len; i++) { in build_body()
25 const struct bpf_insn *insn = &prog->insnsi[i]; in build_body()
44 struct bpf_prog *bpf_int_jit_compile(struct bpf_verifier_env *env, struct bpf_prog *prog) in bpf_int_jit_compile() argument
52 if (!prog->jit_requested) in bpf_int_jit_compile()
53 return prog; in bpf_int_jit_compile()
55 jit_data = prog->aux->jit_data; in bpf_int_jit_compile()
59 return prog; in bpf_int_jit_compile()
61 prog->aux->jit_data = jit_data; in bpf_int_jit_compile()
72 ctx->arena_vm_start = bpf_arena_get_kern_vm_start(prog->aux->arena); in bpf_int_jit_compile()
[all …]
/linux/arch/x86/net/
H A Dbpf_jit_comp.c41 do { prog = emit_code(prog, bytes, len); } while (0)
335 u8 *prog = *pprog; in push_r9() local
338 *pprog = prog; in push_r9()
343 u8 *prog = *pprog; in pop_r9() local
346 *pprog = prog; in pop_r9()
351 u8 *prog = *pprog; in push_r12() local
354 *pprog = prog; in push_r12()
359 u8 *prog = *pprog; in push_callee_regs() local
369 *pprog = prog; in push_callee_regs()
374 u8 *prog = *pprog; pop_r12() local
382 u8 *prog = *pprog; pop_callee_regs() local
398 u8 *prog = *pprog; emit_add_rsp() local
412 u8 *prog = *pprog; emit_sub_rsp() local
425 u8 *prog = *pprog; emit_nops() local
450 u8 *prog = *pprog; emit_fineibt() local
467 u8 *prog = *pprog; emit_kcfi() local
481 u8 *prog = *pprog; emit_cfi() local
502 u8 *prog = *pprog; emit_prologue_tail_call() local
540 u8 *prog = *pprog; emit_prologue() local
591 u8 *prog = *pprog; emit_patch() local
628 u8 *prog; __bpf_arch_text_poke() local
688 u8 *prog = *pprog; __emit_indirect_jump() local
700 u8 *prog = *pprog; emit_indirect_jump() local
727 u8 *prog = *pprog; emit_return() local
762 u8 *prog = *pprog, *start = *pprog; emit_bpf_tail_call_indirect() local
851 u8 *prog = *pprog, *start = *pprog; emit_bpf_tail_call_direct() local
901 bpf_tail_call_direct_fixup(struct bpf_prog * prog) bpf_tail_call_direct_fixup() argument
942 u8 *prog = *pprog; emit_mov_imm32() local
983 u8 *prog = *pprog; emit_mov_imm64() local
1007 u8 *prog = *pprog; emit_mov_reg() local
1025 u8 *prog = *pprog; emit_movsx_reg() local
1057 u8 *prog = *pprog; emit_insn_suffix() local
1076 u8 *prog = *pprog; emit_insn_suffix_SIB() local
1091 u8 *prog = *pprog; maybe_emit_mod() local
1105 u8 *prog = *pprog; maybe_emit_1mod() local
1117 u8 *prog = *pprog; emit_ldx() local
1147 u8 *prog = *pprog; emit_ldsx() local
1169 u8 *prog = *pprog; emit_ldx_index() local
1195 u8 *prog = *pprog; emit_ldsx_index() local
1220 emit_ldsx_r12(u8 ** prog,u32 size,u32 dst_reg,u32 src_reg,int off) emit_ldsx_r12() argument
1228 u8 *prog = *pprog; emit_stx() local
1262 u8 *prog = *pprog; emit_stx_index() local
1294 u8 *prog = *pprog; emit_st_index() local
1337 u8 *prog = *pprog; emit_atomic_rmw() local
1380 u8 *prog = *pprog; emit_atomic_rmw_index() local
1569 u8 *prog = *pprog; emit_3vex() local
1605 u8 *prog = *pprog; emit_shiftx() local
1616 u8 *prog = *pprog; emit_priv_frame_ptr() local
1647 u8 *prog = *pprog; emit_spectre_bhb_barrier() local
1696 u8 *prog = *pprog; emit_kfunc_arena_args() local
1745 u8 *ip, *prog = temp; do_jit() local
3011 u8 *prog; clean_stack_garbage() local
3080 u8 *prog = *pprog; emit_arena_arg_conv() local
3097 save_args(const struct btf_func_model * m,u8 ** prog,int stack_size,bool for_call_origin,u32 flags,u64 arena_base) save_args() argument
3187 restore_regs(const struct btf_func_model * m,u8 ** prog,int stack_size) restore_regs() argument
3224 u8 *prog = *pprog; invoke_bpf_prog() local
3310 u8 *target, *prog = *pprog; emit_align() local
3321 u8 *prog = *pprog; emit_cond_near_jump() local
3341 u8 *prog = *pprog; invoke_bpf() local
3362 u8 *prog = *pprog; invoke_bpf_mod_ret() local
3475 u8 *prog; __arch_prepare_bpf_trampoline() local
3837 u8 *jg_reloc, *prog = *pprog; emit_bpf_dispatcher() local
3917 u8 *prog = buf; arch_prepare_bpf_dispatcher() local
3936 priv_stack_check_guard(void __percpu * priv_stack_ptr,int alloc_size,struct bpf_prog * prog) priv_stack_check_guard() argument
3964 bpf_int_jit_compile(struct bpf_verifier_env * env,struct bpf_prog * prog) bpf_int_jit_compile() argument
4189 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.py101 worker_pool_idr = prog['worker_pool_idr']
102 workqueues = prog['workqueues']
103 wq_unbound_cpumask = prog['wq_unbound_cpumask']
104 wq_pod_types = prog['wq_pod_types']
105 wq_affn_dfl = prog['wq_affn_dfl']
106 wq_affn_names = prog['wq_affn_names']
108 WQ_BH = prog['WQ_BH']
109 WQ_UNBOUND = prog['WQ_UNBOUND']
110 WQ_ORDERED = prog['__WQ_ORDERED']
111 WQ_MEM_RECLAIM = prog['WQ_MEM_RECLAIM']
[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 Dfixups.c30 static bool is_addr_space_cast32(struct bpf_prog *prog, const struct bpf_insn *insn) in is_addr_space_cast32() argument
32 struct bpf_map *arena = (struct bpf_map *)prog->aux->arena; in is_addr_space_cast32()
69 static bool bpf_is_reg64(struct bpf_prog *prog, struct bpf_insn *insn) in bpf_is_reg64() argument
86 if (is_addr_space_cast32(prog, insn)) in bpf_is_reg64()
110 int bpf_insn_def32(struct bpf_prog *prog, struct bpf_insn *insn) in bpf_insn_def32() argument
114 if (dst_reg < 0 || bpf_is_reg64(prog, insn)) in bpf_insn_def32()
133 bpf_jit_find_kfunc_model(const struct bpf_prog *prog, in bpf_jit_find_kfunc_model() argument
143 tab = prog->aux->kfunc_tab; in bpf_jit_find_kfunc_model()
174 tab = env->prog->aux->kfunc_tab; in sort_kfunc_descs_by_imm_off()
296 static void adjust_poke_descs(struct bpf_prog *prog, u32 off, u32 len) in adjust_poke_descs() argument
[all …]
H A Dsyscall.c2354 static int find_prog_type(enum bpf_prog_type type, struct bpf_prog *prog) in find_prog_type() argument
2365 if (!bpf_prog_is_offloaded(prog->aux)) in find_prog_type()
2366 prog->aux->ops = ops; in find_prog_type()
2368 prog->aux->ops = &bpf_offload_prog_ops; in find_prog_type()
2369 prog->type = type; in find_prog_type()
2384 static void bpf_audit_prog(const struct bpf_prog *prog, unsigned int op) in bpf_audit_prog() argument
2398 audit_log_format(ab, "prog-id=%u op=%s", in bpf_audit_prog()
2399 prog->aux->id, bpf_audit_str[op]); in bpf_audit_prog()
2403 static int bpf_prog_alloc_id(struct bpf_prog *prog) in bpf_prog_alloc_id() argument
2409 id = idr_alloc_cyclic(&prog_idr, prog, in bpf_prog_alloc_id()
2422 bpf_prog_free_id(struct bpf_prog * prog) bpf_prog_free_id() argument
2451 __bpf_prog_put_noref(struct bpf_prog * prog,bool deferred) __bpf_prog_put_noref() argument
2476 struct bpf_prog *prog; bpf_prog_put_deferred() local
2486 __bpf_prog_put(struct bpf_prog * prog) __bpf_prog_put() argument
2500 bpf_prog_put(struct bpf_prog * prog) bpf_prog_put() argument
2508 struct bpf_prog *prog = filp->private_data; bpf_prog_release() local
2520 bpf_prog_inc_misses_counter(struct bpf_prog * prog) bpf_prog_inc_misses_counter() argument
2534 bpf_prog_get_stats(const struct bpf_prog * prog,struct bpf_prog_kstats * stats) bpf_prog_get_stats() argument
2564 const struct bpf_prog *prog = filp->private_data; bpf_prog_show_fdinfo() local
2601 bpf_prog_new_fd(struct bpf_prog * prog) bpf_prog_new_fd() argument
2613 bpf_prog_add(struct bpf_prog * prog,int i) bpf_prog_add() argument
2619 bpf_prog_sub(struct bpf_prog * prog,int i) bpf_prog_sub() argument
2630 bpf_prog_inc(struct bpf_prog * prog) bpf_prog_inc() argument
2637 bpf_prog_inc_not_zero(struct bpf_prog * prog) bpf_prog_inc_not_zero() argument
2650 bpf_prog_get_ok(struct bpf_prog * prog,enum bpf_prog_type * attach_type,bool attach_drv) bpf_prog_get_ok() argument
2669 struct bpf_prog *prog; __bpf_prog_get() local
2892 bpf_prog_mark_insn_arrays_ready(struct bpf_prog * prog) bpf_prog_mark_insn_arrays_ready() argument
2920 struct bpf_prog *prog, *dst_prog = NULL; BTF_ID_LIST_GLOBAL_SINGLE() local
3230 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
3244 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
3251 bpf_tramp_link_init(struct bpf_tramp_link * link,enum bpf_link_type type,const struct bpf_link_ops * ops,struct bpf_prog * prog,enum bpf_attach_type attach_type,u64 cookie) bpf_tramp_link_init() argument
3410 const struct bpf_prog *prog; bpf_link_show_fdinfo() local
3634 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
4245 bpf_perf_link_attach(const union bpf_attr * attr,struct bpf_prog * prog) bpf_perf_link_attach() argument
4291 bpf_perf_link_attach(const union bpf_attr * attr,struct bpf_prog * prog) bpf_perf_link_attach() argument
4297 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
4377 struct bpf_prog *prog; bpf_raw_tracepoint_open() local
4474 bpf_prog_attach_check_attach_type(const struct bpf_prog * prog,enum bpf_attach_type attach_type) bpf_prog_attach_check_attach_type() argument
4582 struct bpf_prog *prog; bpf_prog_attach() local
4650 struct bpf_prog *prog = NULL; bpf_prog_detach() local
4785 struct bpf_prog *prog; bpf_prog_test_run() local
4859 struct bpf_prog *prog; bpf_prog_get_curr_or_next() local
4880 struct bpf_prog *prog; bpf_prog_by_id() local
4897 struct bpf_prog *prog; bpf_prog_get_fd_by_id() local
4956 bpf_map_from_imm(const struct bpf_prog * prog,unsigned long addr,u32 * off,u32 * type) bpf_map_from_imm() argument
5007 bpf_insn_prepare_dump(const struct bpf_prog * prog,const struct cred * f_cred) bpf_insn_prepare_dump() argument
5100 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
5483 const struct bpf_prog *prog; bpf_link_get_info_by_fd() local
5795 struct bpf_prog *prog; link_create() local
6165 struct bpf_prog *prog; bpf_prog_bind_map() local
6247 struct bpf_prog *prog; prog_stream_read() local
6267 struct bpf_prog *prog; prog_assoc_struct_ops() local
6494 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
6531 struct bpf_prog * __maybe_unused prog; kern_sys_bpf() local
6582 tracing_prog_func_proto(enum bpf_func_id func_id,const struct bpf_prog * prog) tracing_prog_func_proto() argument
6633 syscall_prog_func_proto(enum bpf_func_id func_id,const struct bpf_prog * prog) syscall_prog_func_proto() argument
[all...]
H A Dcore.c128 fp->aux->prog = fp; in bpf_prog_alloc_no_stats()
155 struct bpf_prog *prog; in bpf_prog_alloc() local
158 prog = bpf_prog_alloc_no_stats(size, gfp_extra_flags); in bpf_prog_alloc()
159 if (!prog) in bpf_prog_alloc()
162 prog->stats = alloc_percpu_gfp(struct bpf_prog_stats, gfp_flags); in bpf_prog_alloc()
163 if (!prog->stats) { in bpf_prog_alloc()
164 free_percpu(prog->active); in bpf_prog_alloc()
165 kfree(prog->aux); in bpf_prog_alloc()
166 vfree(prog); in bpf_prog_alloc()
173 pstats = per_cpu_ptr(prog in bpf_prog_alloc()
180 bpf_prog_alloc_jited_linfo(struct bpf_prog * prog) bpf_prog_alloc_jited_linfo() argument
194 bpf_prog_jit_attempt_done(struct bpf_prog * prog) bpf_prog_jit_attempt_done() argument
230 bpf_prog_fill_jited_linfo(struct bpf_prog * prog,const u32 * insn_to_jit_off) bpf_prog_fill_jited_linfo() argument
390 bpf_adj_branches(struct bpf_prog * prog,u32 pos,s32 end_old,s32 end_new,const bool probe_pass) bpf_adj_branches() argument
437 bpf_adj_linfo(struct bpf_prog * prog,u32 off,u32 delta) bpf_adj_linfo() argument
457 bpf_patch_insn_single(struct bpf_prog * prog,u32 off,const struct bpf_insn * patch,u32 len) bpf_patch_insn_single() argument
518 bpf_remove_insns(struct bpf_prog * prog,u32 off,u32 cnt) bpf_remove_insns() argument
557 bpf_prog_ksym_set_addr(struct bpf_prog * prog) bpf_prog_ksym_set_addr() argument
566 bpf_prog_ksym_set_name(struct bpf_prog * prog) bpf_prog_ksym_set_name() argument
788 struct bpf_prog *prog; search_bpf_extables() local
831 bpf_jit_add_poke_descriptor(struct bpf_prog * prog,struct bpf_jit_poke_descriptor * poke) bpf_jit_add_poke_descriptor() argument
1311 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
1351 bpf_jit_get_prog_name(struct bpf_prog * prog) bpf_jit_get_prog_name() argument
1563 bpf_jit_blind_constants(struct bpf_verifier_env * env,struct bpf_prog * prog) bpf_jit_blind_constants() argument
1644 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
1653 bpf_out_stack_arg_cnt(const struct bpf_verifier_env * env,const struct bpf_prog * prog) bpf_out_stack_arg_cnt() argument
2168 struct bpf_prog *prog; ___bpf_prog_run() local
2631 bpf_prog_jit_compile(struct bpf_verifier_env * env,struct bpf_prog * prog) bpf_prog_jit_compile() argument
2748 struct bpf_prog prog; global() member
2915 bpf_prog_array_update_at(struct bpf_prog_array * array,int index,struct bpf_prog * prog) bpf_prog_array_update_at() argument
3226 bpf_int_jit_compile(struct bpf_verifier_env * env,struct bpf_prog * prog) bpf_int_jit_compile() argument
3234 bpf_jit_compile(struct bpf_prog * prog) bpf_jit_compile() argument
3401 struct bpf_prog *prog; bpf_prog_report_may_goto_violation() local
3482 bpf_find_linfo(const struct bpf_prog * prog,u32 insn_off) bpf_find_linfo() argument
3519 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
3567 struct bpf_prog *prog; global() member
3573 struct bpf_prog *prog; find_from_stack_cb() local
[all...]
H A Ddispatcher.c26 struct bpf_dispatcher *d, struct bpf_prog *prog) in bpf_dispatcher_find_prog() argument
31 if (prog == d->progs[i].prog) in bpf_dispatcher_find_prog()
44 struct bpf_prog *prog) in bpf_dispatcher_add_prog() argument
48 if (!prog) in bpf_dispatcher_add_prog()
51 entry = bpf_dispatcher_find_prog(d, prog); in bpf_dispatcher_add_prog()
61 bpf_prog_inc(prog); in bpf_dispatcher_add_prog()
62 entry->prog = prog; in bpf_dispatcher_add_prog()
69 struct bpf_prog *prog) in bpf_dispatcher_remove_prog() argument
73 if (!prog) in bpf_dispatcher_remove_prog()
76 entry = bpf_dispatcher_find_prog(d, prog); in bpf_dispatcher_remove_prog()
[all …]
H A Doffload.c99 static void __bpf_prog_offload_destroy(struct bpf_prog *prog) in __bpf_prog_offload_destroy() argument
101 struct bpf_prog_offload *offload = prog->aux->offload; in __bpf_prog_offload_destroy()
104 offload->offdev->ops->destroy(prog); in __bpf_prog_offload_destroy()
108 prog->aux->offload = NULL; in __bpf_prog_offload_destroy()
169 __bpf_prog_offload_destroy(offload->prog); in __bpf_offload_dev_netdev_unregister()
179 static int __bpf_prog_dev_bound_init(struct bpf_prog *prog, struct net_device *netdev) in __bpf_prog_dev_bound_init() argument
189 offload->prog = prog; in __bpf_prog_dev_bound_init()
196 if (bpf_prog_is_offloaded(prog->aux) && (!ondev || !ondev->offdev)) { in __bpf_prog_dev_bound_init()
210 prog->aux->offload = offload; in __bpf_prog_dev_bound_init()
219 int bpf_prog_dev_bound_init(struct bpf_prog *prog, union bpf_attr *attr) in bpf_prog_dev_bound_init() 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 Dcheck_btf.c39 struct bpf_prog *prog; in prepare_btf_func() local
60 prog = env->prog; in prepare_btf_func()
61 btf = prog->aux->btf; in prepare_btf_func()
124 prog->aux->func_info = krecord; in prepare_btf_func()
125 prog->aux->func_info_cnt = nfuncs; in prepare_btf_func()
141 struct bpf_prog *prog; in check_btf_func() local
160 prog = env->prog; in check_btf_func()
161 btf = prog->aux->btf; in check_btf_func()
165 krecord = prog->aux->func_info; in check_btf_func()
202 prog->aux->func_info_aux = info_aux; in check_btf_func()
[all …]
H A Dbpf_lsm.c94 void bpf_lsm_find_cgroup_shim(const struct bpf_prog *prog, in BTF_SET_END()
99 if (btf_type_vlen(prog->aux->attach_func_proto) < 1 || in BTF_SET_END()
101 prog->aux->attach_btf_id)) { in BTF_SET_END()
107 args = btf_params(prog->aux->attach_func_proto); in BTF_SET_END()
120 const struct bpf_prog *prog) in bpf_lsm_verify_prog() argument
122 u32 btf_id = prog->aux->attach_btf_id; in bpf_lsm_verify_prog()
123 const char *func_name = prog->aux->attach_func_name; in bpf_lsm_verify_prog()
125 if (!prog->gpl_compatible) { in bpf_lsm_verify_prog()
174 static bool bpf_ima_inode_hash_allowed(const struct bpf_prog *prog) in bpf_ima_inode_hash_allowed() argument
176 return bpf_lsm_is_sleepable_hook(prog->aux->attach_btf_id); in bpf_ima_inode_hash_allowed()
[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);
775 struct bpf_program *prog; member
798 void bpf_program__unload(struct bpf_program *prog) in bpf_program__unload() argument
800 if (!prog) in bpf_program__unload()
803 zclose(prog->fd); in bpf_program__unload()
805 zfree(&prog->func_info); in bpf_program__unload()
806 zfree(&prog->line_info); in bpf_program__unload()
807 zfree(&prog->subprogs); in bpf_program__unload()
810 static void bpf_program__exit(struct bpf_program *prog) in bpf_program__exit() argument
812 if (!prog) in bpf_program__exit()
[all …]
/linux/drivers/net/ethernet/microsoft/mana/
H A Dmana_bpf.c84 struct bpf_prog *prog; in mana_run_xdp() local
88 prog = rcu_dereference(rxq->bpf_prog); in mana_run_xdp()
90 if (!prog) in mana_run_xdp()
96 act = bpf_prog_run_xdp(prog, xdp); in mana_run_xdp()
107 rxq->xdp_rc = xdp_do_redirect(ndev, xdp, prog); in mana_run_xdp()
123 trace_xdp_exception(ndev, prog, act); in mana_run_xdp()
127 bpf_warn_invalid_xdp_action(ndev, prog, act); in mana_run_xdp()
149 void mana_chn_setxdp(struct mana_port_context *apc, struct bpf_prog *prog) in mana_chn_setxdp() argument
157 if (old_prog == prog) in mana_chn_setxdp()
160 if (prog) in mana_chn_setxdp()
171 mana_xdp_set(struct net_device * ndev,struct bpf_prog * prog,struct netlink_ext_ack * extack) mana_xdp_set() 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/include/linux/
H A Dbpf.h289 * same prog type, JITed flag and xdp_has_frags flag.
655 struct bpf_map *bpf_prog_arena(struct bpf_prog *prog);
1025 bool (*allowed)(const struct bpf_prog *prog);
1103 /* The information passed from prog-specific *_is_valid_access
1138 int (*test_run)(struct bpf_prog *prog, const union bpf_attr *kattr,
1147 const struct bpf_prog *prog);
1153 const struct bpf_prog *prog,
1156 const struct bpf_prog *prog);
1157 int (*gen_epilogue)(struct bpf_insn *insn, const struct bpf_prog *prog,
1164 struct bpf_prog *prog, u3
1186 struct bpf_prog *prog; global() member
1352 bool prog; global() member
1423 struct bpf_prog *prog; global() member
1635 bpf_prog_has_trampoline(const struct bpf_prog * prog) bpf_prog_has_trampoline() argument
1639 bpf_trampoline_multi_attach(struct bpf_prog * prog,u32 * ids,struct bpf_tracing_multi_link * link) bpf_trampoline_multi_attach() argument
1644 bpf_trampoline_multi_detach(struct bpf_prog * prog,struct bpf_tracing_multi_link * link) bpf_trampoline_multi_detach() argument
1813 struct bpf_prog *prog; global() member
1919 struct bpf_prog *prog; global() member
2160 bpf_prog_get_recursion_context(struct bpf_prog * prog) bpf_prog_get_recursion_context() argument
2180 bpf_prog_put_recursion_context(struct bpf_prog * prog) bpf_prog_put_recursion_context() argument
2301 bpf_prog_assoc_struct_ops(struct bpf_prog * prog,struct bpf_map * map) bpf_prog_assoc_struct_ops() argument
2305 bpf_prog_disassoc_struct_ops(struct bpf_prog * prog) bpf_prog_disassoc_struct_ops() argument
2364 bpf_trampoline_link_cgroup_shim(struct bpf_prog * prog,int cgroup_atype,enum bpf_attach_type attach_type) bpf_trampoline_link_cgroup_shim() argument
2370 bpf_trampoline_unlink_cgroup_shim(struct bpf_prog * prog) bpf_trampoline_unlink_cgroup_shim() argument
2494 struct bpf_prog *prog; global() member
2587 const struct bpf_prog *prog; bpf_prog_run_array() local
2627 const struct bpf_prog *prog; bpf_prog_run_array_uprobe() local
3141 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
3230 struct bpf_prog *prog; bpf_prog_run_array_sleepable() local
3288 bpf_prog_add(struct bpf_prog * prog,int i) bpf_prog_add() argument
3292 bpf_prog_sub(struct bpf_prog * prog,int i) bpf_prog_sub() argument
3296 bpf_prog_put(struct bpf_prog * prog) bpf_prog_put() argument
3300 bpf_prog_inc(struct bpf_prog * prog) bpf_prog_inc() argument
3305 bpf_prog_inc_not_zero(struct bpf_prog * prog) bpf_prog_inc_not_zero() argument
3312 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
3317 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
3323 bpf_tramp_link_init(struct bpf_tramp_link * link,enum bpf_link_type type,const struct bpf_link_ops * ops,struct bpf_prog * prog,enum bpf_attach_type attach_type,u64 cookie) bpf_tramp_link_init() argument
3455 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
3462 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
3469 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
3476 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
3483 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
3509 bpf_base_func_proto(enum bpf_func_id func_id,const struct bpf_prog * prog) bpf_base_func_proto() argument
3519 bpf_jit_find_kfunc_model(const struct bpf_prog * prog,const struct bpf_insn * insn) bpf_jit_find_kfunc_model() argument
3526 bpf_get_kfunc_addr(const struct bpf_prog * prog,u32 func_id,u16 btf_fd_idx,u8 ** func_addr) bpf_get_kfunc_addr() argument
3542 bpf_prog_inc_misses_counter(struct bpf_prog * prog) bpf_prog_inc_misses_counter() argument
3676 bpf_dev_bound_resolve_kfunc(struct bpf_prog * prog,u32 func_id) bpf_dev_bound_resolve_kfunc() argument
3682 bpf_prog_dev_bound_init(struct bpf_prog * prog,union bpf_attr * attr) bpf_prog_dev_bound_init() argument
3732 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
3741 sock_map_get_from_fd(const union bpf_attr * attr,struct bpf_prog * prog) sock_map_get_from_fd() argument
3764 sock_map_link_create(const union bpf_attr * attr,struct bpf_prog * prog) sock_map_link_create() argument
3775 struct bpf_prog *prog; bpf_prog_inc_misses_counters() local
3986 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
4037 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
4052 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
4118 bpf_stream_stage(ss,prog,stream_id,expr) global() argument
4146 bpf_is_subprog(const struct bpf_prog * prog) bpf_is_subprog() argument
4176 bpf_prog_update_insn_ptrs(struct bpf_prog * prog,u32 * offsets,void * image) bpf_prog_update_insn_ptrs() argument
[all...]

12345678910>>...20