1e8c13c4dSAlexei Starovoitov { 2e8c13c4dSAlexei Starovoitov "precise: test 1", 3e8c13c4dSAlexei Starovoitov .insns = { 4e8c13c4dSAlexei Starovoitov BPF_MOV64_IMM(BPF_REG_0, 1), 5e8c13c4dSAlexei Starovoitov BPF_LD_MAP_FD(BPF_REG_6, 0), 6e8c13c4dSAlexei Starovoitov BPF_MOV64_REG(BPF_REG_1, BPF_REG_6), 7e8c13c4dSAlexei Starovoitov BPF_MOV64_REG(BPF_REG_2, BPF_REG_FP), 8e8c13c4dSAlexei Starovoitov BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8), 9e8c13c4dSAlexei Starovoitov BPF_ST_MEM(BPF_DW, BPF_REG_FP, -8, 0), 10e8c13c4dSAlexei Starovoitov BPF_EMIT_CALL(BPF_FUNC_map_lookup_elem), 11e8c13c4dSAlexei Starovoitov BPF_JMP_IMM(BPF_JNE, BPF_REG_0, 0, 1), 12e8c13c4dSAlexei Starovoitov BPF_EXIT_INSN(), 13e8c13c4dSAlexei Starovoitov 14e8c13c4dSAlexei Starovoitov BPF_MOV64_REG(BPF_REG_9, BPF_REG_0), 15e8c13c4dSAlexei Starovoitov 16e8c13c4dSAlexei Starovoitov BPF_MOV64_REG(BPF_REG_1, BPF_REG_6), 17e8c13c4dSAlexei Starovoitov BPF_MOV64_REG(BPF_REG_2, BPF_REG_FP), 18e8c13c4dSAlexei Starovoitov BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8), 19e8c13c4dSAlexei Starovoitov BPF_EMIT_CALL(BPF_FUNC_map_lookup_elem), 20e8c13c4dSAlexei Starovoitov BPF_JMP_IMM(BPF_JNE, BPF_REG_0, 0, 1), 21e8c13c4dSAlexei Starovoitov BPF_EXIT_INSN(), 22e8c13c4dSAlexei Starovoitov 23e8c13c4dSAlexei Starovoitov BPF_MOV64_REG(BPF_REG_8, BPF_REG_0), 24e8c13c4dSAlexei Starovoitov 25e8c13c4dSAlexei Starovoitov BPF_ALU64_REG(BPF_SUB, BPF_REG_9, BPF_REG_8), /* map_value_ptr -= map_value_ptr */ 26e8c13c4dSAlexei Starovoitov BPF_MOV64_REG(BPF_REG_2, BPF_REG_9), 27e8c13c4dSAlexei Starovoitov BPF_JMP_IMM(BPF_JLT, BPF_REG_2, 8, 1), 28e8c13c4dSAlexei Starovoitov BPF_EXIT_INSN(), 29e8c13c4dSAlexei Starovoitov 307df5072cSMykola Lysenko BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, 1), /* R2=scalar(umin=1, umax=8) */ 31e8c13c4dSAlexei Starovoitov BPF_MOV64_REG(BPF_REG_1, BPF_REG_FP), 32e8c13c4dSAlexei Starovoitov BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, -8), 33e8c13c4dSAlexei Starovoitov BPF_MOV64_IMM(BPF_REG_3, 0), 349bc499beSIlya Leoshkevich BPF_EMIT_CALL(BPF_FUNC_probe_read_kernel), 35e8c13c4dSAlexei Starovoitov BPF_EXIT_INSN(), 36e8c13c4dSAlexei Starovoitov }, 37e8c13c4dSAlexei Starovoitov .prog_type = BPF_PROG_TYPE_TRACEPOINT, 38e8c13c4dSAlexei Starovoitov .fixup_map_array_48b = { 1 }, 39e8c13c4dSAlexei Starovoitov .result = VERBOSE_ACCEPT, 40e8c13c4dSAlexei Starovoitov .errstr = 41d9439c21SAndrii Nakryiko "mark_precise: frame0: last_idx 26 first_idx 20\ 42d9439c21SAndrii Nakryiko mark_precise: frame0: regs=r2 stack= before 25\ 43d9439c21SAndrii Nakryiko mark_precise: frame0: regs=r2 stack= before 24\ 44d9439c21SAndrii Nakryiko mark_precise: frame0: regs=r2 stack= before 23\ 45d9439c21SAndrii Nakryiko mark_precise: frame0: regs=r2 stack= before 22\ 46d9439c21SAndrii Nakryiko mark_precise: frame0: regs=r2 stack= before 20\ 471ef22b68SAndrii Nakryiko mark_precise: frame0: parent state regs=r2 stack=:\ 48d9439c21SAndrii Nakryiko mark_precise: frame0: last_idx 19 first_idx 10\ 49904e6ddfSEduard Zingerman mark_precise: frame0: regs=r2,r9 stack= before 19\ 50d9439c21SAndrii Nakryiko mark_precise: frame0: regs=r9 stack= before 18\ 51d9439c21SAndrii Nakryiko mark_precise: frame0: regs=r8,r9 stack= before 17\ 52d9439c21SAndrii Nakryiko mark_precise: frame0: regs=r0,r9 stack= before 15\ 53d9439c21SAndrii Nakryiko mark_precise: frame0: regs=r0,r9 stack= before 14\ 54d9439c21SAndrii Nakryiko mark_precise: frame0: regs=r9 stack= before 13\ 55d9439c21SAndrii Nakryiko mark_precise: frame0: regs=r9 stack= before 12\ 56d9439c21SAndrii Nakryiko mark_precise: frame0: regs=r9 stack= before 11\ 57d9439c21SAndrii Nakryiko mark_precise: frame0: regs=r9 stack= before 10\ 581ef22b68SAndrii Nakryiko mark_precise: frame0: parent state regs= stack=:", 59e8c13c4dSAlexei Starovoitov }, 60e8c13c4dSAlexei Starovoitov { 61e8c13c4dSAlexei Starovoitov "precise: test 2", 62e8c13c4dSAlexei Starovoitov .insns = { 63e8c13c4dSAlexei Starovoitov BPF_MOV64_IMM(BPF_REG_0, 1), 64e8c13c4dSAlexei Starovoitov BPF_LD_MAP_FD(BPF_REG_6, 0), 65e8c13c4dSAlexei Starovoitov BPF_MOV64_REG(BPF_REG_1, BPF_REG_6), 66e8c13c4dSAlexei Starovoitov BPF_MOV64_REG(BPF_REG_2, BPF_REG_FP), 67e8c13c4dSAlexei Starovoitov BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8), 68e8c13c4dSAlexei Starovoitov BPF_ST_MEM(BPF_DW, BPF_REG_FP, -8, 0), 69e8c13c4dSAlexei Starovoitov BPF_EMIT_CALL(BPF_FUNC_map_lookup_elem), 70e8c13c4dSAlexei Starovoitov BPF_JMP_IMM(BPF_JNE, BPF_REG_0, 0, 1), 71e8c13c4dSAlexei Starovoitov BPF_EXIT_INSN(), 72e8c13c4dSAlexei Starovoitov 73e8c13c4dSAlexei Starovoitov BPF_MOV64_REG(BPF_REG_9, BPF_REG_0), 74e8c13c4dSAlexei Starovoitov 75e8c13c4dSAlexei Starovoitov BPF_MOV64_REG(BPF_REG_1, BPF_REG_6), 76e8c13c4dSAlexei Starovoitov BPF_MOV64_REG(BPF_REG_2, BPF_REG_FP), 77e8c13c4dSAlexei Starovoitov BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8), 78e8c13c4dSAlexei Starovoitov BPF_EMIT_CALL(BPF_FUNC_map_lookup_elem), 79e8c13c4dSAlexei Starovoitov BPF_JMP_IMM(BPF_JNE, BPF_REG_0, 0, 1), 80e8c13c4dSAlexei Starovoitov BPF_EXIT_INSN(), 81e8c13c4dSAlexei Starovoitov 82e8c13c4dSAlexei Starovoitov BPF_MOV64_REG(BPF_REG_8, BPF_REG_0), 83e8c13c4dSAlexei Starovoitov 84e8c13c4dSAlexei Starovoitov BPF_ALU64_REG(BPF_SUB, BPF_REG_9, BPF_REG_8), /* map_value_ptr -= map_value_ptr */ 85e8c13c4dSAlexei Starovoitov BPF_MOV64_REG(BPF_REG_2, BPF_REG_9), 86e8c13c4dSAlexei Starovoitov BPF_JMP_IMM(BPF_JLT, BPF_REG_2, 8, 1), 87e8c13c4dSAlexei Starovoitov BPF_EXIT_INSN(), 88e8c13c4dSAlexei Starovoitov 897df5072cSMykola Lysenko BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, 1), /* R2=scalar(umin=1, umax=8) */ 90e8c13c4dSAlexei Starovoitov BPF_MOV64_REG(BPF_REG_1, BPF_REG_FP), 91e8c13c4dSAlexei Starovoitov BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, -8), 92e8c13c4dSAlexei Starovoitov BPF_MOV64_IMM(BPF_REG_3, 0), 939bc499beSIlya Leoshkevich BPF_EMIT_CALL(BPF_FUNC_probe_read_kernel), 94e8c13c4dSAlexei Starovoitov BPF_EXIT_INSN(), 95e8c13c4dSAlexei Starovoitov }, 96e8c13c4dSAlexei Starovoitov .prog_type = BPF_PROG_TYPE_TRACEPOINT, 97e8c13c4dSAlexei Starovoitov .fixup_map_array_48b = { 1 }, 98e8c13c4dSAlexei Starovoitov .result = VERBOSE_ACCEPT, 99e8c13c4dSAlexei Starovoitov .flags = BPF_F_TEST_STATE_FREQ, 100e8c13c4dSAlexei Starovoitov .errstr = 1019bc499beSIlya Leoshkevich "26: (85) call bpf_probe_read_kernel#113\ 102d9439c21SAndrii Nakryiko mark_precise: frame0: last_idx 26 first_idx 22\ 103d9439c21SAndrii Nakryiko mark_precise: frame0: regs=r2 stack= before 25\ 104d9439c21SAndrii Nakryiko mark_precise: frame0: regs=r2 stack= before 24\ 105d9439c21SAndrii Nakryiko mark_precise: frame0: regs=r2 stack= before 23\ 106d9439c21SAndrii Nakryiko mark_precise: frame0: regs=r2 stack= before 22\ 1071ef22b68SAndrii Nakryiko mark_precise: frame0: parent state regs=r2 stack=:\ 108d9439c21SAndrii Nakryiko mark_precise: frame0: last_idx 20 first_idx 20\ 109904e6ddfSEduard Zingerman mark_precise: frame0: regs=r2,r9 stack= before 20\ 110904e6ddfSEduard Zingerman mark_precise: frame0: parent state regs=r2,r9 stack=:\ 111d9439c21SAndrii Nakryiko mark_precise: frame0: last_idx 19 first_idx 17\ 112904e6ddfSEduard Zingerman mark_precise: frame0: regs=r2,r9 stack= before 19\ 113d9439c21SAndrii Nakryiko mark_precise: frame0: regs=r9 stack= before 18\ 114d9439c21SAndrii Nakryiko mark_precise: frame0: regs=r8,r9 stack= before 17\ 1151ef22b68SAndrii Nakryiko mark_precise: frame0: parent state regs= stack=:", 116e8c13c4dSAlexei Starovoitov }, 117411cdb45SAlexei Starovoitov { 118411cdb45SAlexei Starovoitov "precise: cross frame pruning", 119411cdb45SAlexei Starovoitov .insns = { 120411cdb45SAlexei Starovoitov BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, BPF_FUNC_get_prandom_u32), 121411cdb45SAlexei Starovoitov BPF_MOV64_IMM(BPF_REG_8, 0), 122411cdb45SAlexei Starovoitov BPF_JMP_IMM(BPF_JNE, BPF_REG_0, 0, 1), 123411cdb45SAlexei Starovoitov BPF_MOV64_IMM(BPF_REG_8, 1), 124411cdb45SAlexei Starovoitov BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, BPF_FUNC_get_prandom_u32), 125411cdb45SAlexei Starovoitov BPF_MOV64_IMM(BPF_REG_9, 0), 126411cdb45SAlexei Starovoitov BPF_JMP_IMM(BPF_JNE, BPF_REG_0, 0, 1), 127411cdb45SAlexei Starovoitov BPF_MOV64_IMM(BPF_REG_9, 1), 128411cdb45SAlexei Starovoitov BPF_MOV64_REG(BPF_REG_1, BPF_REG_0), 129411cdb45SAlexei Starovoitov BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 1, 0, 4), 130411cdb45SAlexei Starovoitov BPF_JMP_IMM(BPF_JEQ, BPF_REG_8, 1, 1), 131411cdb45SAlexei Starovoitov BPF_LDX_MEM(BPF_B, BPF_REG_1, BPF_REG_2, 0), 132411cdb45SAlexei Starovoitov BPF_MOV64_IMM(BPF_REG_0, 0), 133411cdb45SAlexei Starovoitov BPF_EXIT_INSN(), 134411cdb45SAlexei Starovoitov BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 0, 0), 135411cdb45SAlexei Starovoitov BPF_EXIT_INSN(), 136411cdb45SAlexei Starovoitov }, 137411cdb45SAlexei Starovoitov .prog_type = BPF_PROG_TYPE_XDP, 138411cdb45SAlexei Starovoitov .flags = BPF_F_TEST_STATE_FREQ, 139411cdb45SAlexei Starovoitov .errstr = "!read_ok", 140411cdb45SAlexei Starovoitov .result = REJECT, 141411cdb45SAlexei Starovoitov }, 142310f4204SAlexei Starovoitov { 143*199f0452SShung-Hsi Yu "precise: ST insn causing spi > allocated_stack", 144310f4204SAlexei Starovoitov .insns = { 145310f4204SAlexei Starovoitov BPF_MOV64_REG(BPF_REG_3, BPF_REG_10), 146310f4204SAlexei Starovoitov BPF_JMP_IMM(BPF_JNE, BPF_REG_3, 123, 0), 147310f4204SAlexei Starovoitov BPF_ST_MEM(BPF_DW, BPF_REG_3, -8, 0), 148310f4204SAlexei Starovoitov BPF_LDX_MEM(BPF_DW, BPF_REG_4, BPF_REG_10, -8), 149310f4204SAlexei Starovoitov BPF_MOV64_IMM(BPF_REG_0, -1), 150310f4204SAlexei Starovoitov BPF_JMP_REG(BPF_JGT, BPF_REG_4, BPF_REG_0, 0), 151310f4204SAlexei Starovoitov BPF_EXIT_INSN(), 152310f4204SAlexei Starovoitov }, 153310f4204SAlexei Starovoitov .prog_type = BPF_PROG_TYPE_XDP, 154310f4204SAlexei Starovoitov .flags = BPF_F_TEST_STATE_FREQ, 155d9439c21SAndrii Nakryiko .errstr = "mark_precise: frame0: last_idx 5 first_idx 5\ 1561ef22b68SAndrii Nakryiko mark_precise: frame0: parent state regs=r4 stack=:\ 157d9439c21SAndrii Nakryiko mark_precise: frame0: last_idx 4 first_idx 2\ 158d9439c21SAndrii Nakryiko mark_precise: frame0: regs=r4 stack= before 4\ 159d9439c21SAndrii Nakryiko mark_precise: frame0: regs=r4 stack= before 3\ 160*199f0452SShung-Hsi Yu mark_precise: frame0: regs= stack=-8 before 2\ 161*199f0452SShung-Hsi Yu mark_precise: frame0: falling back to forcing all scalars precise\ 162*199f0452SShung-Hsi Yu force_precise: frame0: forcing r0 to be precise\ 163d9439c21SAndrii Nakryiko mark_precise: frame0: last_idx 5 first_idx 5\ 164*199f0452SShung-Hsi Yu mark_precise: frame0: parent state regs= stack=:", 165310f4204SAlexei Starovoitov .result = VERBOSE_ACCEPT, 166310f4204SAlexei Starovoitov .retval = -1, 167310f4204SAlexei Starovoitov }, 168310f4204SAlexei Starovoitov { 169310f4204SAlexei Starovoitov "precise: STX insn causing spi > allocated_stack", 170310f4204SAlexei Starovoitov .insns = { 171310f4204SAlexei Starovoitov BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, BPF_FUNC_get_prandom_u32), 172310f4204SAlexei Starovoitov BPF_MOV64_REG(BPF_REG_3, BPF_REG_10), 173310f4204SAlexei Starovoitov BPF_JMP_IMM(BPF_JNE, BPF_REG_3, 123, 0), 174310f4204SAlexei Starovoitov BPF_STX_MEM(BPF_DW, BPF_REG_3, BPF_REG_0, -8), 175310f4204SAlexei Starovoitov BPF_LDX_MEM(BPF_DW, BPF_REG_4, BPF_REG_10, -8), 176310f4204SAlexei Starovoitov BPF_MOV64_IMM(BPF_REG_0, -1), 177310f4204SAlexei Starovoitov BPF_JMP_REG(BPF_JGT, BPF_REG_4, BPF_REG_0, 0), 178310f4204SAlexei Starovoitov BPF_EXIT_INSN(), 179310f4204SAlexei Starovoitov }, 180310f4204SAlexei Starovoitov .prog_type = BPF_PROG_TYPE_XDP, 181310f4204SAlexei Starovoitov .flags = BPF_F_TEST_STATE_FREQ, 182*199f0452SShung-Hsi Yu .errstr = "mark_precise: frame0: last_idx 6 first_idx 6\ 1831ef22b68SAndrii Nakryiko mark_precise: frame0: parent state regs=r4 stack=:\ 184*199f0452SShung-Hsi Yu mark_precise: frame0: last_idx 5 first_idx 3\ 185*199f0452SShung-Hsi Yu mark_precise: frame0: regs=r4 stack= before 5\ 186*199f0452SShung-Hsi Yu mark_precise: frame0: regs=r4 stack= before 4\ 187*199f0452SShung-Hsi Yu mark_precise: frame0: regs= stack=-8 before 3\ 188*199f0452SShung-Hsi Yu mark_precise: frame0: falling back to forcing all scalars precise\ 189*199f0452SShung-Hsi Yu force_precise: frame0: forcing r0 to be precise\ 190*199f0452SShung-Hsi Yu force_precise: frame0: forcing r0 to be precise\ 191*199f0452SShung-Hsi Yu force_precise: frame0: forcing r0 to be precise\ 192*199f0452SShung-Hsi Yu force_precise: frame0: forcing r0 to be precise\ 193*199f0452SShung-Hsi Yu mark_precise: frame0: last_idx 6 first_idx 6\ 194c50c0b57SAndrii Nakryiko mark_precise: frame0: parent state regs= stack=:", 195310f4204SAlexei Starovoitov .result = VERBOSE_ACCEPT, 196310f4204SAlexei Starovoitov .retval = -1, 197310f4204SAlexei Starovoitov }, 1981800b2acSKumar Kartikeya Dwivedi { 1991800b2acSKumar Kartikeya Dwivedi "precise: mark_chain_precision for ARG_CONST_ALLOC_SIZE_OR_ZERO", 2001800b2acSKumar Kartikeya Dwivedi .insns = { 2011800b2acSKumar Kartikeya Dwivedi BPF_LDX_MEM(BPF_W, BPF_REG_4, BPF_REG_1, offsetof(struct xdp_md, ingress_ifindex)), 2021800b2acSKumar Kartikeya Dwivedi BPF_LD_MAP_FD(BPF_REG_6, 0), 2031800b2acSKumar Kartikeya Dwivedi BPF_MOV64_REG(BPF_REG_1, BPF_REG_6), 2041800b2acSKumar Kartikeya Dwivedi BPF_MOV64_IMM(BPF_REG_2, 1), 2051800b2acSKumar Kartikeya Dwivedi BPF_MOV64_IMM(BPF_REG_3, 0), 2061800b2acSKumar Kartikeya Dwivedi BPF_JMP_IMM(BPF_JEQ, BPF_REG_4, 0, 1), 2071800b2acSKumar Kartikeya Dwivedi BPF_MOV64_IMM(BPF_REG_2, 0x1000), 2081800b2acSKumar Kartikeya Dwivedi BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, BPF_FUNC_ringbuf_reserve), 2091800b2acSKumar Kartikeya Dwivedi BPF_JMP_IMM(BPF_JNE, BPF_REG_0, 0, 1), 2101800b2acSKumar Kartikeya Dwivedi BPF_EXIT_INSN(), 2111800b2acSKumar Kartikeya Dwivedi BPF_MOV64_REG(BPF_REG_1, BPF_REG_0), 2121800b2acSKumar Kartikeya Dwivedi BPF_LDX_MEM(BPF_DW, BPF_REG_2, BPF_REG_0, 42), 2131800b2acSKumar Kartikeya Dwivedi BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, BPF_FUNC_ringbuf_submit), 2141800b2acSKumar Kartikeya Dwivedi BPF_MOV64_IMM(BPF_REG_0, 0), 2151800b2acSKumar Kartikeya Dwivedi BPF_EXIT_INSN(), 2161800b2acSKumar Kartikeya Dwivedi }, 2171800b2acSKumar Kartikeya Dwivedi .fixup_map_ringbuf = { 1 }, 2181800b2acSKumar Kartikeya Dwivedi .prog_type = BPF_PROG_TYPE_XDP, 219ce1f289fSBjörn Töpel .flags = BPF_F_TEST_STATE_FREQ | F_NEEDS_EFFICIENT_UNALIGNED_ACCESS, 2201800b2acSKumar Kartikeya Dwivedi .errstr = "invalid access to memory, mem_size=1 off=42 size=8", 2211800b2acSKumar Kartikeya Dwivedi .result = REJECT, 2221800b2acSKumar Kartikeya Dwivedi }, 223b3e8701dSDaniel Borkmann { 224b3e8701dSDaniel Borkmann "precise: program doesn't prematurely prune branches", 225b3e8701dSDaniel Borkmann .insns = { 226b3e8701dSDaniel Borkmann BPF_ALU64_IMM(BPF_MOV, BPF_REG_6, 0x400), 227b3e8701dSDaniel Borkmann BPF_ALU64_IMM(BPF_MOV, BPF_REG_7, 0), 228b3e8701dSDaniel Borkmann BPF_ALU64_IMM(BPF_MOV, BPF_REG_8, 0), 229b3e8701dSDaniel Borkmann BPF_ALU64_IMM(BPF_MOV, BPF_REG_9, 0x80000000), 230b3e8701dSDaniel Borkmann BPF_ALU64_IMM(BPF_MOD, BPF_REG_6, 0x401), 231b3e8701dSDaniel Borkmann BPF_JMP_IMM(BPF_JA, 0, 0, 0), 232b3e8701dSDaniel Borkmann BPF_JMP_REG(BPF_JLE, BPF_REG_6, BPF_REG_9, 2), 233b3e8701dSDaniel Borkmann BPF_ALU64_IMM(BPF_MOD, BPF_REG_6, 1), 234b3e8701dSDaniel Borkmann BPF_ALU64_IMM(BPF_MOV, BPF_REG_9, 0), 235b3e8701dSDaniel Borkmann BPF_JMP_REG(BPF_JLE, BPF_REG_6, BPF_REG_9, 1), 236b3e8701dSDaniel Borkmann BPF_ALU64_IMM(BPF_MOV, BPF_REG_6, 0), 237b3e8701dSDaniel Borkmann BPF_ALU64_IMM(BPF_MOV, BPF_REG_0, 0), 238b3e8701dSDaniel Borkmann BPF_STX_MEM(BPF_W, BPF_REG_10, BPF_REG_0, -4), 239b3e8701dSDaniel Borkmann BPF_LD_MAP_FD(BPF_REG_4, 0), 240b3e8701dSDaniel Borkmann BPF_ALU64_REG(BPF_MOV, BPF_REG_1, BPF_REG_4), 241b3e8701dSDaniel Borkmann BPF_ALU64_REG(BPF_MOV, BPF_REG_2, BPF_REG_10), 242b3e8701dSDaniel Borkmann BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -4), 243b3e8701dSDaniel Borkmann BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, BPF_FUNC_map_lookup_elem), 244b3e8701dSDaniel Borkmann BPF_JMP_IMM(BPF_JNE, BPF_REG_0, 0, 1), 245b3e8701dSDaniel Borkmann BPF_EXIT_INSN(), 246b3e8701dSDaniel Borkmann BPF_ALU64_IMM(BPF_RSH, BPF_REG_6, 10), 247b3e8701dSDaniel Borkmann BPF_ALU64_IMM(BPF_MUL, BPF_REG_6, 8192), 248b3e8701dSDaniel Borkmann BPF_ALU64_REG(BPF_MOV, BPF_REG_1, BPF_REG_0), 249b3e8701dSDaniel Borkmann BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_6), 250b3e8701dSDaniel Borkmann BPF_LDX_MEM(BPF_DW, BPF_REG_3, BPF_REG_0, 0), 251b3e8701dSDaniel Borkmann BPF_STX_MEM(BPF_DW, BPF_REG_1, BPF_REG_3, 0), 252b3e8701dSDaniel Borkmann BPF_EXIT_INSN(), 253b3e8701dSDaniel Borkmann }, 254b3e8701dSDaniel Borkmann .fixup_map_array_48b = { 13 }, 255b3e8701dSDaniel Borkmann .prog_type = BPF_PROG_TYPE_XDP, 256b3e8701dSDaniel Borkmann .result = REJECT, 257b3e8701dSDaniel Borkmann .errstr = "register with unbounded min value is not allowed", 258b3e8701dSDaniel Borkmann }, 259