2 "direct stack access with 32-bit wraparound. test1",
4 BPF_MOV64_REG(BPF_REG_1
, BPF_REG_10
),
5 BPF_ALU64_IMM(BPF_ADD
, BPF_REG_1
, 0x7fffffff),
6 BPF_ALU64_IMM(BPF_ADD
, BPF_REG_1
, 0x7fffffff),
7 BPF_MOV32_IMM(BPF_REG_0
, 0),
8 BPF_STX_MEM(BPF_B
, BPF_REG_1
, BPF_REG_0
, 0),
11 .errstr
= "fp pointer and 2147483647",
15 "direct stack access with 32-bit wraparound. test2",
17 BPF_MOV64_REG(BPF_REG_1
, BPF_REG_10
),
18 BPF_ALU64_IMM(BPF_ADD
, BPF_REG_1
, 0x3fffffff),
19 BPF_ALU64_IMM(BPF_ADD
, BPF_REG_1
, 0x3fffffff),
20 BPF_MOV32_IMM(BPF_REG_0
, 0),
21 BPF_STX_MEM(BPF_B
, BPF_REG_1
, BPF_REG_0
, 0),
24 .errstr
= "fp pointer and 1073741823",
28 "direct stack access with 32-bit wraparound. test3",
30 BPF_MOV64_REG(BPF_REG_1
, BPF_REG_10
),
31 BPF_ALU64_IMM(BPF_ADD
, BPF_REG_1
, 0x1fffffff),
32 BPF_ALU64_IMM(BPF_ADD
, BPF_REG_1
, 0x1fffffff),
33 BPF_MOV32_IMM(BPF_REG_0
, 0),
34 BPF_STX_MEM(BPF_B
, BPF_REG_1
, BPF_REG_0
, 0),
37 .errstr
= "fp pointer offset 1073741822",
38 .errstr_unpriv
= "R1 stack pointer arithmetic goes out of range",