2 "runtime/jit: tail_call within bounds, prog once",
4 BPF_MOV64_IMM(BPF_REG_3
, 0),
5 BPF_LD_MAP_FD(BPF_REG_2
, 0),
6 BPF_RAW_INSN(BPF_JMP
| BPF_CALL
, 0, 0, 0, BPF_FUNC_tail_call
),
7 BPF_MOV64_IMM(BPF_REG_0
, 1),
15 "runtime/jit: tail_call within bounds, prog loop",
17 BPF_MOV64_IMM(BPF_REG_3
, 1),
18 BPF_LD_MAP_FD(BPF_REG_2
, 0),
19 BPF_RAW_INSN(BPF_JMP
| BPF_CALL
, 0, 0, 0, BPF_FUNC_tail_call
),
20 BPF_MOV64_IMM(BPF_REG_0
, 1),
28 "runtime/jit: tail_call within bounds, no prog",
30 BPF_MOV64_IMM(BPF_REG_3
, 2),
31 BPF_LD_MAP_FD(BPF_REG_2
, 0),
32 BPF_RAW_INSN(BPF_JMP
| BPF_CALL
, 0, 0, 0, BPF_FUNC_tail_call
),
33 BPF_MOV64_IMM(BPF_REG_0
, 1),
41 "runtime/jit: tail_call out of bounds",
43 BPF_MOV64_IMM(BPF_REG_3
, 256),
44 BPF_LD_MAP_FD(BPF_REG_2
, 0),
45 BPF_RAW_INSN(BPF_JMP
| BPF_CALL
, 0, 0, 0, BPF_FUNC_tail_call
),
46 BPF_MOV64_IMM(BPF_REG_0
, 2),
54 "runtime/jit: pass negative index to tail_call",
56 BPF_MOV64_IMM(BPF_REG_3
, -1),
57 BPF_LD_MAP_FD(BPF_REG_2
, 0),
58 BPF_RAW_INSN(BPF_JMP
| BPF_CALL
, 0, 0, 0, BPF_FUNC_tail_call
),
59 BPF_MOV64_IMM(BPF_REG_0
, 2),
67 "runtime/jit: pass > 32bit index to tail_call",
69 BPF_LD_IMM64(BPF_REG_3
, 0x100000000ULL
),
70 BPF_LD_MAP_FD(BPF_REG_2
, 0),
71 BPF_RAW_INSN(BPF_JMP
| BPF_CALL
, 0, 0, 0, BPF_FUNC_tail_call
),
72 BPF_MOV64_IMM(BPF_REG_0
, 2),
78 /* Verifier rewrite for unpriv skips tail call here. */