| /linux/kernel/bpf/ |
| H A D | disasm.c | 232 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn() 240 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn() 251 BPF_SIZE(insn->code) == BPF_DW ? "64" : "", in print_bpf_insn() 253 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn() 259 BPF_SIZE(insn->code) == BPF_DW ? "64" : "", in print_bpf_insn() 260 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn() 267 BPF_SIZE(insn->code) == BPF_DW ? "64" : "", in print_bpf_insn() 268 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn() 274 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn() 280 bpf_ldst_string[BPF_SIZE(ins in print_bpf_insn() [all...] |
| H A D | core.c | 2175 if (BPF_SIZE(insn->code) == BPF_W) \ in ___bpf_prog_run() 2178 else if (BPF_SIZE(insn->code) == BPF_DW) \ in ___bpf_prog_run() 2185 if (BPF_SIZE(insn->code) == BPF_W) \ in ___bpf_prog_run() 2189 else if (BPF_SIZE(insn->code) == BPF_DW) \ in ___bpf_prog_run() 2212 if (BPF_SIZE(insn->code) == BPF_W) in ___bpf_prog_run() 2216 else if (BPF_SIZE(insn->code) == BPF_DW) in ___bpf_prog_run() 2224 if (BPF_SIZE(insn->code) == BPF_W) in ___bpf_prog_run() 2228 else if (BPF_SIZE(insn->code) == BPF_DW) in ___bpf_prog_run() 2239 switch (BPF_SIZE(insn->code)) { in ___bpf_prog_run() 2257 switch (BPF_SIZE(insn->code)) { in ___bpf_prog_run()
|
| H A D | verifier.c | 3688 return BPF_SIZE(code) == BPF_DW || BPF_MODE(code) == BPF_MEMSX; in is_reg64() 3700 return BPF_SIZE(code) == BPF_DW; in is_reg64() 7822 BPF_SIZE(insn->code), BPF_READ, insn->dst_reg, in check_load_mem() 7852 BPF_SIZE(insn->code), BPF_WRITE, insn->src_reg, in check_store_reg() 7865 if (BPF_SIZE(insn->code) != BPF_W && BPF_SIZE(insn->code) != BPF_DW) { in check_atomic_rmw() 7927 BPF_SIZE(insn->code), BPF_READ, -1, true, false); in check_atomic_rmw() 7930 insn->off, BPF_SIZE(insn->code), in check_atomic_rmw() 7942 BPF_SIZE(insn->code), BPF_WRITE, -1, true, false); in check_atomic_rmw() 8001 if (BPF_SIZE(insn->code) == BPF_DW && BITS_PER_LONG != 64) { in check_atomic() 8008 if (BPF_SIZE(insn->code) == BPF_DW && BITS_PER_LONG != 64) { in check_atomic() [all …]
|
| /linux/tools/testing/selftests/bpf/ |
| H A D | disasm.c | 232 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn() 240 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn() 251 BPF_SIZE(insn->code) == BPF_DW ? "64" : "", in print_bpf_insn() 253 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn() 259 BPF_SIZE(insn->code) == BPF_DW ? "64" : "", in print_bpf_insn() 260 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn() 267 BPF_SIZE(insn->code) == BPF_DW ? "64" : "", in print_bpf_insn() 268 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn() 274 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn() 280 bpf_ldst_string[BPF_SIZE(ins in print_bpf_insn() [all...] |
| /linux/samples/bpf/ |
| H A D | bpf_insn.h | 111 .code = BPF_LD | BPF_SIZE(SIZE) | BPF_ABS, \ 121 .code = BPF_LDX | BPF_SIZE(SIZE) | BPF_MEM, \ 131 .code = BPF_STX | BPF_SIZE(SIZE) | BPF_MEM, \ 154 .code = BPF_STX | BPF_SIZE(SIZE) | BPF_ATOMIC, \ 167 .code = BPF_ST | BPF_SIZE(SIZE) | BPF_MEM, \
|
| /linux/tools/include/linux/ |
| H A D | filter.h | 154 .code = BPF_LD | BPF_SIZE(SIZE) | BPF_ABS, \ 164 .code = BPF_LD | BPF_SIZE(SIZE) | BPF_IND, \ 174 .code = BPF_LDX | BPF_SIZE(SIZE) | BPF_MEM, \ 184 .code = BPF_STX | BPF_SIZE(SIZE) | BPF_MEM, \ 207 .code = BPF_STX | BPF_SIZE(SIZE) | BPF_ATOMIC, \ 220 .code = BPF_ST | BPF_SIZE(SIZE) | BPF_MEM, \
|
| /linux/include/uapi/linux/ |
| H A D | bpf_common.h | 17 #define BPF_SIZE(code) ((code) & 0x18) macro
|
| /linux/tools/include/uapi/linux/ |
| H A D | bpf_common.h | 17 #define BPF_SIZE(code) ((code) & 0x18) macro
|
| /linux/arch/powerpc/net/ |
| H A D | bpf_jit_comp64.c | 432 u32 size = BPF_SIZE(insn->code); in bpf_jit_emit_atomic_ops() 537 switch (BPF_SIZE(code)) { in bpf_jit_emit_probe_mem_store() 566 u32 size = BPF_SIZE(code); in emit_atomic_ld_st() 643 u32 size = BPF_SIZE(code); in bpf_jit_build_body() 1147 if (BPF_SIZE(code) == BPF_W || BPF_SIZE(code) == BPF_DW) { in bpf_jit_build_body() 1266 if ((BPF_SIZE(code) == BPF_DW && (off & 3)) || in bpf_jit_build_body() 1267 (BPF_SIZE(code) == BPF_B && in bpf_jit_build_body() 1269 (BPF_SIZE(code) == BPF_B && BPF_MODE(code) == BPF_MEMSX)) in bpf_jit_build_body()
|
| H A D | bpf_jit_comp32.c | 308 u32 size = BPF_SIZE(code); in bpf_jit_build_body()
|
| /linux/include/linux/ |
| H A D | filter.h | 310 .code = BPF_LD | BPF_SIZE(SIZE) | BPF_ABS, \ 320 .code = BPF_LD | BPF_SIZE(SIZE) | BPF_IND, \ 330 .code = BPF_LDX | BPF_SIZE(SIZE) | BPF_MEM, \ 340 .code = BPF_LDX | BPF_SIZE(SIZE) | BPF_MEMSX, \ 350 .code = BPF_STX | BPF_SIZE(SIZE) | BPF_MEM, \ 376 .code = BPF_STX | BPF_SIZE(SIZE) | BPF_ATOMIC, \ 389 .code = BPF_ST | BPF_SIZE(SIZE) | BPF_MEM, \ 573 const int __size = bpf_size_to_bytes(BPF_SIZE((insn)->code)); \
|
| /linux/arch/x86/net/ |
| H A D | bpf_jit_comp.c | 2135 EMIT(imm32, bpf_size_to_x86_bytes(BPF_SIZE(insn->code))); in do_jit() 2143 emit_stx(&prog, BPF_SIZE(insn->code), dst_reg, src_reg, insn->off); in do_jit() 2151 emit_st_r12(&prog, BPF_SIZE(insn->code), dst_reg, insn->off, insn->imm); in do_jit() 2169 emit_ldsx_r12(&prog, BPF_SIZE(insn->code), dst_reg, src_reg, insn->off); in do_jit() 2171 emit_ldx_r12(&prog, BPF_SIZE(insn->code), dst_reg, src_reg, insn->off); in do_jit() 2173 emit_stx_r12(&prog, BPF_SIZE(insn->code), dst_reg, src_reg, insn->off); in do_jit() 2294 emit_ldsx(&prog, BPF_SIZE(insn->code), dst_reg, src_reg, insn_off); in do_jit() 2296 emit_ldx(&prog, BPF_SIZE(insn->code), dst_reg, src_reg, insn_off); in do_jit() 2356 bool is64 = BPF_SIZE(insn->code) == BPF_DW; in do_jit() 2375 emit_ldx(&prog, BPF_SIZE(insn->code), in do_jit() [all …]
|
| H A D | bpf_jit_comp32.c | 1924 switch (BPF_SIZE(code)) { in do_jit() 1939 EMIT(imm32, bpf_size_to_x86_bytes(BPF_SIZE(code))); in do_jit() 1941 if (BPF_SIZE(code) == BPF_DW) { in do_jit() 1972 switch (BPF_SIZE(code)) { in do_jit() 1989 if (BPF_SIZE(code) == BPF_DW) { in do_jit() 2025 switch (BPF_SIZE(code)) { in do_jit() 2049 switch (BPF_SIZE(code)) { in do_jit()
|
| /linux/arch/mips/net/ |
| H A D | bpf_jit_comp64.c | 828 emit_ldx(ctx, dst, src, off, BPF_SIZE(code)); in build_insn() 836 emit_stx(ctx, dst, MIPS_R_T4, off, BPF_SIZE(code)); in build_insn() 843 emit_stx(ctx, dst, src, off, BPF_SIZE(code)); in build_insn() 861 if (BPF_SIZE(code) == BPF_DW) { in build_insn() 879 if (BPF_SIZE(code) == BPF_DW) { in build_insn()
|
| H A D | bpf_jit_comp32.c | 1659 emit_ldx(ctx, dst, lo(src), off, BPF_SIZE(code)); in build_insn() 1666 switch (BPF_SIZE(code)) { in build_insn() 1677 emit_stx(ctx, lo(dst), tmp, off, BPF_SIZE(code)); in build_insn() 1684 emit_stx(ctx, lo(dst), src, off, BPF_SIZE(code)); in build_insn()
|
| /linux/arch/riscv/net/ |
| H A D | bpf_jit_comp64.c | 579 emit_ldx(rd, off, rs, BPF_SIZE(code), false, ctx); in emit_atomic_ld_st() 585 if (BPF_SIZE(code) != BPF_DW && insn_is_zext(&insn[1])) in emit_atomic_ld_st() 596 emit_stx(rd, off, rs, BPF_SIZE(code), ctx); in emit_atomic_ld_st() 612 bool is64 = BPF_SIZE(code) == BPF_DW; in emit_atomic_rmw() 614 if (BPF_SIZE(code) != BPF_W && BPF_SIZE(code) != BPF_DW) { in emit_atomic_rmw() 1857 emit_ldx(rd, off, rs, BPF_SIZE(code), sign_ext, ctx); in bpf_jit_emit_insn() 1863 if (BPF_SIZE(code) != BPF_DW && insn_is_zext(&insn[1])) in bpf_jit_emit_insn() 1887 emit_st(rd, off, imm, BPF_SIZE(code), ctx); in bpf_jit_emit_insn() 1909 emit_stx(rd, off, rs, BPF_SIZE(code), ctx); in bpf_jit_emit_insn()
|
| H A D | bpf_jit_comp32.c | 1247 if (emit_load_r64(dst, src, off, ctx, BPF_SIZE(code))) in bpf_jit_emit_insn() 1269 if (emit_store_r64(dst, src, off, ctx, BPF_SIZE(code), in bpf_jit_emit_insn() 1282 if (emit_store_r64(dst, src, off, ctx, BPF_SIZE(code), in bpf_jit_emit_insn()
|
| /linux/arch/arm64/net/ |
| H A D | bpf_jit_comp.c | 739 switch (BPF_SIZE(code)) { in emit_atomic_ld_st() 755 switch (BPF_SIZE(code)) { in emit_atomic_ld_st() 788 const bool isdw = BPF_SIZE(code) == BPF_DW; in emit_lse_atomic() 864 const bool isdw = BPF_SIZE(code) == BPF_DW; in emit_ll_sc_atomic() 1687 switch (BPF_SIZE(code)) { in build_insn() 1777 switch (BPF_SIZE(code)) { in build_insn() 1837 switch (BPF_SIZE(code)) { in build_insn()
|
| /linux/arch/arm/net/ |
| H A D | bpf_jit_32.c | 1870 emit_ldsx_r(dst, rn, off, ctx, BPF_SIZE(code)); in build_insn() 1872 emit_ldx_r(dst, rn, off, ctx, BPF_SIZE(code)); in build_insn() 1882 switch (BPF_SIZE(code)) { in build_insn() 1893 emit_str_r(dst_lo, tmp2, off, ctx, BPF_SIZE(code)); in build_insn() 1905 emit_str_r(dst_lo, rs, off, ctx, BPF_SIZE(code)); in build_insn()
|
| /linux/arch/loongarch/net/ |
| H A D | bpf_jit.c | 340 const bool isdw = BPF_SIZE(insn->code) == BPF_DW; in emit_atomic() 1026 switch (BPF_SIZE(code)) { in build_insn() 1085 switch (BPF_SIZE(code)) { in build_insn() 1134 switch (BPF_SIZE(code)) { in build_insn()
|
| /linux/drivers/net/ethernet/netronome/nfp/bpf/ |
| H A D | jit.c | 834 else if (BPF_SIZE(meta->insn.code) != BPF_DW) in nfp_cpp_memcpy() 839 switch (BPF_SIZE(meta->insn.code)) { in nfp_cpp_memcpy() 861 if (BPF_SIZE(meta->insn.code) != BPF_DW) in nfp_cpp_memcpy() 3982 if (!exp_mask[BPF_SIZE(insn.code)]) in nfp_bpf_opt_ld_mask() 3984 if (exp_mask[BPF_SIZE(insn.code)] != next.imm) in nfp_bpf_opt_ld_mask() 4013 if (BPF_SIZE(insn.code) != BPF_W) in nfp_bpf_opt_ld_shift() 4065 if (BPF_SIZE(ld->code) != BPF_SIZE(st->code)) in curr_pair_is_memcpy()
|
| /linux/net/core/ |
| H A D | filter.c | 499 int size = bpf_size_to_bytes(BPF_SIZE(fp->code)); in convert_bpf_ld_abs() 500 bool endian = BPF_SIZE(fp->code) == BPF_H || in convert_bpf_ld_abs() 501 BPF_SIZE(fp->code) == BPF_W; in convert_bpf_ld_abs() 520 *insn++ = BPF_LDX_MEM(BPF_SIZE(fp->code), BPF_REG_A, in convert_bpf_ld_abs() 525 *insn++ = BPF_LDX_MEM(BPF_SIZE(fp->code), BPF_REG_A, in convert_bpf_ld_abs() 544 switch (BPF_SIZE(fp->code)) { in convert_bpf_ld_abs() 9121 switch (BPF_SIZE(orig->code)) { in bpf_gen_ld_abs() 9880 *insn++ = BPF_EMIT_STORE(BPF_SIZE(si->code), si, off); in bpf_convert_ctx_access() 9882 *insn++ = BPF_LDX_MEM(BPF_SIZE(si->code), si->dst_reg, in bpf_convert_ctx_access() 10191 BPF_SIZE(si->code), si->dst_reg, si->src_reg, in bpf_sock_convert_ctx_access() [all …]
|
| /linux/arch/sparc/net/ |
| H A D | bpf_jit_comp_64.c | 1263 switch (BPF_SIZE(code)) { in build_insn() 1308 switch (BPF_SIZE(code)) { in build_insn() 1346 switch (BPF_SIZE(code)) { in build_insn()
|
| /linux/arch/parisc/net/ |
| H A D | bpf_jit_comp64.c | 1034 switch (BPF_SIZE(code)) { in bpf_jit_emit_insn() 1082 emit_store(rd, rs, off, ctx, BPF_SIZE(code), BPF_MODE(code)); in bpf_jit_emit_insn()
|
| H A D | bpf_jit_comp32.c | 1133 BPF_CLASS(code), code, (code & BPF_ALU64) ? 1:0, BPF_SIZE(code), in bpf_jit_emit_insn() 1424 if (emit_load_r64(dst, src, off, ctx, BPF_SIZE(code))) in bpf_jit_emit_insn() 1447 if (emit_store_r64(dst, src, off, ctx, BPF_SIZE(code), in bpf_jit_emit_insn()
|