Home
last modified time | relevance | path

Searched refs:BPF_REG_0 (Results 1 – 25 of 37) sorted by relevance

12

/Linux-v4.19/tools/testing/selftests/bpf/
Dtest_verifier.c112 insn[i] = BPF_JMP_IMM(BPF_JNE, BPF_REG_0, 0x34, len - i - 2); in bpf_fill_ld_abs_vlan_push_pop()
119 insn[i] = BPF_JMP_IMM(BPF_JNE, BPF_REG_0, 0, len - i - 2); in bpf_fill_ld_abs_vlan_push_pop()
125 insn[i] = BPF_JMP_IMM(BPF_JNE, BPF_REG_0, 0x34, len - i - 2); in bpf_fill_ld_abs_vlan_push_pop()
130 insn[i] = BPF_JMP_IMM(BPF_JNE, BPF_REG_0, 0, len - i - 2); in bpf_fill_ld_abs_vlan_push_pop()
137 insn[i] = BPF_ALU32_IMM(BPF_MOV, BPF_REG_0, 0xbef); in bpf_fill_ld_abs_vlan_push_pop()
149 insn[i] = BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 10, len - i - 2); in bpf_fill_jump_around_ld_abs()
162 insn[i++] = BPF_MOV32_IMM(BPF_REG_0, 0); in bpf_fill_rand_ld_dw()
170 insn[i++] = BPF_ALU64_REG(BPF_XOR, BPF_REG_0, BPF_REG_1); in bpf_fill_rand_ld_dw()
172 insn[i++] = BPF_MOV64_REG(BPF_REG_1, BPF_REG_0); in bpf_fill_rand_ld_dw()
174 insn[i++] = BPF_ALU64_REG(BPF_XOR, BPF_REG_0, BPF_REG_1); in bpf_fill_rand_ld_dw()
[all …]
Dtest_verifier_log.c22 BPF_MOV64_IMM(BPF_REG_0, 0),
23 BPF_MOV64_IMM(BPF_REG_0, 0),
24 BPF_MOV64_IMM(BPF_REG_0, 0),
25 BPF_MOV64_IMM(BPF_REG_0, 0),
26 BPF_MOV64_IMM(BPF_REG_0, 0),
27 BPF_MOV64_IMM(BPF_REG_0, 0),
28 BPF_MOV64_IMM(BPF_REG_0, 0),
29 BPF_MOV64_IMM(BPF_REG_0, 0),
30 BPF_MOV64_IMM(BPF_REG_0, 0),
31 BPF_MOV64_IMM(BPF_REG_0, 0),
[all …]
Dtest_sock.c52 BPF_MOV64_IMM(BPF_REG_0, 1),
69 BPF_MOV64_IMM(BPF_REG_0, 1),
86 BPF_MOV64_IMM(BPF_REG_0, 1),
103 BPF_MOV64_IMM(BPF_REG_0, 1),
117 BPF_MOV64_IMM(BPF_REG_0, 1),
131 BPF_MOV64_IMM(BPF_REG_0, 1),
145 BPF_MOV64_IMM(BPF_REG_0, 1),
159 BPF_MOV64_IMM(BPF_REG_0, 1),
173 BPF_MOV64_IMM(BPF_REG_0, 1),
187 BPF_MOV64_IMM(BPF_REG_0, 1),
[all …]
Dtest_align.c56 BPF_MOV64_IMM(BPF_REG_0, 0),
84 BPF_MOV64_IMM(BPF_REG_0, 0),
113 BPF_MOV64_IMM(BPF_REG_0, 0),
135 BPF_MOV64_IMM(BPF_REG_0, 0),
158 BPF_MOV64_REG(BPF_REG_0, BPF_REG_2), \
159 BPF_ALU64_IMM(BPF_ADD, BPF_REG_0, 8), \
160 BPF_JMP_REG(BPF_JGE, BPF_REG_3, BPF_REG_0, 1), \
178 BPF_MOV64_IMM(BPF_REG_0, 0),
211 BPF_MOV64_IMM(BPF_REG_0, 0),
234 BPF_MOV64_IMM(BPF_REG_0, 0),
[all …]
Dtest_cgroup_storage.c23 BPF_STX_XADD(BPF_DW, BPF_REG_0, BPF_REG_1, 0), in main()
24 BPF_LDX_MEM(BPF_W, BPF_REG_1, BPF_REG_0, 0), in main()
26 BPF_MOV64_REG(BPF_REG_0, BPF_REG_1), in main()
Dtest_sock_addr.c614 BPF_MOV64_IMM(BPF_REG_0, 1), in bind4_prog_load()
680 BPF_MOV64_IMM(BPF_REG_0, 1), in bind6_prog_load()
721 BPF_MOV64_IMM(BPF_REG_0, 0), in sendmsg_deny_prog_load()
772 BPF_MOV64_IMM(BPF_REG_0, 1), in sendmsg4_rw_asm_prog_load()
830 BPF_MOV64_IMM(BPF_REG_0, 1), in sendmsg6_rw_dst_asm_prog_load()
/Linux-v4.19/samples/bpf/
Dtest_cgrp2_attach.c48 BPF_MOV64_IMM(BPF_REG_0, MAP_KEY_PACKETS), /* r0 = 0 */ in prog_load()
49 BPF_STX_MEM(BPF_W, BPF_REG_10, BPF_REG_0, -4), /* *(u32 *)(fp - 4) = r0 */ in prog_load()
54 BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 2), in prog_load()
56 BPF_RAW_INSN(BPF_STX | BPF_XADD | BPF_DW, BPF_REG_0, BPF_REG_1, 0, 0), /* xadd r0 += r1 */ in prog_load()
59 BPF_MOV64_IMM(BPF_REG_0, MAP_KEY_BYTES), /* r0 = 1 */ in prog_load()
60 BPF_STX_MEM(BPF_W, BPF_REG_10, BPF_REG_0, -4), /* *(u32 *)(fp - 4) = r0 */ in prog_load()
65 BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 2), in prog_load()
67 BPF_RAW_INSN(BPF_STX | BPF_XADD | BPF_DW, BPF_REG_0, BPF_REG_1, 0, 0), /* xadd r0 += r1 */ in prog_load()
69 BPF_MOV64_IMM(BPF_REG_0, verdict), /* r0 = verdict */ in prog_load()
Dsock_example.c50 BPF_STX_MEM(BPF_W, BPF_REG_10, BPF_REG_0, -4), /* *(u32 *)(fp - 4) = r0 */ in test_sock()
55 BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 2), in test_sock()
57 BPF_RAW_INSN(BPF_STX | BPF_XADD | BPF_DW, BPF_REG_0, BPF_REG_1, 0, 0), /* xadd r0 += r1 */ in test_sock()
58 BPF_MOV64_IMM(BPF_REG_0, 0), /* r0 = 0 */ in test_sock()
Dtest_cgrp2_attach2.c46 BPF_MOV64_IMM(BPF_REG_0, verdict), /* r0 = verdict */ in prog_load()
229 BPF_MOV32_IMM(BPF_REG_0, 0), in prog_load_cnt()
230 BPF_STX_MEM(BPF_W, BPF_REG_10, BPF_REG_0, -4), /* *(u32 *)(fp - 4) = r0 */ in prog_load_cnt()
235 BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 2), in prog_load_cnt()
237 BPF_RAW_INSN(BPF_STX | BPF_XADD | BPF_DW, BPF_REG_0, BPF_REG_1, 0, 0), /* xadd r0 += r1 */ in prog_load_cnt()
242 BPF_RAW_INSN(BPF_STX | BPF_XADD | BPF_W, BPF_REG_0, BPF_REG_1, 0, 0), in prog_load_cnt()
243 BPF_MOV64_IMM(BPF_REG_0, verdict), /* r0 = verdict */ in prog_load_cnt()
Dcookie_uid_helper_example.c93 BPF_STX_MEM(BPF_DW, BPF_REG_10, BPF_REG_0, -8), in prog_load()
109 BPF_JMP_IMM(BPF_JNE, BPF_REG_0, 0, 14), in prog_load()
118 BPF_STX_MEM(BPF_DW, BPF_REG_10, BPF_REG_0, in prog_load()
148 BPF_MOV64_REG(BPF_REG_9, BPF_REG_0), in prog_load()
156 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_6, in prog_load()
Dtest_cgrp2_sock.c37 BPF_MOV64_IMM(BPF_REG_0, 1), /* r0 = verdict */ in prog_load()
53 BPF_ALU64_IMM(BPF_AND, BPF_REG_0, 0xffffffff), in prog_load()
56 BPF_MOV64_REG(BPF_REG_3, BPF_REG_0), in prog_load()
57 BPF_JMP_IMM(BPF_JNE, BPF_REG_0, 0, 1), in prog_load()
Dfds_example.c56 BPF_MOV64_IMM(BPF_REG_0, 1), in bpf_prog_create()
/Linux-v4.19/arch/x86/net/
Dbpf_jit_comp.c115 [BPF_REG_0] = 0, /* RAX */
147 return reg == BPF_REG_0; in is_axreg()
560 EMIT_mov(BPF_REG_0, dst_reg); in do_jit()
596 if (dst_reg != BPF_REG_0) in do_jit()
605 emit_mov_reg(&prog, is64, BPF_REG_0, src_reg); in do_jit()
607 emit_mov_imm32(&prog, is64, BPF_REG_0, imm32); in do_jit()
618 if (dst_reg != BPF_REG_0) { in do_jit()
620 EMIT_mov(dst_reg, BPF_REG_0); in do_jit()
/Linux-v4.19/tools/perf/util/
Dbpf-prologue.c168 ins(BPF_JMP_IMM(BPF_JNE, BPF_REG_0, 0, JMP_TO_ERROR_CODE), in gen_read_mem()
311 ins(BPF_JMP_IMM(BPF_JA, BPF_REG_0, 0, JMP_TO_SUCCESS_CODE), pos); in gen_prologue_slowpath()
465 ins(BPF_JMP_IMM(BPF_JA, BPF_REG_0, 0, JMP_TO_USER_CODE), in bpf__gen_prologue()
/Linux-v4.19/arch/powerpc/net/
Dbpf_jit64.h48 [BPF_REG_0] = 8,
Dbpf_jit_comp64.c164 PPC_MR(3, b2p[BPF_REG_0]); in bpf_jit_build_epilogue()
732 PPC_MR(b2p[BPF_REG_0], 3); in bpf_jit_build_body()
/Linux-v4.19/kernel/bpf/
Dverifier.c546 BPF_REG_0, BPF_REG_1, BPF_REG_2, BPF_REG_3, BPF_REG_4, BPF_REG_5
900 regno == BPF_REG_0)) in skip_callee()
2401 r0 = &callee->regs[BPF_REG_0]; in prepare_func_exit()
2416 caller->regs[BPF_REG_0] = *r0; in prepare_func_exit()
2435 struct bpf_reg_state *ret_reg = &regs[BPF_REG_0]; in do_refine_retval_range()
2572 mark_reg_unknown(env, regs, BPF_REG_0); in check_helper_call()
2574 regs[BPF_REG_0].type = NOT_INIT; in check_helper_call()
2578 regs[BPF_REG_0].type = PTR_TO_MAP_VALUE; in check_helper_call()
2580 regs[BPF_REG_0].type = PTR_TO_MAP_VALUE_OR_NULL; in check_helper_call()
2582 mark_reg_known_zero(env, regs, BPF_REG_0); in check_helper_call()
[all …]
Darraymap.c169 const int ret = BPF_REG_0; in array_map_gen_lookup()
713 const int ret = BPF_REG_0; in array_of_map_gen_lookup()
Dhashtab.c509 const int ret = BPF_REG_0; in htab_map_gen_lookup()
537 const int ret = BPF_REG_0; in htab_lru_map_gen_lookup()
1408 const int ret = BPF_REG_0; in htab_of_map_gen_lookup()
/Linux-v4.19/arch/s390/net/
Dbpf_jit_comp.c72 #define REG_14 BPF_REG_0 /* Register 14 */
79 [BPF_REG_0] = 14,
451 EMIT4_IMM(0xa7090000, BPF_REG_0, 0); in bpf_jit_epilogue()
455 EMIT4(0xb9040000, REG_2, BPF_REG_0); in bpf_jit_epilogue()
998 EMIT4(0xb9040000, BPF_REG_0, REG_2); in bpf_jit_insn()
/Linux-v4.19/tools/include/linux/
Dfilter.h23 #define BPF_REG_A BPF_REG_0
/Linux-v4.19/tools/testing/selftests/net/
Dreuseport_bpf.c106 { BPF_ALU64 | BPF_MOD | BPF_K, BPF_REG_0, 0, 0, mod }, in attach_ebpf()
345 { BPF_ALU64 | BPF_MOV | BPF_K, BPF_REG_0, 0, 0, 10 }, in test_filter_no_reuseport()
/Linux-v4.19/tools/perf/tests/
Dbpf.c303 BPF_MOV64_IMM(BPF_REG_0, 1), in check_env()
/Linux-v4.19/arch/arm64/net/
Dbpf_jit_comp.c41 [BPF_REG_0] = A64_R(7),
322 const u8 r0 = bpf2a64[BPF_REG_0]; in build_epilogue()
627 const u8 r0 = bpf2a64[BPF_REG_0]; in build_insn()
/Linux-v4.19/arch/mips/net/
Debpf_jit.c198 case BPF_REG_0: in ebpf_to_mips_reg()
349 get_reg_val_type(ctx, prog->len, BPF_REG_0) == REG_32BIT_ZERO_EX) in build_int_epilogue()
1619 set_reg_val_type(&exit_rvt, BPF_REG_0, REG_64BIT); in reg_val_propagate_range()
1621 for (reg = BPF_REG_0; reg <= BPF_REG_5; reg++) in reg_val_propagate_range()

12