| /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(insn->code) >> 3], in print_bpf_insn() [all …]
|
| H A D | const_fold.c | 146 if (mode != BPF_IMM || BPF_SIZE(insn->code) != BPF_DW) in const_reg_xfer() 179 int size = bpf_size_to_bytes(BPF_SIZE(insn->code)); in const_reg_xfer()
|
| H A D | core.c | 1508 BPF_SIZE(from->code), in bpf_jit_blind_insn() 2294 if (BPF_SIZE(insn->code) == BPF_W) \ in ___bpf_prog_run() 2297 else if (BPF_SIZE(insn->code) == BPF_DW) \ in ___bpf_prog_run() 2304 if (BPF_SIZE(insn->code) == BPF_W) \ in ___bpf_prog_run() 2308 else if (BPF_SIZE(insn->code) == BPF_DW) \ in ___bpf_prog_run() 2331 if (BPF_SIZE(insn->code) == BPF_W) in ___bpf_prog_run() 2335 else if (BPF_SIZE(insn->code) == BPF_DW) in ___bpf_prog_run() 2343 if (BPF_SIZE(insn->code) == BPF_W) in ___bpf_prog_run() 2347 else if (BPF_SIZE(insn->code) == BPF_DW) in ___bpf_prog_run() 2358 switch (BPF_SIZE(insn->code)) { in ___bpf_prog_run() [all …]
|
| H A D | liveness.c | 1165 u32 sz = bpf_size_to_bytes(BPF_SIZE(insn->code)); in arg_track_xfer() 1197 u32 sz = bpf_size_to_bytes(BPF_SIZE(insn->code)); in arg_track_xfer() 1216 u32 sz = bpf_size_to_bytes(BPF_SIZE(insn->code)); in arg_track_xfer() 1332 s32 sz = bpf_size_to_bytes(BPF_SIZE(insn->code)); in record_load_store_access() 2069 const u8 size = BPF_SIZE(insn->code); in compute_insn_live_regs() 2082 if (BPF_SIZE(insn->code) == BPF_DW) { in compute_insn_live_regs()
|
| H A D | fixups.c | 67 u8 size = BPF_SIZE(insn->code); in bpf_is_reg64() 862 insn->code = BPF_STX | BPF_PROBE_ATOMIC | BPF_SIZE(insn->code); in bpf_convert_ctx_accesses() 931 insn->code = BPF_CLASS(insn->code) | BPF_PROBE_MEM32SX | BPF_SIZE(insn->code); in bpf_convert_ctx_accesses() 933 insn->code = BPF_CLASS(insn->code) | BPF_PROBE_MEM32 | BPF_SIZE(insn->code); in bpf_convert_ctx_accesses() 951 BPF_SIZE(insn->code); in bpf_convert_ctx_accesses() 954 BPF_SIZE(insn->code); in bpf_convert_ctx_accesses()
|
| H A D | cgroup.c | 2489 BPF_SIZE(si->code), si->dst_reg, si->src_reg, in sysctl_convert_ctx_access() 2529 read_size = bpf_size_to_bytes(BPF_SIZE(si->code)); in sysctl_convert_ctx_access() 2531 BPF_SIZE(si->code), si->dst_reg, si->dst_reg, in sysctl_convert_ctx_access()
|
| H A D | verifier.c | 6619 BPF_SIZE(insn->code), BPF_READ, insn->dst_reg, in check_load_mem() 6661 BPF_SIZE(insn->code), BPF_WRITE, insn->src_reg, in check_store_reg() 6675 if (BPF_SIZE(insn->code) != BPF_W && BPF_SIZE(insn->code) != BPF_DW) { in check_atomic_rmw() 6730 BPF_SIZE(insn->code), BPF_READ, -1, true, false); in check_atomic_rmw() 6734 insn->off, BPF_SIZE(insn->code), in check_atomic_rmw() 6747 BPF_SIZE(insn->code), BPF_WRITE, -1, true, false); in check_atomic_rmw() 6806 if (BPF_SIZE(insn->code) == BPF_DW && BITS_PER_LONG != 64) { in check_atomic() 6813 if (BPF_SIZE(insn->code) == BPF_DW && BITS_PER_LONG != 64) { in check_atomic() 17027 if (BPF_SIZE(insn->code) != BPF_DW) { in check_ld_imm() 18109 insn->off, BPF_SIZE(insn->code), in do_check_insn() [all …]
|
| H A D | syscall.c | 5042 insns[i].code = BPF_LDX | BPF_SIZE(code) | BPF_MEM; in bpf_insn_prepare_dump() 5048 insns[i].code = BPF_CLASS(code) | BPF_SIZE(code) | BPF_MEM; in bpf_insn_prepare_dump()
|
| /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 | 155 .code = BPF_LD | BPF_SIZE(SIZE) | BPF_ABS, \ 165 .code = BPF_LD | BPF_SIZE(SIZE) | BPF_IND, \ 175 .code = BPF_LDX | BPF_SIZE(SIZE) | BPF_MEM, \ 185 .code = BPF_STX | BPF_SIZE(SIZE) | BPF_MEM, \ 208 .code = BPF_STX | BPF_SIZE(SIZE) | BPF_ATOMIC, \ 221 .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/include/linux/ |
| H A D | filter.h | 311 .code = BPF_LD | BPF_SIZE(SIZE) | BPF_ABS, \ 321 .code = BPF_LD | BPF_SIZE(SIZE) | BPF_IND, \ 331 .code = BPF_LDX | BPF_SIZE(SIZE) | BPF_MEM, \ 341 .code = BPF_LDX | BPF_SIZE(SIZE) | BPF_MEMSX, \ 351 .code = BPF_STX | BPF_SIZE(SIZE) | BPF_MEM, \ 377 .code = BPF_STX | BPF_SIZE(SIZE) | BPF_ATOMIC, \ 445 .code = BPF_ST | BPF_SIZE(SIZE) | BPF_MEM, \ 629 const int __size = bpf_size_to_bytes(BPF_SIZE((insn)->code)); \
|
| /linux/arch/x86/net/ |
| H A D | bpf_jit_comp.c | 2300 EMIT(imm32, bpf_size_to_x86_bytes(BPF_SIZE(insn->code))); in do_jit() 2318 emit_stx(&prog, BPF_SIZE(insn->code), dst_reg, src_reg, insn_off); in do_jit() 2326 emit_st_r12(&prog, BPF_SIZE(insn->code), dst_reg, insn->off, insn->imm); in do_jit() 2344 emit_ldsx_r12(&prog, BPF_SIZE(insn->code), dst_reg, src_reg, insn->off); in do_jit() 2346 emit_ldx_r12(&prog, BPF_SIZE(insn->code), dst_reg, src_reg, insn->off); in do_jit() 2348 emit_stx_r12(&prog, BPF_SIZE(insn->code), dst_reg, src_reg, insn->off); in do_jit() 2502 emit_ldsx(&prog, BPF_SIZE(insn->code), dst_reg, src_reg, insn_off); in do_jit() 2504 emit_ldx(&prog, BPF_SIZE(insn->code), dst_reg, src_reg, insn_off); in do_jit() 2564 bool is64 = BPF_SIZE(insn->code) == BPF_DW; in do_jit() 2583 emit_ldx(&prog, BPF_SIZE(insn->code), in do_jit() [all …]
|
| /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 | 549 emit_ldx(rd, off, rs, BPF_SIZE(code), false, ctx); in emit_atomic_ld_st() 555 if (BPF_SIZE(code) != BPF_DW && insn_is_zext(&insn[1])) in emit_atomic_ld_st() 566 emit_stx(rd, off, rs, BPF_SIZE(code), ctx); in emit_atomic_ld_st() 582 bool is64 = BPF_SIZE(code) == BPF_DW; in emit_atomic_rmw() 584 if (BPF_SIZE(code) != BPF_W && BPF_SIZE(code) != BPF_DW) { in emit_atomic_rmw() 1922 emit_ldx(rd, off, rs, BPF_SIZE(code), sign_ext, ctx); in bpf_jit_emit_insn() 1928 if (BPF_SIZE(code) != BPF_DW && insn_is_zext(&insn[1])) in bpf_jit_emit_insn() 1952 emit_st(rd, off, imm, BPF_SIZE(code), ctx); in bpf_jit_emit_insn() 1974 emit_stx(rd, off, rs, BPF_SIZE(code), ctx); in bpf_jit_emit_insn()
|
| H A D | bpf_jit_comp32.c | 926 u8 size = BPF_SIZE(insn->code); in emit_store_r64() 1328 if (emit_load_r64(dst, src, off, ctx, BPF_SIZE(code))) in bpf_jit_emit_insn()
|
| /linux/arch/loongarch/net/ |
| H A D | bpf_jit.c | 356 const bool isdw = BPF_SIZE(insn->code) == BPF_DW; in emit_atomic_rmw() 365 switch (BPF_SIZE(insn->code)) { in emit_atomic_rmw() 408 switch (BPF_SIZE(insn->code)) { in emit_atomic_rmw() 460 switch (BPF_SIZE(insn->code)) { in emit_atomic_rmw() 526 switch (BPF_SIZE(insn->code)) { in emit_atomic_ld_st() 565 switch (BPF_SIZE(insn->code)) { in emit_atomic_ld_st() 1263 switch (BPF_SIZE(code)) { in build_insn() 1332 switch (BPF_SIZE(code)) { in build_insn() 1395 switch (BPF_SIZE(code)) { in build_insn()
|
| /linux/arch/arm64/net/ |
| H A D | bpf_jit_comp.c | 752 switch (BPF_SIZE(code)) { in emit_atomic_ld_st() 768 switch (BPF_SIZE(code)) { in emit_atomic_ld_st() 800 const bool isdw = BPF_SIZE(code) == BPF_DW; in emit_lse_atomic() 870 const bool isdw = BPF_SIZE(code) == BPF_DW; in emit_ll_sc_atomic() 1809 switch (BPF_SIZE(code)) { in build_insn() 1906 switch (BPF_SIZE(code)) { in build_insn() 1973 switch (BPF_SIZE(code)) { in build_insn()
|
| /linux/net/core/ |
| H A D | filter.c | 498 int size = bpf_size_to_bytes(BPF_SIZE(fp->code)); in convert_bpf_ld_abs() 499 bool endian = BPF_SIZE(fp->code) == BPF_H || in convert_bpf_ld_abs() 500 BPF_SIZE(fp->code) == BPF_W; in convert_bpf_ld_abs() 519 *insn++ = BPF_LDX_MEM(BPF_SIZE(fp->code), BPF_REG_A, in convert_bpf_ld_abs() 524 *insn++ = BPF_LDX_MEM(BPF_SIZE(fp->code), BPF_REG_A, in convert_bpf_ld_abs() 543 switch (BPF_SIZE(fp->code)) { in convert_bpf_ld_abs() 9407 switch (BPF_SIZE(orig->code)) { in bpf_gen_ld_abs() 10166 *insn++ = BPF_EMIT_STORE(BPF_SIZE(si->code), si, off); in bpf_convert_ctx_access() 10168 *insn++ = BPF_LDX_MEM(BPF_SIZE(si->code), si->dst_reg, in bpf_convert_ctx_access() 10477 BPF_SIZE(si->code), si->dst_reg, si->src_reg, in bpf_sock_convert_ctx_access() [all …]
|
| /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()
|
| /linux/tools/lib/bpf/ |
| H A D | relo_core.c | 1004 switch (BPF_SIZE(insn->code)) { in insn_bpf_size_to_bytes()
|