| /linux/tools/testing/selftests/bpf/ |
| H A D | disasm.c | 159 return (BPF_OP(insn->code) == BPF_DIV || BPF_OP(insn->code) == BPF_MOD) && in is_sdiv_smod() 165 return BPF_OP(insn->code) == BPF_MOV && in is_movsx() 194 if (BPF_OP(insn->code) == BPF_END) { in print_bpf_insn() 199 } else if (BPF_OP(insn->code) == BPF_NEG) { in print_bpf_insn() 215 is_sdiv_smod(insn) ? bpf_alu_sign_string[BPF_OP(insn->code) >> 4] in print_bpf_insn() 216 : bpf_alu_string[BPF_OP(insn->code) >> 4], in print_bpf_insn() 224 is_sdiv_smod(insn) ? bpf_alu_sign_string[BPF_OP(insn->code) >> 4] in print_bpf_insn() 225 : bpf_alu_string[BPF_OP(insn->code) >> 4], in print_bpf_insn() 242 bpf_alu_string[BPF_OP(ins in print_bpf_insn() [all...] |
| /linux/samples/bpf/ |
| H A D | bpf_insn.h | 12 .code = BPF_ALU64 | BPF_OP(OP) | BPF_X, \ 20 .code = BPF_ALU | BPF_OP(OP) | BPF_X, \ 30 .code = BPF_ALU64 | BPF_OP(OP) | BPF_K, \ 38 .code = BPF_ALU | BPF_OP(OP) | BPF_K, \ 177 .code = BPF_JMP | BPF_OP(OP) | BPF_X, \ 187 .code = BPF_JMP32 | BPF_OP(OP) | BPF_X, \ 197 .code = BPF_JMP | BPF_OP(OP) | BPF_K, \ 207 .code = BPF_JMP32 | BPF_OP(OP) | BPF_K, \
|
| /linux/tools/include/linux/ |
| H A D | filter.h | 36 .code = BPF_ALU64 | BPF_OP(OP) | BPF_X, \ 44 .code = BPF_ALU | BPF_OP(OP) | BPF_X, \ 54 .code = BPF_ALU64 | BPF_OP(OP) | BPF_K, \ 62 .code = BPF_ALU | BPF_OP(OP) | BPF_K, \ 230 .code = BPF_JMP | BPF_OP(OP) | BPF_X, \ 240 .code = BPF_JMP32 | BPF_OP(OP) | BPF_X, \ 250 .code = BPF_JMP | BPF_OP(OP) | BPF_K, \ 260 .code = BPF_JMP32 | BPF_OP(OP) | BPF_K, \
|
| /linux/arch/mips/net/ |
| H A D | bpf_jit_comp64.c | 160 switch (BPF_OP(op)) { in emit_alu_i64() 203 switch (BPF_OP(op)) { in emit_alu_r64() 677 if (!valid_alu_i(BPF_OP(code), imm)) { in build_insn() 679 emit_alu_r(ctx, dst, MIPS_R_T4, BPF_OP(code)); in build_insn() 680 } else if (rewrite_alu_i(BPF_OP(code), imm, &alu, &val)) { in build_insn() 699 if (!valid_alu_i(BPF_OP(code), imm)) { in build_insn() 702 emit_alu_r(ctx, dst, MIPS_R_T4, BPF_OP(code)); in build_insn() 703 } else if (rewrite_alu_i(BPF_OP(code), imm, &alu, &val)) { in build_insn() 717 emit_alu_r(ctx, dst, src, BPF_OP(code)); in build_insn() 736 emit_alu_r(ctx, dst, MIPS_R_T4, BPF_OP(code)); in build_insn() [all …]
|
| H A D | bpf_jit_comp32.c | 270 switch (BPF_OP(op)) { in emit_alu_r64() 324 switch (BPF_OP(op)) { in emit_shift_i64() 376 switch (BPF_OP(op)) { in emit_shift_r64() 546 switch (BPF_OP(op)) { in emit_divmod_r64() 1519 if (!valid_alu_i(BPF_OP(code), imm)) { in build_insn() 1521 emit_alu_r(ctx, lo(dst), MIPS_R_T6, BPF_OP(code)); in build_insn() 1522 } else if (rewrite_alu_i(BPF_OP(code), imm, &alu, &val)) { in build_insn() 1549 emit_alu_r(ctx, lo(dst), lo(src), BPF_OP(code)); in build_insn() 1567 emit_alu_i64(ctx, dst, imm, BPF_OP(code)); in build_insn() 1578 emit_alu_i64(ctx, dst, imm, BPF_OP(code)); in build_insn() [all …]
|
| /linux/arch/parisc/net/ |
| H A D | bpf_jit_comp32.c | 340 if (BPF_OP(opcode) == BPF_DIV || BPF_OP(opcode) == BPF_MOD) { in emit_call_millicode() 341 if (BPF_OP(opcode) == BPF_DIV) in emit_call_millicode() 379 if (BPF_OP(opcode) == BPF_DIV || BPF_OP(opcode) == BPF_MOD) { in emit_call_libgcc_ll() 381 if (BPF_OP(opcode) == BPF_DIV) in emit_call_libgcc_ll() 1134 BPF_OP(code), insn->src_reg, insn->dst_reg); in bpf_jit_emit_insn() 1166 emit_alu_r64(dst, src, ctx, BPF_OP(code)); in bpf_jit_emit_insn() 1171 emit_alu_r64(dst, tmp2, ctx, BPF_OP(code)); in bpf_jit_emit_insn() 1181 emit_alu_i64(dst, imm, ctx, BPF_OP(code)); in bpf_jit_emit_insn() 1214 emit_alu_r32(dst, src, ctx, BPF_OP(code)); in bpf_jit_emit_insn() 1230 emit_alu_i32(dst, imm, ctx, BPF_OP(code)); in bpf_jit_emit_insn() [all …]
|
| H A D | bpf_jit_comp64.c | 533 if (BPF_OP(opcode) == BPF_DIV || BPF_OP(opcode) == BPF_MOD) { in emit_call_libgcc_ll() 534 if (BPF_OP(opcode) == BPF_DIV) in emit_call_libgcc_ll() 890 if (is_signed_bpf_cond(BPF_OP(code))) in bpf_jit_emit_insn() 899 if (BPF_OP(code) == BPF_JSET) { in bpf_jit_emit_insn() 906 emit_branch(BPF_OP(code), rd, rs, paoff, ctx); in bpf_jit_emit_insn() 940 if (is_signed_bpf_cond(BPF_OP(code))) in bpf_jit_emit_insn() 949 emit_branch(BPF_OP(code), rd, rs, paoff, ctx); in bpf_jit_emit_insn()
|
| /linux/tools/bpf/bpftool/ |
| H A D | cfg.c | 179 __u8 opcode = BPF_OP(cur->code); in func_partition_bb_head() 305 BPF_OP(insn->code) == BPF_CALL || in func_add_bb_edges() 306 BPF_OP(insn->code) == BPF_EXIT) { in func_add_bb_edges() 311 } else if (BPF_OP(insn->code) == BPF_JA) { in func_add_bb_edges()
|
| /linux/include/uapi/linux/ |
| H A D | bpf_common.h | 31 #define BPF_OP(code) ((code) & 0xf0) macro
|
| /linux/tools/include/uapi/linux/ |
| H A D | bpf_common.h | 31 #define BPF_OP(code) ((code) & 0xf0) macro
|
| /linux/arch/riscv/net/ |
| H A D | bpf_jit_comp32.c | 991 emit_alu_r64(dst, src, ctx, BPF_OP(code)); in bpf_jit_emit_insn() 995 emit_alu_r64(dst, tmp2, ctx, BPF_OP(code)); in bpf_jit_emit_insn() 1011 emit_alu_i64(dst, imm, ctx, BPF_OP(code)); in bpf_jit_emit_insn() 1044 emit_alu_r32(dst, src, ctx, BPF_OP(code)); in bpf_jit_emit_insn() 1060 emit_alu_i32(dst, imm, ctx, BPF_OP(code)); in bpf_jit_emit_insn() 1068 emit_alu_r32(dst, tmp2, ctx, BPF_OP(code)); in bpf_jit_emit_insn() 1218 emit_branch_r64(dst, src, rvoff, ctx, BPF_OP(code)); in bpf_jit_emit_insn() 1220 emit_branch_r32(dst, src, rvoff, ctx, BPF_OP(code)); in bpf_jit_emit_insn()
|
| H A D | bpf_jit_comp64.c | 1702 if (is_signed_bpf_cond(BPF_OP(code))) { in bpf_jit_emit_insn() 1715 if (BPF_OP(code) == BPF_JSET) { in bpf_jit_emit_insn() 1721 emit_branch(BPF_OP(code), rd, rs, rvoff, ctx); in bpf_jit_emit_insn() 1752 if (is_signed_bpf_cond(BPF_OP(code))) { in bpf_jit_emit_insn() 1765 emit_branch(BPF_OP(code), rd, rs, rvoff, ctx); in bpf_jit_emit_insn()
|
| /linux/arch/x86/net/ |
| H A D | bpf_jit_comp.c | 1756 b2 = simple_alu_opcodes[BPF_OP(insn->code)]; in do_jit() 1840 switch (BPF_OP(insn->code)) { in do_jit() 1937 if (BPF_OP(insn->code) == BPF_MOD && in do_jit() 1941 else if (BPF_OP(insn->code) == BPF_DIV && in do_jit() 1988 b3 = simple_alu_opcodes[BPF_OP(insn->code)]; in do_jit() 2007 switch (BPF_OP(insn->code)) { in do_jit() 2041 b3 = simple_alu_opcodes[BPF_OP(insn->code)]; in do_jit() 2392 EMIT2(simple_alu_opcodes[BPF_OP(insn->imm)], in do_jit() 2566 switch (BPF_OP(insn->code)) { in do_jit()
|
| /linux/arch/powerpc/net/ |
| H A D | bpf_jit_comp64.c | 1061 if (BPF_OP(code) == BPF_MOD) { in bpf_jit_build_body() 1077 if (BPF_OP(code) == BPF_MOD) { in bpf_jit_build_body() 1097 if (BPF_OP(code) == BPF_DIV) { in bpf_jit_build_body() 1108 if (BPF_OP(code) == BPF_MOD) { in bpf_jit_build_body() 1122 if (BPF_OP(code) == BPF_MOD) { in bpf_jit_build_body()
|
| /linux/drivers/net/ethernet/netronome/nfp/bpf/ |
| H A D | main.h | 363 return BPF_OP(meta->insn.code); in mbpf_op()
|
| /linux/Documentation/bpf/ |
| H A D | classic_vs_extended.rst | 289 If BPF_CLASS(code) == BPF_ALU or BPF_ALU64 [ in eBPF ], BPF_OP(code) is one of:: 306 If BPF_CLASS(code) == BPF_JMP or BPF_JMP32 [ in eBPF ], BPF_OP(code) is one of::
|
| /linux/arch/loongarch/net/ |
| H A D | bpf_jit.c | 708 const u8 cond = BPF_OP(code); in build_insn() 1064 if (is_signed_bpf_cond(BPF_OP(code))) { in build_insn() 1105 if (is_signed_bpf_cond(BPF_OP(code))) { in build_insn()
|
| /linux/kernel/bpf/ |
| H A D | verifier.c | 3179 if (BPF_OP(code) == BPF_CALL) in check_subprogs() 3181 if (BPF_OP(code) == BPF_EXIT) { in check_subprogs() 3356 op = BPF_OP(code); in bpf_is_reg64() 13527 u8 opcode = BPF_OP(insn->code); in sanitize_ptr_alu() 13629 const char *op = BPF_OP(insn->code) == BPF_ADD ? "add" : "sub"; in sanitize_err() 13743 u8 opcode = BPF_OP(insn->code); in adjust_ptr_min_max_vals() 14827 switch (BPF_OP(insn->code)) { in is_safe_to_compute_dst_reg_range() 14897 u8 opcode = BPF_OP(insn->code); in adjust_scalar_min_max_vals() 15058 u8 opcode = BPF_OP(insn->code); in adjust_reg_min_max_vals() 15172 (BPF_OP(insn->code) == BPF_ADD || BPF_OP(insn->code) == BPF_SUB) && in adjust_reg_min_max_vals() [all …]
|
| H A D | core.c | 415 BPF_OP(code) == BPF_EXIT) in bpf_adj_branches() 418 if (BPF_OP(code) == BPF_CALL) { in bpf_adj_branches()
|
| /linux/tools/bpf/ |
| H A D | bpf_dbg.c | 431 if ((BPF_CLASS(f.code) == BPF_JMP && BPF_OP(f.code) != BPF_JA)) in bpf_disasm()
|
| /linux/kernel/ |
| H A D | seccomp.c | 813 switch (BPF_OP(code)) { in seccomp_is_const_allow()
|
| /linux/lib/ |
| H A D | test_bpf.c | 1629 __bpf_alu_result(&res, dst, src, BPF_OP(op)); in __bpf_emit_atomic64() 1676 __bpf_alu_result(&res, (u32)dst, (u32)src, BPF_OP(op)); in __bpf_emit_atomic32() 1942 __bpf_alu_result(&res, mem, upd, BPF_OP(op)); in __bpf_fill_atomic_reg_pairs() 2024 insn[i++] = BPF_ALU64_REG(BPF_OP(op), R1, R10); in __bpf_fill_atomic_reg_pairs()
|
| /linux/arch/arm64/net/ |
| H A D | bpf_jit_comp.c | 1489 switch (BPF_OP(code)) { in build_insn()
|
| /linux/net/core/ |
| H A D | filter.c | 758 insn->code = BPF_JMP | BPF_OP(fp->code) | bpf_src; in bpf_convert_filter() 766 switch (BPF_OP(fp->code)) { in bpf_convert_filter() 787 insn->code = BPF_JMP | BPF_OP(fp->code) | bpf_src; in bpf_convert_filter()
|
| /linux/tools/lib/bpf/ |
| H A D | libbpf.c | 821 BPF_OP(insn->code) == BPF_CALL && in insn_is_subprog_call() 7722 BPF_OP(insn->code) == BPF_CALL && in libbpf_prepare_prog_load()
|