/kernel/linux/linux-5.10/arch/powerpc/net/ |
D | bpf_jit_comp64.c | 331 u32 dst_reg = b2p[insn[i].dst_reg]; in bpf_jit_build_body() local 358 if (dst_reg >= BPF_PPC_NVR_MIN && dst_reg < 32) in bpf_jit_build_body() 359 bpf_set_seen_register(ctx, insn[i].dst_reg); in bpf_jit_build_body() 369 EMIT(PPC_RAW_ADD(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body() 373 EMIT(PPC_RAW_SUB(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body() 380 EMIT(PPC_RAW_ADDI(dst_reg, dst_reg, IMM_L(imm))); in bpf_jit_build_body() 383 EMIT(PPC_RAW_ADD(dst_reg, dst_reg, b2p[TMP_REG_1])); in bpf_jit_build_body() 391 EMIT(PPC_RAW_ADDI(dst_reg, dst_reg, IMM_L(-imm))); in bpf_jit_build_body() 394 EMIT(PPC_RAW_SUB(dst_reg, dst_reg, b2p[TMP_REG_1])); in bpf_jit_build_body() 400 EMIT(PPC_RAW_MULW(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body() [all …]
|
/kernel/linux/linux-5.10/arch/s390/net/ |
D | bpf_jit_comp.c | 101 static inline u32 reg(u32 dst_reg, u32 src_reg) in reg() argument 103 return reg2hex[dst_reg] << 4 | reg2hex[src_reg]; in reg() 697 u32 dst_reg = insn->dst_reg; in bpf_jit_insn() local 718 EMIT4(0xb9160000, dst_reg, src_reg); in bpf_jit_insn() 724 EMIT4(0xb9040000, dst_reg, src_reg); in bpf_jit_insn() 728 EMIT6_IMM(0xc00f0000, dst_reg, imm); in bpf_jit_insn() 734 EMIT6_IMM(0xc0010000, dst_reg, imm); in bpf_jit_insn() 746 EMIT6_PCREL_RILB(0xc4080000, dst_reg, _EMIT_CONST_U64(imm64)); in bpf_jit_insn() 755 EMIT2(0x1a00, dst_reg, src_reg); in bpf_jit_insn() 756 EMIT_ZERO(dst_reg); in bpf_jit_insn() [all …]
|
/kernel/linux/linux-5.10/arch/x86/net/ |
D | bpf_jit_comp.c | 196 static u8 add_1reg(u8 byte, u32 dst_reg) in add_1reg() argument 198 return byte + reg2hex[dst_reg]; in add_1reg() 202 static u8 add_2reg(u8 byte, u32 dst_reg, u32 src_reg) in add_2reg() argument 204 return byte + reg2hex[dst_reg] + (reg2hex[src_reg] << 3); in add_2reg() 596 u32 dst_reg, const u32 imm32) in emit_mov_imm32() argument 608 b1 = add_1mod(0x48, dst_reg); in emit_mov_imm32() 611 EMIT3_off32(b1, b2, add_1reg(b3, dst_reg), imm32); in emit_mov_imm32() 620 if (is_ereg(dst_reg)) in emit_mov_imm32() 621 EMIT1(add_2mod(0x40, dst_reg, dst_reg)); in emit_mov_imm32() 624 EMIT2(b2, add_2reg(b3, dst_reg, dst_reg)); in emit_mov_imm32() [all …]
|
D | bpf_jit_comp32.c | 189 static u8 add_1reg(u8 byte, u32 dst_reg) in add_1reg() argument 191 return byte + dst_reg; in add_1reg() 195 static u8 add_2reg(u8 byte, u32 dst_reg, u32 src_reg) in add_2reg() argument 197 return byte + dst_reg + (src_reg << 3); in add_2reg() 1494 const bool dstk = insn->dst_reg != BPF_REG_AX; in do_jit() 1497 const u8 *dst = bpf2ia32[insn->dst_reg]; in do_jit()
|
/kernel/linux/linux-5.10/tools/include/linux/ |
D | filter.h | 37 .dst_reg = DST, \ 45 .dst_reg = DST, \ 55 .dst_reg = DST, \ 63 .dst_reg = DST, \ 73 .dst_reg = DST, \ 83 .dst_reg = DST, \ 91 .dst_reg = DST, \ 101 .dst_reg = DST, \ 109 .dst_reg = DST, \ 119 .dst_reg = DST, \ [all …]
|
/kernel/linux/linux-5.10/samples/bpf/ |
D | bpf_insn.h | 13 .dst_reg = DST, \ 21 .dst_reg = DST, \ 31 .dst_reg = DST, \ 39 .dst_reg = DST, \ 49 .dst_reg = DST, \ 57 .dst_reg = DST, \ 67 .dst_reg = DST, \ 75 .dst_reg = DST, \ 87 .dst_reg = DST, \ 93 .dst_reg = 0, \ [all …]
|
/kernel/linux/linux-5.10/kernel/bpf/ |
D | verifier.c | 1713 return !is_reg64(env, insn, insn->dst_reg, NULL, DST_OP); in insn_has_def32() 1824 u32 dreg = 1u << insn->dst_reg; in backtrack_insn() 1902 if (insn->dst_reg != BPF_REG_FP) in backtrack_insn() 2305 u32 dst_reg = env->prog->insnsi[insn_idx].dst_reg; in check_stack_write_fixed_off() local 2341 if (dst_reg != BPF_REG_FP) { in check_stack_write_fixed_off() 4003 err = check_reg_arg(env, insn->dst_reg, SRC_OP); in check_xadd() 4012 if (is_ctx_reg(env, insn->dst_reg) || in check_xadd() 4013 is_pkt_reg(env, insn->dst_reg) || in check_xadd() 4014 is_flow_key_reg(env, insn->dst_reg) || in check_xadd() 4015 is_sk_reg(env, insn->dst_reg)) { in check_xadd() [all …]
|
D | disasm.c | 112 insn->code, insn->dst_reg, in print_bpf_end_insn() 114 insn->imm, insn->dst_reg); in print_bpf_end_insn() 133 insn->dst_reg, class == BPF_ALU ? 'w' : 'r', in print_bpf_insn() 134 insn->dst_reg); in print_bpf_insn() 138 insn->dst_reg, in print_bpf_insn() 145 insn->dst_reg, in print_bpf_insn() 154 insn->dst_reg, in print_bpf_insn() 160 insn->dst_reg, insn->off, in print_bpf_insn() 169 insn->dst_reg, in print_bpf_insn() 182 insn->code, insn->dst_reg, in print_bpf_insn() [all …]
|
D | cgroup.c | 1755 BPF_SIZE(si->code), si->dst_reg, si->src_reg, in sysctl_convert_ctx_access() 1770 if (si->src_reg == treg || si->dst_reg == treg) in sysctl_convert_ctx_access() 1772 if (si->src_reg == treg || si->dst_reg == treg) in sysctl_convert_ctx_access() 1775 BPF_DW, si->dst_reg, treg, in sysctl_convert_ctx_access() 1779 treg, si->dst_reg, in sysctl_convert_ctx_access() 1786 BPF_DW, treg, si->dst_reg, in sysctl_convert_ctx_access() 1791 si->dst_reg, si->src_reg, in sysctl_convert_ctx_access() 1795 BPF_SIZE(si->code), si->dst_reg, si->dst_reg, in sysctl_convert_ctx_access() 1898 si->dst_reg, si->src_reg, \
|
D | core.c | 54 #define DST regs[insn->dst_reg] 306 dst[i].dst_reg == 0 && in bpf_prog_calc_tag() 991 if (from->dst_reg == BPF_REG_AX || from->src_reg == BPF_REG_AX) in bpf_jit_blind_insn() 997 *to++ = BPF_ALU64_REG(BPF_XOR, from->dst_reg, from->dst_reg); in bpf_jit_blind_insn() 1013 *to++ = BPF_ALU32_REG(from->code, from->dst_reg, BPF_REG_AX); in bpf_jit_blind_insn() 1027 *to++ = BPF_ALU64_REG(from->code, from->dst_reg, BPF_REG_AX); in bpf_jit_blind_insn() 1047 *to++ = BPF_JMP_REG(from->code, from->dst_reg, BPF_REG_AX, off); in bpf_jit_blind_insn() 1067 *to++ = BPF_JMP32_REG(from->code, from->dst_reg, BPF_REG_AX, in bpf_jit_blind_insn() 1075 *to++ = BPF_ALU64_REG(BPF_MOV, aux[0].dst_reg, BPF_REG_AX); in bpf_jit_blind_insn() 1082 *to++ = BPF_ALU64_REG(BPF_OR, aux[0].dst_reg, BPF_REG_AX); in bpf_jit_blind_insn() [all …]
|
/kernel/linux/linux-5.10/net/core/ |
D | filter.c | 289 static u32 convert_skb_access(int skb_field, int dst_reg, int src_reg, in convert_skb_access() argument 298 *insn++ = BPF_LDX_MEM(BPF_W, dst_reg, src_reg, in convert_skb_access() 303 *insn++ = BPF_LDX_MEM(BPF_B, dst_reg, src_reg, PKT_TYPE_OFFSET()); in convert_skb_access() 304 *insn++ = BPF_ALU32_IMM(BPF_AND, dst_reg, PKT_TYPE_MAX); in convert_skb_access() 306 *insn++ = BPF_ALU32_IMM(BPF_RSH, dst_reg, 5); in convert_skb_access() 313 *insn++ = BPF_LDX_MEM(BPF_H, dst_reg, src_reg, in convert_skb_access() 321 *insn++ = BPF_LDX_MEM(BPF_H, dst_reg, src_reg, in convert_skb_access() 325 *insn++ = BPF_LDX_MEM(BPF_B, dst_reg, src_reg, PKT_VLAN_PRESENT_OFFSET()); in convert_skb_access() 327 *insn++ = BPF_ALU32_IMM(BPF_RSH, dst_reg, PKT_VLAN_PRESENT_BIT); in convert_skb_access() 329 *insn++ = BPF_ALU32_IMM(BPF_AND, dst_reg, 1); in convert_skb_access() [all …]
|
/kernel/linux/linux-5.10/arch/mips/net/ |
D | ebpf_jit.c | 183 dst_reg, enumerator 198 insn->src_reg : insn->dst_reg; in ebpf_to_mips_reg() 226 if (w == dst_reg || w == src_reg_no_fp) in ebpf_to_mips_reg() 426 int dst = ebpf_to_mips_reg(ctx, insn, dst_reg); in gen_imm_insn() 464 get_reg_val_type(ctx, idx, insn->dst_reg) == REG_32BIT) in gen_imm_insn() 470 get_reg_val_type(ctx, idx, insn->dst_reg) != REG_32BIT) in gen_imm_insn() 697 dst = ebpf_to_mips_reg(ctx, insn, dst_reg); in build_one_insn() 700 if (get_reg_val_type(ctx, this_idx, insn->dst_reg) == REG_32BIT) in build_one_insn() 713 dst = ebpf_to_mips_reg(ctx, insn, dst_reg); in build_one_insn() 716 if (get_reg_val_type(ctx, this_idx, insn->dst_reg) == REG_32BIT) in build_one_insn() [all …]
|
/kernel/linux/linux-5.10/include/linux/ |
D | filter.h | 96 .dst_reg = DST, \ 104 .dst_reg = DST, \ 114 .dst_reg = DST, \ 122 .dst_reg = DST, \ 132 .dst_reg = DST, \ 142 .dst_reg = DST, \ 150 .dst_reg = DST, \ 160 .dst_reg = DST, \ 168 .dst_reg = DST, \ 177 .dst_reg = DST, \ [all …]
|
/kernel/linux/linux-5.10/drivers/net/ethernet/netronome/nfp/bpf/ |
D | jit.c | 770 reg_a(meta->paired_st->dst_reg * 2), off, len - 1, in nfp_cpp_memcpy() 775 reg_a(meta->paired_st->dst_reg * 2), off, xfer_num - 1, in nfp_cpp_memcpy() 782 reg_a(meta->paired_st->dst_reg * 2), off, in nfp_cpp_memcpy() 789 reg_a(meta->paired_st->dst_reg * 2), off, in nfp_cpp_memcpy() 796 reg_a(meta->paired_st->dst_reg * 2), off, 7, in nfp_cpp_memcpy() 802 reg_a(meta->paired_st->dst_reg * 2), off, len - 33, in nfp_cpp_memcpy() 813 reg_a(meta->paired_st->dst_reg * 2), off, in nfp_cpp_memcpy() 818 xfer_num - 1, reg_a(meta->paired_st->dst_reg * 2), off, in nfp_cpp_memcpy() 841 wrp_reg_subpart(nfp_prog, reg_both(meta->insn.dst_reg * 2), in nfp_cpp_memcpy() 846 wrp_reg_subpart(nfp_prog, reg_both(meta->insn.dst_reg * 2), in nfp_cpp_memcpy() [all …]
|
D | verifier.c | 505 const struct bpf_reg_state *reg = cur_regs(env) + meta->insn.dst_reg; in nfp_bpf_check_store() 522 return nfp_bpf_check_ptr(nfp_prog, meta, env, meta->insn.dst_reg); in nfp_bpf_check_store() 530 const struct bpf_reg_state *dreg = cur_regs(env) + meta->insn.dst_reg; in nfp_bpf_check_xadd() 547 return nfp_bpf_check_ptr(nfp_prog, meta, env, meta->insn.dst_reg); in nfp_bpf_check_xadd() 557 cur_regs(env) + meta->insn.dst_reg; in nfp_bpf_check_alu() 642 meta->insn.dst_reg >= MAX_BPF_REG) { in nfp_verify_insn() 679 if (meta->insn.dst_reg >= BPF_REG_6 && in nfp_assign_subprog_idx_and_regs() 680 meta->insn.dst_reg <= BPF_REG_9) in nfp_assign_subprog_idx_and_regs()
|
/kernel/linux/linux-5.10/arch/arm/crypto/ |
D | crct10dif-ce-core.S | 137 .macro fold_16_bytes, src_reg, dst_reg, load_next_consts 143 veor.8 \dst_reg, \dst_reg, q8 144 veor.8 \dst_reg, \dst_reg, \src_reg
|
/kernel/linux/linux-5.10/arch/x86/crypto/ |
D | crct10dif-pcl-asm_64.S | 83 # Fold src_reg into dst_reg. 84 .macro fold_16_bytes src_reg, dst_reg argument 88 pxor %xmm8, \dst_reg 89 xorps \src_reg, \dst_reg
|
/kernel/linux/linux-5.10/drivers/scsi/ |
D | script_asm.pl | 553 $dst_reg = "\U$1\E"; 581 print STDERR "source = $src_reg, data = $data8 , destination = $dst_reg\n" 585 if (($src_reg eq undef) || ($src_reg eq $dst_reg)) { 587 ($registers{$dst_reg} << 16); 588 } elsif ($dst_reg =~ /SFBR/i) { 593 ($registers{$dst_reg} << 16);
|
/kernel/linux/linux-5.10/arch/arm64/crypto/ |
D | crct10dif-ce-core.S | 240 .macro fold_16_bytes, p, src_reg, dst_reg, load_next_consts 247 eor \dst_reg\().16b, \dst_reg\().16b, v8.16b 248 eor \dst_reg\().16b, \dst_reg\().16b, \src_reg\().16b
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/progs/ |
D | netif_receive_skb.c | 245 {.code = (__u8)1,.dst_reg = (__u8)0x2,.src_reg = (__u8)0x3,.off = (__s16)4,.imm = (__s32)5,}); in BPF_PROG() 247 {.code = 1, .dst_reg = 0x2, .src_reg = 0x3, .off = 4, in BPF_PROG()
|
/kernel/linux/linux-5.10/kernel/trace/ |
D | bpf_trace.c | 1862 data), si->dst_reg, si->src_reg, in pe_prog_convert_ctx_access() 1864 *insn++ = BPF_LDX_MEM(BPF_DW, si->dst_reg, si->dst_reg, in pe_prog_convert_ctx_access() 1870 data), si->dst_reg, si->src_reg, in pe_prog_convert_ctx_access() 1872 *insn++ = BPF_LDX_MEM(BPF_DW, si->dst_reg, si->dst_reg, in pe_prog_convert_ctx_access() 1878 regs), si->dst_reg, si->src_reg, in pe_prog_convert_ctx_access() 1880 *insn++ = BPF_LDX_MEM(BPF_SIZEOF(long), si->dst_reg, si->dst_reg, in pe_prog_convert_ctx_access()
|
/kernel/linux/linux-5.10/arch/arm64/net/ |
D | bpf_jit_comp.c | 366 int dst_reg = FIELD_GET(BPF_FIXUP_REG_MASK, ex->fixup); in arm64_bpf_fixup_exception() local 368 regs->regs[dst_reg] = 0; in arm64_bpf_fixup_exception() 376 int dst_reg) in add_exception_handler() argument 414 FIELD_PREP(BPF_FIXUP_REG_MASK, dst_reg); in add_exception_handler() 430 const u8 dst = bpf2a64[insn->dst_reg]; in build_insn()
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/verifier/ |
D | basic_instr.c | 184 .dst_reg = BPF_REG_0,
|
/kernel/linux/linux-5.10/arch/sparc/net/ |
D | bpf_jit_comp_64.c | 898 const u8 dst = bpf2sparc[insn->dst_reg]; in build_insn() 1302 if (insn->dst_reg == BPF_REG_FP) in build_insn() 1343 if (insn->dst_reg == BPF_REG_FP) in build_insn() 1378 if (insn->dst_reg == BPF_REG_FP) in build_insn() 1401 if (insn->dst_reg == BPF_REG_FP) in build_insn()
|
/kernel/linux/linux-5.10/Documentation/networking/ |
D | filter.rst | 853 op:16, jt:8, jf:8, k:32 ==> op:8, dst_reg:4, src_reg:4, off:16, imm:32 964 In eBPF it means dst_reg = (u32) dst_reg + (u32) src_reg; similarly, 973 dst_reg = dst_reg + src_reg 1044 BPF_MEM | <size> | BPF_STX: *(size *) (dst_reg + off) = src_reg 1045 BPF_MEM | <size> | BPF_ST: *(size *) (dst_reg + off) = imm32 1046 BPF_MEM | <size> | BPF_LDX: dst_reg = *(size *) (src_reg + off) 1047 BPF_XADD | BPF_W | BPF_STX: lock xadd *(u32 *)(dst_reg + off16) += src_reg 1048 BPF_XADD | BPF_DW | BPF_STX: lock xadd *(u64 *)(dst_reg + off16) += src_reg 1055 instruction that loads 64-bit immediate value into a dst_reg.
|