| /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/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 | 2252 EMIT(imm32, bpf_size_to_x86_bytes(BPF_SIZE(insn->code))); in do_jit() 2270 emit_stx(&prog, BPF_SIZE(insn->code), dst_reg, src_reg, insn_off); in do_jit() 2278 emit_st_r12(&prog, BPF_SIZE(insn->code), dst_reg, insn->off, insn->imm); in do_jit() 2296 emit_ldsx_r12(&prog, BPF_SIZE(insn->code), dst_reg, src_reg, insn->off); in do_jit() 2298 emit_ldx_r12(&prog, BPF_SIZE(insn->code), dst_reg, src_reg, insn->off); in do_jit() 2300 emit_stx_r12(&prog, BPF_SIZE(insn->code), dst_reg, src_reg, insn->off); in do_jit() 2434 emit_ldsx(&prog, BPF_SIZE(insn->code), dst_reg, src_reg, insn_off); in do_jit() 2436 emit_ldx(&prog, BPF_SIZE(insn->code), dst_reg, src_reg, insn_off); in do_jit() 2496 bool is64 = BPF_SIZE(insn->code) == BPF_DW; in do_jit() 2515 emit_ldx(&prog, BPF_SIZE(ins in do_jit() [all...] |
| /linux/arch/powerpc/net/ |
| H A D | bpf_jit_comp64.c | 772 u32 size = BPF_SIZE(insn->code); in bpf_jit_emit_atomic_ops() 877 switch (BPF_SIZE(code)) { in bpf_jit_emit_probe_mem_store() 906 u32 size = BPF_SIZE(code); in emit_atomic_ld_st() 983 u32 size = BPF_SIZE(code); in bpf_jit_build_body() 1499 if (BPF_SIZE(code) == BPF_W || BPF_SIZE(code) == BPF_DW) { in bpf_jit_build_body() 1618 if ((BPF_SIZE(code) == BPF_DW && (off & 3)) || in bpf_jit_build_body() 1619 (BPF_SIZE(code) == BPF_B && in bpf_jit_build_body() 1621 (BPF_SIZE(code) == BPF_B && BPF_MODE(code) == BPF_MEMSX)) in bpf_jit_build_body()
|
| /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() 1916 emit_ldx(rd, off, rs, BPF_SIZE(code), sign_ext, ctx); in bpf_jit_emit_insn() 1922 if (BPF_SIZE(code) != BPF_DW && insn_is_zext(&insn[1])) in bpf_jit_emit_insn() 1946 emit_st(rd, off, imm, BPF_SIZE(code), ctx); in bpf_jit_emit_insn() 1968 emit_stx(rd, off, rs, BPF_SIZE(cod in bpf_jit_emit_insn() [all...] |
| 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/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/loongarch/net/ |
| H A D | bpf_jit.c | 363 const bool isdw = BPF_SIZE(insn->code) == BPF_DW; in emit_atomic_rmw() 372 switch (BPF_SIZE(insn->code)) { in emit_atomic_rmw() 415 switch (BPF_SIZE(insn->code)) { in emit_atomic_rmw() 467 switch (BPF_SIZE(insn->code)) { in emit_atomic_rmw() 532 switch (BPF_SIZE(insn->code)) { in emit_atomic_ld_st() 571 switch (BPF_SIZE(insn->code)) { in emit_atomic_ld_st() 1241 switch (BPF_SIZE(code)) { in build_insn() 1310 switch (BPF_SIZE(code)) { in build_insn() 1373 switch (BPF_SIZE(code)) { in build_insn()
|
| /linux/kernel/bpf/ |
| H A D | core.c | 1439 BPF_SIZE(from->code), in bpf_jit_blind_insn() 2225 if (BPF_SIZE(insn->code) == BPF_W) \ in ___bpf_prog_run() 2228 else if (BPF_SIZE(insn->code) == BPF_DW) \ in ___bpf_prog_run() 2235 if (BPF_SIZE(insn->code) == BPF_W) \ in ___bpf_prog_run() 2239 else if (BPF_SIZE(insn->code) == BPF_DW) \ in ___bpf_prog_run() 2262 if (BPF_SIZE(insn->code) == BPF_W) in ___bpf_prog_run() 2266 else if (BPF_SIZE(insn->code) == BPF_DW) in ___bpf_prog_run() 2274 if (BPF_SIZE(insn->code) == BPF_W) in ___bpf_prog_run() 2278 else if (BPF_SIZE(insn->code) == BPF_DW) in ___bpf_prog_run() 2289 switch (BPF_SIZE(ins in ___bpf_prog_run() [all...] |
| H A D | liveness.c | 1170 u32 sz = bpf_size_to_bytes(BPF_SIZE(insn->code)); in arg_track_xfer() 1202 u32 sz = bpf_size_to_bytes(BPF_SIZE(insn->code)); in record_stack_access_off() 1224 u32 sz = bpf_size_to_bytes(BPF_SIZE(insn->code)); in record_stack_access_off() 1340 s32 sz = bpf_size_to_bytes(BPF_SIZE(insn->code)); in record_load_store_access() 2081 if (BPF_SIZE(insn->code) == BPF_DW) { in compute_insn_live_regs()
|
| H A D | fixups.c | 808 insn->code = BPF_STX | BPF_PROBE_ATOMIC | BPF_SIZE(insn->code); in bpf_convert_ctx_accesses() 883 BPF_SIZE((insn)->code); in bpf_convert_ctx_accesses() 886 BPF_SIZE((insn)->code); in bpf_convert_ctx_accesses() 896 insn->code = BPF_CLASS(insn->code) | BPF_PROBE_MEM32SX | BPF_SIZE(insn->code); in bpf_convert_ctx_accesses() 898 insn->code = BPF_CLASS(insn->code) | BPF_PROBE_MEM32 | BPF_SIZE(insn->code); in bpf_convert_ctx_accesses()
|
| H A D | cgroup.c | 2464 BPF_SIZE(si->code), si->dst_reg, si->src_reg, in sysctl_convert_ctx_access() 2504 read_size = bpf_size_to_bytes(BPF_SIZE(si->code)); in cg_sockopt_func_proto() 2506 BPF_SIZE(si->code), si->dst_reg, si->dst_reg, in cg_sockopt_func_proto()
|
| H A D | verifier.c | 3040 return BPF_SIZE(code) == BPF_DW || BPF_MODE(code) == BPF_MEMSX; in bpf_add_kfunc_call() 3052 return BPF_SIZE(code) == BPF_DW; in bpf_add_kfunc_call() 6367 BPF_SIZE(insn->code), BPF_READ, insn->dst_reg, in check_mem_access() 6407 BPF_SIZE(insn->code), BPF_WRITE, insn->src_reg, in check_mem_access() 6421 if (BPF_SIZE(insn->code) != BPF_W && BPF_SIZE(insn->code) != BPF_DW) { in check_mem_access() 6485 BPF_SIZE(insn->code), BPF_READ, -1, true, false); in check_mem_access() 6488 insn->off, BPF_SIZE(insn->code), in check_mem_access() 6500 BPF_SIZE(insn->code), BPF_WRITE, -1, true, false); in check_mem_access() 6559 if (BPF_SIZE(ins in check_mem_access() [all...] |
| H A D | syscall.c | 5097 insns[i].code = BPF_LDX | BPF_SIZE(code) | BPF_MEM; in bpf_prog_get_info_by_fd() 5103 insns[i].code = BPF_CLASS(code) | BPF_SIZE(code) | BPF_MEM; in bpf_prog_get_info_by_fd()
|
| /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() 1742 switch (BPF_SIZE(code)) { in build_insn() 1839 switch (BPF_SIZE(code)) { in build_insn() 1906 switch (BPF_SIZE(code)) { in build_body()
|
| /linux/net/core/ |
| H A D | filter.c | 494 int size = bpf_size_to_bytes(BPF_SIZE(fp->code)); in convert_bpf_ld_abs() 495 bool endian = BPF_SIZE(fp->code) == BPF_H || in convert_bpf_ld_abs() 496 BPF_SIZE(fp->code) == BPF_W; in convert_bpf_ld_abs() 515 *insn++ = BPF_LDX_MEM(BPF_SIZE(fp->code), BPF_REG_A, in convert_bpf_ld_abs() 520 *insn++ = BPF_LDX_MEM(BPF_SIZE(fp->code), BPF_REG_A, in convert_bpf_ld_abs() 539 switch (BPF_SIZE(fp->code)) { in convert_bpf_ld_abs() 9243 switch (BPF_SIZE(orig->code)) { in tc_cls_act_btf_struct_access() 10002 *insn++ = BPF_EMIT_STORE(BPF_SIZE(si->code), si, off); in bpf_convert_ctx_access() 10004 *insn++ = BPF_LDX_MEM(BPF_SIZE(si->code), si->dst_reg, in bpf_convert_ctx_access() 10313 BPF_SIZE(s in bpf_sock_convert_ctx_access() [all...] |
| /linux/arch/parisc/net/ |
| 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()
|
| 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()
|