Home
last modified time | relevance | path

Searched refs:bpf_insn (Results 1 – 25 of 123) sorted by relevance

12345

/linux/tools/include/linux/
H A Dfilter.h35 ((struct bpf_insn) { \
43 ((struct bpf_insn) { \
53 ((struct bpf_insn) { \
61 ((struct bpf_insn) { \
71 ((struct bpf_insn) { \
81 ((struct bpf_insn) { \
89 ((struct bpf_insn) { \
99 ((struct bpf_insn) { \
107 ((struct bpf_insn) { \
117 ((struct bpf_insn) { \
[all …]
/linux/samples/bpf/
H A Dbpf_insn.h6 struct bpf_insn;
11 ((struct bpf_insn) { \
19 ((struct bpf_insn) { \
29 ((struct bpf_insn) { \
37 ((struct bpf_insn) { \
47 ((struct bpf_insn) { \
55 ((struct bpf_insn) { \
65 ((struct bpf_insn) { \
73 ((struct bpf_insn) { \
85 ((struct bpf_insn) { \
[all …]
/linux/tools/lib/bpf/
H A Dgen_loader.c96 static void emit(struct bpf_gen *gen, struct bpf_insn insn) in emit()
104 static void emit2(struct bpf_gen *gen, struct bpf_insn insn1, struct bpf_insn insn2) in emit2()
415 struct bpf_insn *insn = (struct bpf_insn *)opts->insns; in bpf_gen__finish()
416 int insn_cnt = opts->insns_sz / sizeof(struct bpf_insn); in bpf_gen__finish()
464 struct bpf_insn *insn = in compute_sha_update_offsets()
465 (struct bpf_insn *)(gen->insn_start + gen->hash_insn_offset[i]); in compute_sha_update_offsets()
754 move_blob2blob(gen, insn + offsetof(struct bpf_insn, imm), 4, in emit_relo_kfunc_btf()
755 kdesc->insn + offsetof(struct bpf_insn, imm)); in emit_relo_kfunc_btf()
756 move_blob2blob(gen, insn + offsetof(struct bpf_insn, off), 2, in emit_relo_kfunc_btf()
757 kdesc->insn + offsetof(struct bpf_insn, off)); in emit_relo_kfunc_btf()
[all …]
H A Dfeatures.c25 struct bpf_insn insns[] = { in probe_kern_prog_name()
49 struct bpf_insn insns[] = { in probe_kern_global_data()
230 struct bpf_insn insns[] = { in probe_kern_exp_attach_type()
251 struct bpf_insn insns[] = { in probe_kern_probe_read_kernel()
267 struct bpf_insn insns[] = { in probe_prog_bind_map()
334 struct bpf_insn insns[] = { in probe_perf_link()
370 struct bpf_insn insns[] = { in probe_uprobe_multi_link()
429 struct bpf_insn insns[] = { in probe_kern_bpf_cookie()
475 const struct bpf_insn insns[] = { in probe_kern_arg_ctx_tag()
524 struct bpf_insn insns[] = { in probe_ldimm64_full_range_off()
/linux/include/linux/
H A Dfilter.h106 ((struct bpf_insn) { \
117 ((struct bpf_insn) { \
130 ((struct bpf_insn) { \
140 ((struct bpf_insn) { \
152 ((struct bpf_insn) { \
162 ((struct bpf_insn) { \
172 ((struct bpf_insn) { \
180 ((struct bpf_insn) { \
194 ((struct bpf_insn) { \
201 static inline bool insn_is_mov_percpu_addr(const struct bpf_insn *insn) in insn_is_mov_percpu_addr()
[all …]
H A Dbpf.h74 const struct bpf_insn *);
123 int (*map_gen_lookup)(struct bpf_map *map, struct bpf_insn *insn_buf);
1067 static bool bpf_is_ldimm64(const struct bpf_insn *insn) in bpf_is_ldimm64()
1072 static inline bool bpf_pseudo_func(const struct bpf_insn *insn) in bpf_pseudo_func()
1081 bpf_atomic_is_load_store(const struct bpf_insn *atomic_insn) in bpf_atomic_is_load_store()
1110 int (*gen_prologue)(struct bpf_insn *insn, bool direct_write,
1112 int (*gen_epilogue)(struct bpf_insn *insn, const struct bpf_prog *prog,
1114 int (*gen_ld_abs)(const struct bpf_insn *orig,
1115 struct bpf_insn *insn_buf);
1117 const struct bpf_insn *src,
[all …]
/linux/tools/testing/selftests/bpf/
H A Dtest_verifier.c86 struct bpf_insn insns[MAX_INSNS];
87 struct bpf_insn *fill_insns;
99 struct bpf_insn expected_insns[MAX_EXPECTED_INSNS];
104 struct bpf_insn unexpected_insns[MAX_UNEXPECTED_INSNS];
192 struct bpf_insn *insn = self->fill_insns; in bpf_fill_ld_abs_vlan_push_pop()
235 struct bpf_insn *insn = self->fill_insns; in bpf_fill_jump_around_ld_abs()
257 struct bpf_insn *insn = self->fill_insns; in bpf_fill_rand_ld_dw()
264 struct bpf_insn tmp[2] = { BPF_LD_IMM64(BPF_REG_1, val) }; in bpf_fill_rand_ld_dw()
285 struct bpf_insn *insn = self->fill_insns; in bpf_fill_scale1()
311 struct bpf_insn *insn = self->fill_insns; in bpf_fill_scale2()
[all …]
H A Ddisasm_helpers.h8 struct bpf_insn;
10 struct bpf_insn *disasm_insn(struct bpf_insn *insn, char *buf, size_t buf_sz);
H A Ddisasm.h25 const struct bpf_insn *insn);
27 const struct bpf_insn *insn,
38 const struct bpf_insn *insn,
H A Dtesting_helpers.h19 int bpf_test_load_program(enum bpf_prog_type type, const struct bpf_insn *insns,
54 struct bpf_insn;
58 int get_xlated_program(int fd_prog, struct bpf_insn **buf, __u32 *cnt);
H A Ddisasm.c17 const struct bpf_insn *insn, in __func_get_name()
44 const struct bpf_insn *insn, in __func_imm_name()
140 const struct bpf_insn *insn) in print_bpf_end_insn()
150 const struct bpf_insn *insn) in print_bpf_bswap_insn()
157 static bool is_sdiv_smod(const struct bpf_insn *insn) in is_sdiv_smod()
163 static bool is_movsx(const struct bpf_insn *insn) in is_movsx()
169 static bool is_addr_space_cast(const struct bpf_insn *insn) in is_addr_space_cast()
181 static inline bool is_mov_percpu_addr(const struct bpf_insn *insn) in is_mov_percpu_addr()
187 const struct bpf_insn *insn, in print_bpf_insn()
H A Ddisasm_helpers.c22 static const char *print_call_cb(void *private_data, const struct bpf_insn *insn) in print_call_cb()
38 struct bpf_insn *disasm_insn(struct bpf_insn *insn, char *buf, size_t buf_sz) in disasm_insn()
H A Dtest_tag.c25 static struct bpf_insn prog[BPF_MAXINSNS];
42 struct bpf_insn tmp[] = { in bpf_gen_map_prog()
133 insns *= sizeof(struct bpf_insn); in tag_from_alg()
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dbpf_insn_array.c16 static int prog_load(struct bpf_insn *insns, __u32 insn_cnt, int *fd_array, __u32 fd_array_cnt) in prog_load()
26 static void __check_success(struct bpf_insn *insns, __u32 insn_cnt, __u32 *map_in, __u32 *map_out) in __check_success()
70 struct bpf_insn insns[] = { in check_one_to_one_mapping()
91 struct bpf_insn insns[] = { in check_simple()
112 struct bpf_insn insns[] = { in check_deletions()
131 struct bpf_insn insns[] = { in check_deletions_with_functions()
155 struct bpf_insn insns[] = { in check_out_of_bounds_index()
194 struct bpf_insn insns[] = { in check_mid_insn_index()
268 struct bpf_insn insns[] = { in check_blindness()
325 struct bpf_insn insns[] = { in check_load_unfrozen_map()
[all …]
H A Dkptr_xchg_inline.c11 struct bpf_insn *insn = NULL; in test_kptr_xchg_inline()
12 struct bpf_insn exp; in test_kptr_xchg_inline()
H A Draw_tp_writable_test_run.c13 const struct bpf_insn trace_program[] = { in serial_test_raw_tp_writable_test_run()
34 const struct bpf_insn skb_program[] = { in serial_test_raw_tp_writable_test_run()
/linux/tools/bpf/bpftool/
H A Dcfg.c20 struct bpf_insn *start;
21 struct bpf_insn *end;
30 struct bpf_insn *head;
31 struct bpf_insn *tail;
63 static struct func_node *cfg_append_func(struct cfg *cfg, struct bpf_insn *insn) in cfg_append_func()
89 struct bpf_insn *insn) in func_append_bb()
131 static bool cfg_partition_funcs(struct cfg *cfg, struct bpf_insn *cur, in cfg_partition_funcs()
132 struct bpf_insn *end) in cfg_partition_funcs()
167 struct bpf_insn *cur, *end; in func_partition_bb_head()
244 struct bpf_insn *insn) in func_search_bb_with_head()
[all …]
H A Dxlated_dumper.c148 const struct bpf_insn *insn) in print_call_pcrel()
177 const struct bpf_insn *insn) in print_call()
195 const struct bpf_insn *insn, in print_imm()
229 struct bpf_insn *insn = buf; in dump_xlated_json()
314 struct bpf_insn *insn = buf; in dump_xlated_plain()
380 struct bpf_insn *insn_start = buf_start; in dump_xlated_for_graph()
381 struct bpf_insn *insn_end = buf_end; in dump_xlated_for_graph()
382 struct bpf_insn *cur = insn_start; in dump_xlated_for_graph()
H A Dfeature.c436 const struct bpf_insn *insns, size_t insns_cnt, in probe_prog_load_ifindex()
459 struct bpf_insn insns[2] = { in probe_prog_type_ifindex()
580 struct bpf_insn insns[2] = { in probe_helper_ifindex()
703 probe_misc_feature(struct bpf_insn *insns, size_t len, in probe_misc_feature()
733 struct bpf_insn insns[BPF_MAXINSNS + 1]; in probe_large_insn_limit()
754 struct bpf_insn insns[4] = { in probe_bounded_loops()
775 struct bpf_insn insns[4] = { in probe_v2_isa_extension()
796 struct bpf_insn insns[4] = { in probe_v3_isa_extension()
817 struct bpf_insn insns[5] = { in probe_v4_isa_extension()
/linux/kernel/bpf/
H A Ddisasm.h25 const struct bpf_insn *insn);
27 const struct bpf_insn *insn,
38 const struct bpf_insn *insn,
H A Ddisasm.c17 const struct bpf_insn *insn, in __func_get_name()
44 const struct bpf_insn *insn, in __func_imm_name()
140 const struct bpf_insn *insn) in print_bpf_end_insn()
150 const struct bpf_insn *insn) in print_bpf_bswap_insn()
157 static bool is_sdiv_smod(const struct bpf_insn *insn) in is_sdiv_smod()
163 static bool is_movsx(const struct bpf_insn *insn) in is_movsx()
169 static bool is_addr_space_cast(const struct bpf_insn *insn) in is_addr_space_cast()
181 static inline bool is_mov_percpu_addr(const struct bpf_insn *insn) in is_mov_percpu_addr()
187 const struct bpf_insn *insn, in print_bpf_insn()
/linux/arch/arc/net/
H A Dbpf_jit_core.c252 const struct bpf_insn *insn = ctx->prog->insnsi; in analyze_reg_usage()
331 const struct bpf_insn *insn) in get_index_for_insn()
342 static inline s32 get_offset(const struct bpf_insn *insn) in get_offset()
369 const struct bpf_insn *insn) in get_target_index_for_insn()
375 static inline bool has_imm(const struct bpf_insn *insn) in has_imm()
488 const struct bpf_insn *insn) in check_bpf_jump()
518 const struct bpf_insn *insn) in get_curr_jit_off()
535 const struct bpf_insn *insn) in get_targ_jit_off()
582 const struct bpf_insn *insn, in handle_jumps()
643 const struct bpf_insn *insn, u8 *len) in handle_jmp_epilogue()
[all …]
/linux/drivers/net/ethernet/netronome/nfp/bpf/
H A Djit.c1297 const struct bpf_insn *insn = &meta->insn; in wrp_alu64_imm()
1328 const struct bpf_insn *insn = &meta->insn; in wrp_alu32_imm()
1361 const struct bpf_insn *insn = &meta->insn; in wrp_test_reg()
1402 const struct bpf_insn *insn = &meta->insn; in cmp_imm()
1439 const struct bpf_insn *insn = &meta->insn; in cmp_reg()
1505 const struct bpf_insn *insn = &meta->insn; in wrp_mul()
1838 const struct bpf_insn *insn = &meta->insn; in mov_reg64()
1901 const struct bpf_insn *insn = &meta->insn; in add_reg64()
1915 const struct bpf_insn *insn = &meta->insn; in add_imm64()
1926 const struct bpf_insn *insn = &meta->insn; in sub_reg64()
[all …]
H A Dmain.h301 struct bpf_insn insn;
306 struct bpf_insn *paired_st;
462 struct bpf_insn insn = meta->insn; in is_mbpf_helper_call()
470 struct bpf_insn insn = meta->insn; in is_mbpf_pseudo_call()
571 struct bpf_insn *insn);
/linux/arch/loongarch/net/
H A Dbpf_jit.h55 static inline int bpf2la_offset(int bpf_insn, int off, const struct jit_ctx *ctx) in bpf2la_offset() argument
58 bpf_insn++; in bpf2la_offset()
64 return (ctx->offset[bpf_insn + off] - (ctx->offset[bpf_insn] - 1)); in bpf2la_offset()

12345