Re: [PATCH bpf-next] bpf: improve error message for unsupported helper

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

 



On Mon, Mar 25, 2024 at 8:22 AM Mykyta Yatsenko
<mykyta.yatsenko5@xxxxxxxxx> wrote:
>
> From: Mykyta Yatsenko <yatsenko@xxxxxxxx>
>
> BPF verifier emits "unknown func" message when given BPF program type
> does not support BPF helper. This message may be confusing for users, as
> important context that helper is unknown only to current program type is
> not provided.
>
> This patch changes message to "program of this type cannot use helper "
> and aligns dependent code in libbpf and tests. Any suggestions on
> improving/changing this message are welcome.
>
> Signed-off-by: Mykyta Yatsenko <yatsenko@xxxxxxxx>
> ---

"unknown func bpf_somehelper" is one of the common confusions users
run into (and I had to explain multiple times), so this more
meaningful message is definitely an improvement, thanks!

Acked-by: Andrii Nakryiko <andrii@xxxxxxxxxx>

>  kernel/bpf/verifier.c                                     | 4 ++--
>  tools/bpf/bpftool/feature.c                               | 3 ++-
>  tools/lib/bpf/libbpf_probes.c                             | 6 ++++--
>  tools/testing/selftests/bpf/prog_tests/bpf_tcp_ca.c       | 2 +-
>  .../selftests/bpf/progs/verifier_helper_restricted.c      | 8 ++++----
>  5 files changed, 13 insertions(+), 10 deletions(-)
>

[...]





[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