/linux-6.3-rc2/net/sched/ |
A D | cls_bpf.c | 155 skip_sw = prog && tc_skip_sw(prog->gen_flags); in cls_bpf_offload_cmd() 161 cls_bpf.prog = prog ? prog->filter : NULL; in cls_bpf_offload_cmd() 170 &prog->gen_flags, &prog->in_hw_count, in cls_bpf_offload_cmd() 206 if (prog && tc_skip_hw(prog->gen_flags)) in cls_bpf_offload() 207 prog = NULL; in cls_bpf_offload() 236 cls_bpf.prog = prog->filter; in cls_bpf_offload_update_stats() 275 kfree(prog); in __cls_bpf_delete_prog() 479 prog = kzalloc(sizeof(*prog), GFP_KERNEL); in cls_bpf_change() 480 if (!prog) in cls_bpf_change() 529 *arg = prog; in cls_bpf_change() [all …]
|
A D | act_bpf.c | 84 action = prog->tcf_action; in tcf_bpf_act() 96 return !prog->bpf_ops; in tcf_bpf_is_ebpf() 122 if (prog->bpf_name && in tcf_bpf_dump_ebpf_info() 144 .index = prog->tcf_index, in tcf_bpf_dump() 151 spin_lock_bh(&prog->tcf_lock); in tcf_bpf_dump() 152 opt.action = prog->tcf_action; in tcf_bpf_dump() 156 if (tcf_bpf_is_ebpf(prog)) in tcf_bpf_dump() 275 cfg->bpf_ops = prog->bpf_ops; in tcf_bpf_prog_fill_cfg() 290 struct tcf_bpf *prog; in tcf_bpf_init() local 350 prog = to_bpf(*act); in tcf_bpf_init() [all …]
|
/linux-6.3-rc2/arch/x86/net/ |
A D | bpf_jit_comp.c | 34 do { prog = emit_code(prog, bytes, len); } while (0) 362 u8 *prog; in __bpf_arch_text_poke() local 997 prog = temp; in do_jit() 1964 if (emit_rsb_call(&prog, p->bpf_func, prog)) in invoke_bpf_prog() 2001 emit_nops(&prog, target - prog); in emit_align() 2145 u8 *prog; in arch_prepare_bpf_trampoline() local 2239 if (emit_rsb_call(&prog, __bpf_tramp_enter, prog)) { in arch_prepare_bpf_trampoline() 2271 if (emit_rsb_call(&prog, orig_call, prog)) { in arch_prepare_bpf_trampoline() 2315 if (emit_rsb_call(&prog, __bpf_tramp_exit, prog)) { in arch_prepare_bpf_trampoline() 2329 emit_return(&prog, prog); in arch_prepare_bpf_trampoline() [all …]
|
A D | bpf_jit_comp32.c | 65 do { prog = emit_code(prog, bytes, len); cnt += len; } while (0) 230 *pprog = prog; in emit_ia32_mov_i() 251 *pprog = prog; in emit_ia32_mov_r() 314 *pprog = prog; in emit_ia32_mul_r() 362 *pprog = prog; in emit_ia32_to_le_r64() 428 *pprog = prog; in emit_ia32_to_be_r64() 475 *pprog = prog; in emit_ia32_div_mod_r() 587 &prog); in emit_ia32_alu_r64() 2545 prog = tmp; in bpf_int_jit_compile() 2616 bpf_jit_prog_release_other(prog, prog == orig_prog ? in bpf_int_jit_compile() [all …]
|
/linux-6.3-rc2/drivers/clk/at91/ |
A D | clk-programmable.c | 40 regmap_read(prog->regmap, AT91_PMC_PCKR(prog->id), &pckr); in clk_programmable_recalc_rate() 113 if (prog->mux_table) in clk_programmable_set_parent() 123 regmap_update_bits(prog->regmap, AT91_PMC_PCKR(prog->id), mask, pckr); in clk_programmable_set_parent() 135 regmap_read(prog->regmap, AT91_PMC_PCKR(prog->id), &pckr); in clk_programmable_get_parent() 143 ret = clk_mux_val_to_index(&prog->hw, prog->mux_table, 0, ret); in clk_programmable_get_parent() 174 regmap_update_bits(prog->regmap, AT91_PMC_PCKR(prog->id), in clk_programmable_set_rate() 230 prog = kzalloc(sizeof(*prog), GFP_KERNEL); in at91_clk_register_programmable() 231 if (!prog) in at91_clk_register_programmable() 240 prog->id = id; in at91_clk_register_programmable() 246 hw = &prog->hw; in at91_clk_register_programmable() [all …]
|
/linux-6.3-rc2/arch/riscv/net/ |
A D | bpf_jit_core.c | 18 const struct bpf_prog *prog = ctx->prog; in build_body() local 57 if (tmp != prog) { in bpf_int_jit_compile() 59 prog = tmp; in bpf_int_jit_compile() 66 prog = orig_prog; in bpf_int_jit_compile() 80 ctx->prog = prog; in bpf_int_jit_compile() 83 prog = orig_prog; in bpf_int_jit_compile() 95 prog = orig_prog; in bpf_int_jit_compile() 134 prog = orig_prog; in bpf_int_jit_compile() 158 prog->jited = 1; in bpf_int_jit_compile() 178 bpf_jit_prog_release_other(prog, prog == orig_prog ? in bpf_int_jit_compile() [all …]
|
/linux-6.3-rc2/tools/testing/selftests/bpf/prog_tests/ |
A D | tailcalls.c | 13 struct bpf_program *prog; in test_tailcall_1() local 29 if (CHECK_FAIL(!prog)) in test_tailcall_1() 48 if (CHECK_FAIL(!prog)) in test_tailcall_1() 78 if (CHECK_FAIL(!prog)) in test_tailcall_1() 99 if (CHECK_FAIL(!prog)) in test_tailcall_1() 165 if (CHECK_FAIL(!prog)) in test_tailcall_2() 184 if (CHECK_FAIL(!prog)) in test_tailcall_2() 240 if (CHECK_FAIL(!prog)) in test_tailcall_count() 256 if (CHECK_FAIL(!prog)) in test_tailcall_count() 338 if (CHECK_FAIL(!prog)) in test_tailcall_4() [all …]
|
A D | trampoline_count.c | 13 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() 39 struct bpf_program *prog; in serial_test_trampoline_count() local 54 if (!prog) in serial_test_trampoline_count() 57 link = bpf_program__attach(prog); in serial_test_trampoline_count() 65 prog = load_prog(file, "fmod_ret_test", &inst[i]); in serial_test_trampoline_count() 66 if (!prog) in serial_test_trampoline_count() 70 link = bpf_program__attach(prog); in serial_test_trampoline_count() [all …]
|
A D | trace_ext.c | 24 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 …]
|
/linux-6.3-rc2/kernel/bpf/ |
A D | syscall.c | 2074 prog = aux->prog; in bpf_prog_put_deferred() 2161 bin2hex(prog_tag, prog->tag, sizeof(prog->tag)); in bpf_prog_show_fdinfo() 2636 prog = bpf_prog_select_runtime(prog, &err); in bpf_prog_load() 2672 __bpf_prog_put_noref(prog, prog->aux->func_cnt); in bpf_prog_load() 2711 link->prog = prog; in bpf_link_init() 2804 const struct bpf_prog *prog = link->prog; in bpf_link_show_fdinfo() local 2807 bin2hex(prog_tag, prog->tag, sizeof(prog->tag)); in bpf_link_show_fdinfo() 3718 prog = bpf_prog_inc_not_zero(prog); in bpf_prog_get_curr_or_next() 3740 if (prog) in bpf_prog_by_id() 3741 prog = bpf_prog_inc_not_zero(prog); in bpf_prog_by_id() [all …]
|
A D | dispatcher.c | 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() 81 entry->prog = NULL; in bpf_dispatcher_remove_prog() 82 bpf_prog_put(prog); in bpf_dispatcher_remove_prog() [all …]
|
A D | trampoline.c | 566 if (link_exiting->link.prog != link->link.prog) in __bpf_trampoline_link_prog() 718 prog->aux->attach_btf_id); in bpf_trampoline_link_cgroup_shim() 775 prog->aux->attach_btf_id); in bpf_trampoline_unlink_cgroup_shim() 913 update_prog_stats(prog, start); in __bpf_prog_exit_recur() 914 this_cpu_dec(*(prog->active)); in __bpf_prog_exit_recur() 966 update_prog_stats(prog, start); in __bpf_prog_exit_sleepable_recur() 967 this_cpu_dec(*(prog->active)); in __bpf_prog_exit_sleepable_recur() 989 update_prog_stats(prog, start); in __bpf_prog_exit_sleepable() 1012 update_prog_stats(prog, start); in __bpf_prog_exit() 1031 if (bpf_prog_check_recur(prog)) in bpf_trampoline_enter() [all …]
|
A D | prog_iter.c | 16 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); 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() 56 ret = bpf_iter_run_prog(prog, &ctx); in DEFINE_BPF_ITER_FUNC() [all …]
|
A D | offload.c | 116 prog->aux->offload = NULL; in __bpf_prog_offload_destroy() 197 offload->prog = prog; in __bpf_prog_dev_bound_init() 216 prog->aux->offload = offload; in __bpf_prog_dev_bound_init() 292 offload = prog->aux->offload; in bpf_prog_offload_verifier_prep() 378 if (prog->aux->offload) { in bpf_prog_dev_bound_destroy() 398 offload = prog->aux->offload; in bpf_prog_offload_translate() 421 struct bpf_prog *prog; member 452 struct bpf_prog *prog) in bpf_prog_offload_info_fill() argument 455 .prog = prog, in bpf_prog_offload_info_fill() 687 offload = prog->aux->offload; in __bpf_offload_dev_match() [all …]
|
A D | core.c | 136 if (!prog) in bpf_prog_alloc() 159 if (!prog->aux->nr_linfo || !prog->jit_requested) in bpf_prog_alloc_jited_linfo() 174 (!prog->jited || !prog->aux->jited_linfo[0])) { in bpf_prog_jit_attempt_done() 556 prog->aux->ksym.end = prog->aux->ksym.start + prog->jited_len; in bpf_prog_ksym_set_addr() 2288 if (item->prog != &dummy_bpf_prog.prog) in bpf_prog_array_length() 2298 if (item->prog != &dummy_bpf_prog.prog) in bpf_prog_array_is_empty() 2311 if (item->prog == &dummy_bpf_prog.prog) in bpf_prog_array_copy_core() 2405 if (item->prog == &dummy_bpf_prog.prog) in bpf_prog_array_update_at() 2408 WRITE_ONCE(item->prog, prog); in bpf_prog_array_update_at() 2437 if (existing->prog != &dummy_bpf_prog.prog) in bpf_prog_array_copy() [all …]
|
A D | bpf_lsm.c | 79 prog->aux->attach_btf_id)) { in BTF_SET_END() 85 args = btf_params(prog->aux->attach_func_proto); in BTF_SET_END() 98 const struct bpf_prog *prog) in bpf_lsm_verify_prog() argument 100 if (!prog->gpl_compatible) { in bpf_lsm_verify_prog() 108 prog->aux->attach_btf_id, prog->aux->attach_func_name); in bpf_lsm_verify_prog() 232 if (prog->expected_attach_type != BPF_LSM_CGROUP) in bpf_lsm_func_proto() 235 prog->aux->attach_btf_id)) in bpf_lsm_func_proto() 238 prog->aux->attach_btf_id)) in bpf_lsm_func_proto() 245 prog->aux->attach_btf_id)) in bpf_lsm_func_proto() 248 prog->aux->attach_btf_id)) in bpf_lsm_func_proto() [all …]
|
A D | bpf_iter.c | 25 struct bpf_prog *prog; member 334 struct bpf_prog *prog) in cache_btf_id() argument 357 cache_btf_id(iter, prog); in bpf_iter_prog_supported() 508 struct bpf_prog *prog) in bpf_iter_link_attach() argument 581 struct bpf_prog *prog) in init_seq_meta() argument 585 priv_data->prog = prog; in init_seq_meta() 596 struct bpf_prog *prog; in prepare_seq_file() local 602 prog = link->link.prog; in prepare_seq_file() 603 bpf_prog_inc(prog); in prepare_seq_file() 632 bpf_prog_put(prog); in prepare_seq_file() [all …]
|
/linux-6.3-rc2/drivers/net/hyperv/ |
A D | netvsc_bpf.c | 31 struct bpf_prog *prog; in netvsc_run_xdp() local 40 if (!prog) in netvsc_run_xdp() 61 act = bpf_prog_run_xdp(prog, xdp); in netvsc_run_xdp() 133 if (!old_prog && !prog) in netvsc_xdp_set() 137 if (prog && buf_max > PAGE_SIZE) { in netvsc_xdp_set() 152 if (prog) in netvsc_xdp_set() 180 if (prog) in netvsc_vf_setxdp() 181 bpf_prog_inc(prog); in netvsc_vf_setxdp() 184 xdp.prog = prog; in netvsc_vf_setxdp() 188 if (ret && prog) in netvsc_vf_setxdp() [all …]
|
/linux-6.3-rc2/tools/lib/bpf/ |
A D | libbpf.h | 350 LIBBPF_API int bpf_program__set_insns(struct bpf_program *prog, 391 LIBBPF_API void bpf_program__unload(struct bpf_program *prog); 425 struct bpf_program *prog); 447 bpf_program__attach(const struct bpf_program *prog); 550 bpf_program__attach_ksyscall(const struct bpf_program *prog, 643 bpf_program__attach_usdt(const struct bpf_program *prog, 679 bpf_program__attach_trace(const struct bpf_program *prog); 684 bpf_program__attach_lsm(const struct bpf_program *prog); 692 bpf_program__attach_freplace(const struct bpf_program *prog, 707 bpf_program__attach_iter(const struct bpf_program *prog, [all …]
|
A D | libbpf.c | 737 memset(prog, 0, sizeof(*prog)); in bpf_object__init_prog() 744 prog->insns_cnt = prog->sec_insn_cnt; in bpf_object__init_prog() 6755 prog->name, prog->sec_name); in bpf_object_load_prog() 7132 err = bpf_object_load_prog(obj, prog, prog->insns, prog->insns_cnt, in bpf_object__load_progs() 7156 prog->name, prog->sec_name); in bpf_object_init_progs() 7167 err = prog->sec_def->prog_setup_fn(prog, prog->sec_def->cookie); in bpf_object_init_progs() 8938 map->name, prog->name, prog->sec_name, prog->type, in bpf_object__collect_st_ops_relos() 10898 prog->name, prog->sec_name); in attach_uprobe() 11204 prog->name, prog->sec_name); in attach_raw_tp() 11417 err = prog->sec_def->prog_attach_fn(prog, prog->sec_def->cookie, &link); in bpf_program__attach() [all …]
|
/linux-6.3-rc2/drivers/net/ethernet/microsoft/mana/ |
A D | mana_bpf.c | 84 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() 163 if (old_prog == prog) in mana_chn_setxdp() 166 if (prog) in mana_chn_setxdp() 167 bpf_prog_add(prog, num_queues); in mana_chn_setxdp() 186 if (!old_prog && !prog) in mana_xdp_set() 190 if (prog && buf_max > PAGE_SIZE) { in mana_xdp_set() 201 apc->bpf_prog = prog; in mana_xdp_set() [all …]
|
/linux-6.3-rc2/scripts/ |
A D | sphinx-pre-install | 114 if (defined($map{$prog})) { 115 $install .= " " . $map{$prog}; 117 $install .= " " . $prog; 159 my $prog = shift; 177 my $prog = shift; 180 return $prog if findprog($prog); 187 my $prog = shift; 198 my $prog = shift; 214 foreach my $prog(@pkgs) { 225 foreach my $prog(@pkgs) { [all …]
|
/linux-6.3-rc2/drivers/net/netdevsim/ |
A D | bpf.c | 31 struct bpf_prog *prog; member 89 return ns->xdp_hw.prog; in nsim_xdp_offload_active() 96 if (!prog || !prog->aux->offload) in nsim_prog_set_loaded() 111 ns->bpf_offloaded = prog; in nsim_bpf_offload() 112 ns->bpf_offloaded_id = prog ? prog->aux->id : 0; in nsim_bpf_offload() 122 struct bpf_prog *prog = cls_bpf->prog; in nsim_bpf_setup_tc_block_cb() local 147 if (prog && !prog->aux->offload && !ns->bpf_tc_non_bound_accept) { in nsim_bpf_setup_tc_block_cb() 161 if (!cls_bpf->prog) in nsim_bpf_setup_tc_block_cb() 230 state->prog = prog; in nsim_bpf_create_prog() 295 if (bpf->prog && bpf->prog->aux->offload) { in nsim_setup_prog_checks() [all …]
|
/linux-6.3-rc2/drivers/net/ethernet/netronome/nfp/bpf/ |
A D | offload.c | 112 struct bpf_prog *prog) in nfp_map_ptrs_record() argument 137 prog->aux->used_maps[i]); in nfp_map_ptrs_record() 162 meta->insn = prog[i]; in nfp_prog_prepare() 202 nfp_prog->type = prog->type; in nfp_bpf_verifier_prep() 205 ret = nfp_prog_prepare(nfp_prog, prog->insnsi, prog->len); in nfp_bpf_verifier_prep() 234 if (!nfp_prog->prog) in nfp_bpf_translate() 242 prog->aux->offload->jited_image = nfp_prog->prog; in nfp_bpf_translate() 251 kvfree(nfp_prog->prog); in nfp_bpf_destroy() 580 if (prog && !bpf_offload_dev_match(prog, nn->dp.netdev)) in nfp_net_bpf_offload() 583 if (prog && old_prog) { in nfp_net_bpf_offload() [all …]
|
/linux-6.3-rc2/samples/bpf/ |
A D | tracex5_user.c | 27 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()
|