Skip to content

Commit f914876

Browse files
pchaignoAlexei Starovoitov
authored andcommitted
bpf: Improve ctx access verifier error message
We've already had two "error during ctx access conversion" warnings triggered by syzkaller. Let's improve the error message by dumping the cnt variable so that we can more easily differentiate between the different error cases. Signed-off-by: Paul Chaignon <[email protected]> Acked-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/cc94316c30dd76fae4a75a664b61a2dbfe68e205.1754039605.git.paul.chaignon@gmail.com Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent 9e6448f commit f914876

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/bpf/verifier.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21445,7 +21445,7 @@ static int convert_ctx_accesses(struct bpf_verifier_env *env)
2144521445
&target_size);
2144621446
if (cnt == 0 || cnt >= INSN_BUF_SIZE ||
2144721447
(ctx_field_size && !target_size)) {
21448-
verifier_bug(env, "error during ctx access conversion");
21448+
verifier_bug(env, "error during ctx access conversion (%d)", cnt);
2144921449
return -EFAULT;
2145021450
}
2145121451

0 commit comments

Comments
 (0)