/linux/tools/testing/selftests/bpf/verifier/ |
H A D | ctx_sk_lookup.c | 5 BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_1, 7 BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_1, 9 BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_1, 11 BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_1, 14 BPF_LDX_MEM(BPF_H, BPF_REG_0, BPF_REG_1, 16 BPF_LDX_MEM(BPF_H, BPF_REG_0, BPF_REG_1, 19 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, 23 BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_1, 25 BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_1, 27 BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_1, [all …]
|
H A D | ctx_skb.c | 4 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, 7 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, 10 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, 13 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, 16 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, 19 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, 22 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, 25 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, 35 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, -4), 44 BPF_JMP_IMM(BPF_JGE, BPF_REG_1, 0, 9), [all …]
|
H A D | direct_value_access.c | 5 BPF_LD_MAP_VALUE(BPF_REG_1, 0, 0), 6 BPF_ST_MEM(BPF_DW, BPF_REG_1, 0, 4242), 17 BPF_LD_MAP_VALUE(BPF_REG_1, 0, 8), 18 BPF_ST_MEM(BPF_DW, BPF_REG_1, 0, 4242), 29 BPF_LD_MAP_VALUE(BPF_REG_1, 0, 8), 30 BPF_ST_MEM(BPF_DW, BPF_REG_1, 8, 4242), 41 BPF_LD_MAP_VALUE(BPF_REG_1, 0, 40), 42 BPF_ST_MEM(BPF_DW, BPF_REG_1, 0, 4242), 53 BPF_LD_MAP_VALUE(BPF_REG_1, 0, 32), 54 BPF_ST_MEM(BPF_DW, BPF_REG_1, 8, 4242), [all …]
|
H A D | jit.c | 5 BPF_MOV64_IMM(BPF_REG_1, 0xff), 6 BPF_ALU64_IMM(BPF_LSH, BPF_REG_1, 1), 7 BPF_ALU32_IMM(BPF_LSH, BPF_REG_1, 1), 8 BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 0x3fc, 1), 10 BPF_ALU64_IMM(BPF_RSH, BPF_REG_1, 1), 11 BPF_ALU32_IMM(BPF_RSH, BPF_REG_1, 1), 12 BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 0xff, 1), 14 BPF_ALU64_IMM(BPF_ARSH, BPF_REG_1, 1), 15 BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 0x7f, 1), 28 BPF_MOV64_IMM(BPF_REG_1, 0xff), [all …]
|
H A D | basic_instr.c | 4 BPF_MOV64_IMM(BPF_REG_1, 1), 5 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 2), 7 BPF_ALU64_REG(BPF_SUB, BPF_REG_1, BPF_REG_2), 8 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, -1), 9 BPF_ALU64_IMM(BPF_MUL, BPF_REG_1, 3), 10 BPF_MOV64_REG(BPF_REG_0, BPF_REG_1), 56 BPF_MOV64_IMM(BPF_REG_1, 5), 57 BPF_ALU32_REG(BPF_ARSH, BPF_REG_0, BPF_REG_1), 67 BPF_MOV64_IMM(BPF_REG_1, 15), 68 BPF_ALU32_REG(BPF_ARSH, BPF_REG_0, BPF_REG_1), [all …]
|
H A D | jump.c | 5 BPF_STX_MEM(BPF_DW, BPF_REG_2, BPF_REG_1, -8), 6 BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 0, 1), 8 BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 1, 1), 10 BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 2, 1), 12 BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 3, 1), 14 BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 4, 1), 16 BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 5, 1), 29 BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 0, 2), 32 BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 1, 2), 35 BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 2, 2), [all …]
|
H A D | calls.c | 27 BPF_MOV64_REG(BPF_REG_1, BPF_REG_10), 28 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, -8), 42 BPF_MOV64_REG(BPF_REG_1, BPF_REG_10), 43 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, -8), 57 BPF_MOV64_REG(BPF_REG_1, BPF_REG_10), 58 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, -8), 72 BPF_MOV64_REG(BPF_REG_1, BPF_REG_10), 73 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, -8), 87 BPF_MOV64_REG(BPF_REG_1, BPF_REG_10), 88 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, -8), [all …]
|
H A D | atomic_or.c | 7 BPF_MOV64_IMM(BPF_REG_1, 0x011), 8 BPF_ATOMIC_OP(BPF_DW, BPF_OR, BPF_REG_10, BPF_REG_1, -8), 16 BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 0x011, 1), 29 BPF_MOV64_IMM(BPF_REG_1, 0x011), 30 BPF_ATOMIC_OP(BPF_DW, BPF_OR | BPF_FETCH, BPF_REG_10, BPF_REG_1, -8), 32 BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 0x110, 2), 36 BPF_LDX_MEM(BPF_DW, BPF_REG_1, BPF_REG_10, -8), 37 BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 0x111, 2), 38 BPF_MOV64_IMM(BPF_REG_1, 2), 59 BPF_MOV32_IMM(BPF_REG_1, 0x011), [all …]
|
H A D | atomic_fetch.c | 4 BPF_LD_IMM64(BPF_REG_1, -1), 10 BPF_ATOMIC_OP(BPF_DW, BPF_AND | BPF_FETCH, BPF_REG_2, BPF_REG_1, 0), 13 BPF_MOV64_REG(BPF_REG_1, BPF_REG_8), 28 BPF_LD_IMM64(BPF_REG_1, -1), 34 BPF_ATOMIC_OP(BPF_DW, BPF_AND | BPF_FETCH, BPF_REG_2, BPF_REG_1, 0), 35 BPF_MOV64_REG(BPF_REG_9, BPF_REG_1), 37 BPF_MOV64_REG(BPF_REG_1, BPF_REG_8), 52 BPF_LD_IMM64(BPF_REG_1, -1), 58 BPF_ATOMIC_OP(BPF_W, BPF_AND | BPF_FETCH, BPF_REG_2, BPF_REG_1, 0), 61 BPF_MOV64_REG(BPF_REG_1, BPF_REG_8), [all …]
|
H A D | atomic_and.c | 7 BPF_MOV64_IMM(BPF_REG_1, 0x011), 8 BPF_ATOMIC_OP(BPF_DW, BPF_AND, BPF_REG_10, BPF_REG_1, -8), 16 BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 0x011, 1), 29 BPF_MOV64_IMM(BPF_REG_1, 0x011), 30 BPF_ATOMIC_OP(BPF_DW, BPF_AND | BPF_FETCH, BPF_REG_10, BPF_REG_1, -8), 32 BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 0x110, 2), 36 BPF_LDX_MEM(BPF_DW, BPF_REG_1, BPF_REG_10, -8), 37 BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 0x010, 2), 38 BPF_MOV64_IMM(BPF_REG_1, 2), 59 BPF_MOV32_IMM(BPF_REG_1, 0x011), [all …]
|
H A D | atomic_xor.c | 7 BPF_MOV64_IMM(BPF_REG_1, 0x011), 8 BPF_ATOMIC_OP(BPF_DW, BPF_XOR, BPF_REG_10, BPF_REG_1, -8), 16 BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 0x011, 1), 29 BPF_MOV64_IMM(BPF_REG_1, 0x011), 30 BPF_ATOMIC_OP(BPF_DW, BPF_XOR | BPF_FETCH, BPF_REG_10, BPF_REG_1, -8), 32 BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 0x110, 2), 36 BPF_LDX_MEM(BPF_DW, BPF_REG_1, BPF_REG_10, -8), 37 BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 0x101, 2), 38 BPF_MOV64_IMM(BPF_REG_1, 2), 59 BPF_MOV32_IMM(BPF_REG_1, 0x011), [all …]
|
H A D | atomic_cmpxchg.c | 7 BPF_MOV64_IMM(BPF_REG_1, 4), 9 BPF_ATOMIC_OP(BPF_DW, BPF_CMPXCHG, BPF_REG_10, BPF_REG_1, -8), 20 BPF_MOV64_IMM(BPF_REG_1, 4), 22 BPF_ATOMIC_OP(BPF_DW, BPF_CMPXCHG, BPF_REG_10, BPF_REG_1, -8), 44 BPF_MOV32_IMM(BPF_REG_1, 4), 46 BPF_ATOMIC_OP(BPF_W, BPF_CMPXCHG, BPF_REG_10, BPF_REG_1, -4), 57 BPF_MOV32_IMM(BPF_REG_1, 4), 59 BPF_ATOMIC_OP(BPF_W, BPF_CMPXCHG, BPF_REG_10, BPF_REG_1, -4), 95 BPF_MOV32_IMM(BPF_REG_1, 1), 96 BPF_ATOMIC_OP(BPF_W, BPF_CMPXCHG, BPF_REG_10, BPF_REG_1, -8), [all …]
|
H A D | map_kptr.c | 7 BPF_MOV64_REG(BPF_REG_1, BPF_REG_6), 27 BPF_MOV64_REG(BPF_REG_1, BPF_REG_6), 47 BPF_MOV64_REG(BPF_REG_1, BPF_REG_6), 78 BPF_MOV64_REG(BPF_REG_1, BPF_REG_6), 95 BPF_MOV64_REG(BPF_REG_1, BPF_REG_3), 110 BPF_MOV64_REG(BPF_REG_1, BPF_REG_6), 132 BPF_MOV64_REG(BPF_REG_1, BPF_REG_6), 139 BPF_LDX_MEM(BPF_DW, BPF_REG_1, BPF_REG_0, 0), 140 BPF_JMP_IMM(BPF_JNE, BPF_REG_1, 0, 1), 142 BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1, 0), [all …]
|
H A D | ld_abs.c | 4 BPF_MOV64_REG(BPF_REG_6, BPF_REG_1), 5 BPF_MOV64_IMM(BPF_REG_1, 0), 7 BPF_MOV64_REG(BPF_REG_0, BPF_REG_1), 16 BPF_MOV64_REG(BPF_REG_6, BPF_REG_1), 28 BPF_MOV64_REG(BPF_REG_6, BPF_REG_1), 40 BPF_MOV64_REG(BPF_REG_6, BPF_REG_1), 52 BPF_MOV64_REG(BPF_REG_6, BPF_REG_1), 64 BPF_MOV64_REG(BPF_REG_6, BPF_REG_1), 75 BPF_MOV64_REG(BPF_REG_6, BPF_REG_1), 81 BPF_MOV64_REG(BPF_REG_1, BPF_REG_7), [all …]
|
H A D | atomic_fetch_add.c | 8 BPF_MOV64_IMM(BPF_REG_1, 1), 9 BPF_ATOMIC_OP(BPF_DW, BPF_ADD | BPF_FETCH, BPF_REG_10, BPF_REG_1, -8), 11 BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 3, 2), 15 BPF_LDX_MEM(BPF_DW, BPF_REG_1, BPF_REG_10, -8), 17 BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 4, 1), 30 BPF_MOV32_IMM(BPF_REG_1, 1), 31 BPF_ATOMIC_OP(BPF_W, BPF_ADD | BPF_FETCH, BPF_REG_10, BPF_REG_1, -4), 33 BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 3, 2), 37 BPF_LDX_MEM(BPF_W, BPF_REG_1, BPF_REG_10, -4), 39 BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 4, 1), [all …]
|
H A D | ld_imm64.c | 4 BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 0, 1), 19 BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 0, 1), 33 BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 0, 1), 96 BPF_RAW_INSN(0, BPF_REG_1, 0, 0, 1), 106 BPF_RAW_INSN(0, 0, BPF_REG_1, 0, 1), 115 BPF_MOV64_IMM(BPF_REG_1, 0), 116 BPF_RAW_INSN(BPF_LD | BPF_IMM | BPF_DW, 0, BPF_REG_1, 0, 1), 126 BPF_MOV64_IMM(BPF_REG_1, 0), 127 BPF_RAW_INSN(BPF_LD | BPF_IMM | BPF_DW, 0, BPF_REG_1, 0, 1), 128 BPF_RAW_INSN(0, 0, BPF_REG_1, 0, 1), [all …]
|
H A D | precise.c | 6 BPF_MOV64_REG(BPF_REG_1, BPF_REG_6), 16 BPF_MOV64_REG(BPF_REG_1, BPF_REG_6), 31 BPF_MOV64_REG(BPF_REG_1, BPF_REG_FP), 32 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, -8), 65 BPF_MOV64_REG(BPF_REG_1, BPF_REG_6), 75 BPF_MOV64_REG(BPF_REG_1, BPF_REG_6), 90 BPF_MOV64_REG(BPF_REG_1, BPF_REG_FP), 91 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, -8), 128 BPF_MOV64_REG(BPF_REG_1, BPF_REG_0), 131 BPF_LDX_MEM(BPF_B, BPF_REG_1, BPF_REG_2, 0), [all …]
|
H A D | perf_event_sample_period.c | 6 BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_1, 9 BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_1, 22 BPF_LDX_MEM(BPF_H, BPF_REG_0, BPF_REG_1, 25 BPF_LDX_MEM(BPF_H, BPF_REG_0, BPF_REG_1, 38 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, 41 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, 53 BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1,
|
H A D | atomic_xchg.c | 7 BPF_MOV64_IMM(BPF_REG_1, 4), 8 BPF_ATOMIC_OP(BPF_DW, BPF_XCHG, BPF_REG_10, BPF_REG_1, -8), 10 BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 3, 2), 30 BPF_MOV32_IMM(BPF_REG_1, 4), 31 BPF_ATOMIC_OP(BPF_W, BPF_XCHG, BPF_REG_10, BPF_REG_1, -4), 33 BPF_JMP32_IMM(BPF_JEQ, BPF_REG_1, 3, 2),
|
H A D | dead_code.c | 116 BPF_MOV64_IMM(BPF_REG_1, 7), 122 BPF_JMP_IMM(BPF_JGE, BPF_REG_1, 7, 1), 134 BPF_MOV64_IMM(BPF_REG_1, 2), 135 BPF_JMP_IMM(BPF_JGE, BPF_REG_1, 2, 1), 136 BPF_MOV64_IMM(BPF_REG_1, 5), 139 BPF_MOV64_REG(BPF_REG_0, BPF_REG_1), 150 BPF_MOV64_IMM(BPF_REG_1, 2), 154 BPF_MOV64_REG(BPF_REG_0, BPF_REG_1),
|
H A D | bpf_st_mem.c | 23 BPF_LDX_MEM(BPF_B, BPF_REG_1, BPF_REG_10, -8), 24 BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_1), 25 BPF_LDX_MEM(BPF_B, BPF_REG_1, BPF_REG_10, -4), 26 BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_1), 27 BPF_LDX_MEM(BPF_B, BPF_REG_1, BPF_REG_10, -1), 28 BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_1),
|
H A D | bpf_loop_inline.c | 42 BPF_ALU64_IMM(BPF_MOV, BPF_REG_1, 1), 44 BPF_ALU64_IMM(BPF_MOV, BPF_REG_1, 2), 78 BPF_ALU64_IMM(BPF_MOV, BPF_REG_1, 1), 108 BPF_ALU64_IMM(BPF_MOV, BPF_REG_1, 1), 113 BPF_ALU64_IMM(BPF_MOV, BPF_REG_1, 1), 153 BPF_ALU64_IMM(BPF_MOV, BPF_REG_1, 1), 188 BPF_ALU64_IMM(BPF_MOV, BPF_REG_1, 1), 195 BPF_ALU64_IMM(BPF_MOV, BPF_REG_1, 2), 207 BPF_ALU64_IMM(BPF_MOV, BPF_REG_1, 2),
|
H A D | jset.c | 152 BPF_MOV64_REG(BPF_REG_1, BPF_REG_0), 154 BPF_ALU64_IMM(BPF_AND, BPF_REG_1, 0xff), 155 BPF_JMP_IMM(BPF_JSET, BPF_REG_1, 0xf0, 3), 156 BPF_JMP_IMM(BPF_JLT, BPF_REG_1, 0x10, 1), 159 BPF_JMP_IMM(BPF_JSET, BPF_REG_1, 0x10, 1), 161 BPF_JMP_IMM(BPF_JGE, BPF_REG_1, 0x10, 1),
|
/linux/tools/testing/selftests/bpf/prog_tests/ |
H A D | sockopt.c | 113 BPF_LDX_MEM(BPF_DW, BPF_REG_6, BPF_REG_1, 132 BPF_LDX_MEM(BPF_W, BPF_REG_6, BPF_REG_1, 139 BPF_STX_MEM(BPF_W, BPF_REG_1, BPF_REG_0, 162 BPF_STX_MEM(BPF_W, BPF_REG_1, BPF_REG_0, 175 BPF_LDX_MEM(BPF_W, BPF_REG_6, BPF_REG_1, 182 BPF_STX_MEM(BPF_W, BPF_REG_1, BPF_REG_0, 204 BPF_LDX_MEM(BPF_W, BPF_REG_6, BPF_REG_1, 223 BPF_STX_MEM(BPF_W, BPF_REG_1, BPF_REG_0, 236 BPF_LDX_MEM(BPF_W, BPF_REG_6, BPF_REG_1, 243 BPF_STX_MEM(BPF_W, BPF_REG_1, BPF_REG_0, [all …]
|
/linux/samples/bpf/ |
H A D | cookie_uid_helper_example.c | 85 BPF_MOV64_REG(BPF_REG_6, BPF_REG_1), in prog_load() 100 BPF_LD_MAP_FD(BPF_REG_1, map_fd), in prog_load() 110 BPF_MOV64_REG(BPF_REG_1, BPF_REG_6), in prog_load() 126 BPF_LDX_MEM(BPF_W, BPF_REG_1, BPF_REG_6, in prog_load() 128 BPF_STX_MEM(BPF_DW, BPF_REG_10, BPF_REG_1, in prog_load() 135 BPF_LD_MAP_FD(BPF_REG_1, map_fd), in prog_load() 149 BPF_MOV64_IMM(BPF_REG_1, 1), in prog_load() 150 BPF_ATOMIC_OP(BPF_DW, BPF_ADD, BPF_REG_9, BPF_REG_1, in prog_load() 152 BPF_LDX_MEM(BPF_W, BPF_REG_1, BPF_REG_6, in prog_load() 154 BPF_ATOMIC_OP(BPF_DW, BPF_ADD, BPF_REG_9, BPF_REG_1, in prog_load()
|