mbox series

[iproute2-next,v2,0/2] Increase BPF verifier verbosity when in verbose mode

Message ID 20231027085706.25718-1-shung-hsi.yu@suse.com (mailing list archive)
Headers show
Series Increase BPF verifier verbosity when in verbose mode | expand

Message

Shung-Hsi Yu Oct. 27, 2023, 8:57 a.m. UTC
When debugging BPF verifier issue, it is useful get as much information
out of the verifier as possible to help diagnostic, but right now that
is not possible because load_bpf_object() does not set the
kernel_log_level in struct bpf_object_open_opts, which is addressed in
patch 1.

Patch 2 further allows increasing the log level in verbose mode, so even
more information can be retrieved out of the verifier, and most
importantly, show verifier log even on successful BPF program load.

v1 -> v2:
- move setting of .kernel_log_level outside of DECLARE_LIBBPF_OPTS in
  patch 1 as per David's comment

Shung-Hsi Yu (2):
  libbpf: set kernel_log_level when available
  bpf: increase verifier verbosity when in verbose mode

 include/bpf_util.h |  4 ++--
 ip/ipvrf.c         |  3 ++-
 lib/bpf_legacy.c   | 10 ++++++----
 lib/bpf_libbpf.c   |  6 ++++++
 4 files changed, 16 insertions(+), 7 deletions(-)


base-commit: d233ff0f984a1f9d0b166701b19e1897b05812d6

Comments

patchwork-bot+netdevbpf@kernel.org Oct. 27, 2023, 5 p.m. UTC | #1
Hello:

This series was applied to iproute2/iproute2-next.git (main)
by David Ahern <dsahern@kernel.org>:

On Fri, 27 Oct 2023 16:57:04 +0800 you wrote:
> When debugging BPF verifier issue, it is useful get as much information
> out of the verifier as possible to help diagnostic, but right now that
> is not possible because load_bpf_object() does not set the
> kernel_log_level in struct bpf_object_open_opts, which is addressed in
> patch 1.
> 
> Patch 2 further allows increasing the log level in verbose mode, so even
> more information can be retrieved out of the verifier, and most
> importantly, show verifier log even on successful BPF program load.
> 
> [...]

Here is the summary with links:
  - [iproute2-next,v2,1/2] libbpf: set kernel_log_level when available
    https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=73284227f7a0
  - [iproute2-next,v2,2/2] bpf: increase verifier verbosity when in verbose mode
    https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=892a33ac1bd6

You are awesome, thank you!