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 <paul.chaignon@gmail.com> Acked-by: Eduard Zingerman <eddyz87@gmail.com> Link: https://lore.kernel.org/r/cc94316c30dd76fae4a75a664b61a2dbfe68e205.1754039605.git.paul.chaignon@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>pull/1320/head
parent
9e6448f7b1
commit
f914876eec
|
|
@ -21445,7 +21445,7 @@ static int convert_ctx_accesses(struct bpf_verifier_env *env)
|
|||
&target_size);
|
||||
if (cnt == 0 || cnt >= INSN_BUF_SIZE ||
|
||||
(ctx_field_size && !target_size)) {
|
||||
verifier_bug(env, "error during ctx access conversion");
|
||||
verifier_bug(env, "error during ctx access conversion (%d)", cnt);
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue