4 BPF_ST_MEM(BPF_DW
, BPF_REG_10
, 8, 0),
7 .errstr
= "invalid stack",
11 "uninitialized stack1",
13 BPF_MOV64_REG(BPF_REG_2
, BPF_REG_10
),
14 BPF_ALU64_IMM(BPF_ADD
, BPF_REG_2
, -8),
15 BPF_LD_MAP_FD(BPF_REG_1
, 0),
16 BPF_RAW_INSN(BPF_JMP
| BPF_CALL
, 0, 0, 0, BPF_FUNC_map_lookup_elem
),
19 .fixup_map_hash_8b
= { 2 },
20 .errstr
= "invalid indirect read from stack",
24 "uninitialized stack2",
26 BPF_MOV64_REG(BPF_REG_2
, BPF_REG_10
),
27 BPF_LDX_MEM(BPF_DW
, BPF_REG_0
, BPF_REG_2
, -8),
30 .errstr
= "invalid read from stack",
34 "invalid fp arithmetic",
35 /* If this gets ever changed, make sure JITs can deal with it. */
37 BPF_MOV64_IMM(BPF_REG_0
, 0),
38 BPF_MOV64_REG(BPF_REG_1
, BPF_REG_10
),
39 BPF_ALU64_IMM(BPF_SUB
, BPF_REG_1
, 8),
40 BPF_STX_MEM(BPF_DW
, BPF_REG_1
, BPF_REG_0
, 0),
43 .errstr
= "R1 subtraction from stack pointer",
47 "non-invalid fp arithmetic",
49 BPF_MOV64_IMM(BPF_REG_0
, 0),
50 BPF_STX_MEM(BPF_DW
, BPF_REG_10
, BPF_REG_0
, -8),
56 "misaligned read from stack",
58 BPF_MOV64_REG(BPF_REG_2
, BPF_REG_10
),
59 BPF_LDX_MEM(BPF_DW
, BPF_REG_0
, BPF_REG_2
, -4),
62 .errstr
= "misaligned stack access",