2 "DIV32 by 0, zero check 1",
4 BPF_MOV32_IMM(BPF_REG_0
, 42),
5 BPF_MOV32_IMM(BPF_REG_1
, 0),
6 BPF_MOV32_IMM(BPF_REG_2
, 1),
7 BPF_ALU32_REG(BPF_DIV
, BPF_REG_2
, BPF_REG_1
),
14 "DIV32 by 0, zero check 2",
16 BPF_MOV32_IMM(BPF_REG_0
, 42),
17 BPF_LD_IMM64(BPF_REG_1
, 0xffffffff00000000LL
),
18 BPF_MOV32_IMM(BPF_REG_2
, 1),
19 BPF_ALU32_REG(BPF_DIV
, BPF_REG_2
, BPF_REG_1
),
26 "DIV64 by 0, zero check",
28 BPF_MOV32_IMM(BPF_REG_0
, 42),
29 BPF_MOV32_IMM(BPF_REG_1
, 0),
30 BPF_MOV32_IMM(BPF_REG_2
, 1),
31 BPF_ALU64_REG(BPF_DIV
, BPF_REG_2
, BPF_REG_1
),
38 "MOD32 by 0, zero check 1",
40 BPF_MOV32_IMM(BPF_REG_0
, 42),
41 BPF_MOV32_IMM(BPF_REG_1
, 0),
42 BPF_MOV32_IMM(BPF_REG_2
, 1),
43 BPF_ALU32_REG(BPF_MOD
, BPF_REG_2
, BPF_REG_1
),
50 "MOD32 by 0, zero check 2",
52 BPF_MOV32_IMM(BPF_REG_0
, 42),
53 BPF_LD_IMM64(BPF_REG_1
, 0xffffffff00000000LL
),
54 BPF_MOV32_IMM(BPF_REG_2
, 1),
55 BPF_ALU32_REG(BPF_MOD
, BPF_REG_2
, BPF_REG_1
),
62 "MOD64 by 0, zero check",
64 BPF_MOV32_IMM(BPF_REG_0
, 42),
65 BPF_MOV32_IMM(BPF_REG_1
, 0),
66 BPF_MOV32_IMM(BPF_REG_2
, 1),
67 BPF_ALU64_REG(BPF_MOD
, BPF_REG_2
, BPF_REG_1
),
74 "DIV32 by 0, zero check ok, cls",
76 BPF_MOV32_IMM(BPF_REG_0
, 42),
77 BPF_MOV32_IMM(BPF_REG_1
, 2),
78 BPF_MOV32_IMM(BPF_REG_2
, 16),
79 BPF_ALU32_REG(BPF_DIV
, BPF_REG_2
, BPF_REG_1
),
80 BPF_MOV64_REG(BPF_REG_0
, BPF_REG_2
),
83 .prog_type
= BPF_PROG_TYPE_SCHED_CLS
,
88 "DIV32 by 0, zero check 1, cls",
90 BPF_MOV32_IMM(BPF_REG_1
, 0),
91 BPF_MOV32_IMM(BPF_REG_0
, 1),
92 BPF_ALU32_REG(BPF_DIV
, BPF_REG_0
, BPF_REG_1
),
95 .prog_type
= BPF_PROG_TYPE_SCHED_CLS
,
100 "DIV32 by 0, zero check 2, cls",
102 BPF_LD_IMM64(BPF_REG_1
, 0xffffffff00000000LL
),
103 BPF_MOV32_IMM(BPF_REG_0
, 1),
104 BPF_ALU32_REG(BPF_DIV
, BPF_REG_0
, BPF_REG_1
),
107 .prog_type
= BPF_PROG_TYPE_SCHED_CLS
,
112 "DIV64 by 0, zero check, cls",
114 BPF_MOV32_IMM(BPF_REG_1
, 0),
115 BPF_MOV32_IMM(BPF_REG_0
, 1),
116 BPF_ALU64_REG(BPF_DIV
, BPF_REG_0
, BPF_REG_1
),
119 .prog_type
= BPF_PROG_TYPE_SCHED_CLS
,
124 "MOD32 by 0, zero check ok, cls",
126 BPF_MOV32_IMM(BPF_REG_0
, 42),
127 BPF_MOV32_IMM(BPF_REG_1
, 3),
128 BPF_MOV32_IMM(BPF_REG_2
, 5),
129 BPF_ALU32_REG(BPF_MOD
, BPF_REG_2
, BPF_REG_1
),
130 BPF_MOV64_REG(BPF_REG_0
, BPF_REG_2
),
133 .prog_type
= BPF_PROG_TYPE_SCHED_CLS
,
138 "MOD32 by 0, zero check 1, cls",
140 BPF_MOV32_IMM(BPF_REG_1
, 0),
141 BPF_MOV32_IMM(BPF_REG_0
, 1),
142 BPF_ALU32_REG(BPF_MOD
, BPF_REG_0
, BPF_REG_1
),
145 .prog_type
= BPF_PROG_TYPE_SCHED_CLS
,
150 "MOD32 by 0, zero check 2, cls",
152 BPF_LD_IMM64(BPF_REG_1
, 0xffffffff00000000LL
),
153 BPF_MOV32_IMM(BPF_REG_0
, 1),
154 BPF_ALU32_REG(BPF_MOD
, BPF_REG_0
, BPF_REG_1
),
157 .prog_type
= BPF_PROG_TYPE_SCHED_CLS
,
162 "MOD64 by 0, zero check 1, cls",
164 BPF_MOV32_IMM(BPF_REG_1
, 0),
165 BPF_MOV32_IMM(BPF_REG_0
, 2),
166 BPF_ALU64_REG(BPF_MOD
, BPF_REG_0
, BPF_REG_1
),
169 .prog_type
= BPF_PROG_TYPE_SCHED_CLS
,
174 "MOD64 by 0, zero check 2, cls",
176 BPF_MOV32_IMM(BPF_REG_1
, 0),
177 BPF_MOV32_IMM(BPF_REG_0
, -1),
178 BPF_ALU64_REG(BPF_MOD
, BPF_REG_0
, BPF_REG_1
),
181 .prog_type
= BPF_PROG_TYPE_SCHED_CLS
,