Skip to content

Commit 58d114b

Browse files
Yonghong SongKernel Patches Daemon
Yonghong Song
authored and
Kernel Patches Daemon
committed
selftests/bpf: Fix a test_verifier failure
The following test_verifier subtest failed due to new encoding for BSWAP. $ ./test_verifier ... #99/u invalid 64-bit BPF_END FAIL Unexpected success to load! verification time 215 usec stack depth 0 processed 3 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0 #99/p invalid 64-bit BPF_END FAIL Unexpected success to load! verification time 198 usec stack depth 0 processed 3 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0 Tighten the test so it still reports a failure. Acked-by: Eduard Zingerman <[email protected]> Signed-off-by: Yonghong Song <[email protected]>
1 parent 01a509e commit 58d114b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/testing/selftests/bpf/verifier/basic_instr.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,19 +176,19 @@
176176
.retval = 1,
177177
},
178178
{
179-
"invalid 64-bit BPF_END",
179+
"invalid 64-bit BPF_END with BPF_TO_BE",
180180
.insns = {
181181
BPF_MOV32_IMM(BPF_REG_0, 0),
182182
{
183-
.code = BPF_ALU64 | BPF_END | BPF_TO_LE,
183+
.code = BPF_ALU64 | BPF_END | BPF_TO_BE,
184184
.dst_reg = BPF_REG_0,
185185
.src_reg = 0,
186186
.off = 0,
187187
.imm = 32,
188188
},
189189
BPF_EXIT_INSN(),
190190
},
191-
.errstr = "unknown opcode d7",
191+
.errstr = "unknown opcode df",
192192
.result = REJECT,
193193
},
194194
{

0 commit comments

Comments
 (0)