aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/cdns3/cdns3-trace.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <[email protected]>2024-05-06 17:13:33 -0700
committerMartin KaFai Lau <[email protected]>2024-05-07 16:21:59 -0700
commitc78420bafe7cf9ce14fa7ceb40ce62e1372e661d (patch)
tree5dee2aad44a0fc9a6254ff09125cf5aa4c8a1b39 /drivers/usb/cdns3/cdns3-trace.c
parent548c2ede0dc81cb8c86f3a72c1c63fe1c179cbfe (diff)
libbpf: improve early detection of doomed-to-fail BPF program loading
Extend libbpf's pre-load checks for BPF programs, detecting more typical conditions that are destinated to cause BPF program failure. This is an opportunity to provide more helpful and actionable error message to users, instead of potentially very confusing BPF verifier log and/or error. In this case, we detect struct_ops BPF program that was not referenced anywhere, but still attempted to be loaded (according to libbpf logic). Suggest that the program might need to be used in some struct_ops variable. User will get a message of the following kind: libbpf: prog 'test_1_forgotten': SEC("struct_ops") program isn't referenced anywhere, did you forget to use it? Suggested-by: Tejun Heo <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin KaFai Lau <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-trace.c')
0 files changed, 0 insertions, 0 deletions