Re: [PATCH bpf-next v2] bpf: Warn on internal verifier errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 1, 2025 at 6:45 AM Paul Chaignon <paul@xxxxxxxxxxxxx> wrote:
>
> @@ -15426,12 +15418,12 @@ static int adjust_reg_min_max_vals(struct bpf_verifier_env *env,
>         /* Got here implies adding two SCALAR_VALUEs */
>         if (WARN_ON_ONCE(ptr_reg)) {
>                 print_verifier_state(env, vstate, vstate->curframe, true);
> -               verbose(env, "verifier internal error: unexpected ptr_reg\n");
> +               verifier_bug(env, "unexpected ptr_reg");
>                 return -EFAULT;
>         }
>         if (WARN_ON(!src_reg)) {
>                 print_verifier_state(env, vstate, vstate->curframe, true);
> -               verbose(env, "verifier internal error: no src_reg\n");
> +               verifier_bug(env, "no src_reg");
>                 return -EFAULT;
>         }

These two don't need to change. There is WARN_ON there anyway and
print_verifier_state() too. Changing the last verbose() to be conditional
depending on .config will be surprising and inconsistent.

The rest lgtm.

--
pw-bot: cr





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux