Re: [PATCH bpf-next] bpf: Tidy verifier bug message

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

 



On Mon, 2025-08-11 at 20:58 +0200, Paul Chaignon wrote:
> Yonghong noticed that error messages for potential verifier bugs often
> have a '(1)' at the end. This is happening because verifier_bug_if(cond,
> env, fmt, args...) prints "(" #cond ")\n" as part of the message and
> verifier_bug() is defined as:
> 
>   #define verifier_bug(env, fmt, args...) verifier_bug_if(1, env, fmt, ##args)
> 
> Hence, verifier_bug() always ends up displaying '(1)'. This small patch
> fixes it by having verifier_bug_if conditionally call verifier_bug
> instead of the other way around.
> 
> Fixes: 1cb0f56d9618 ("bpf: WARN_ONCE on verifier bugs")
> Reported-by: Yonghong Song <yonghong.song@xxxxxxxxx>
> Signed-off-by: Paul Chaignon <paul.chaignon@xxxxxxxxx>
> ---

I wondered why that '(1)' was printed lately...
Tried this patch for both verifier_bug and verifier_bug_if,
works as expected.

Tested-by: Eduard Zingerman <eddyz87@xxxxxxxxx>

[...]





[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