diff options
author | John Fastabend <[email protected]> | 2020-07-02 21:31:59 -0700 |
---|---|---|
committer | Daniel Borkmann <[email protected]> | 2020-07-03 23:20:40 +0200 |
commit | 8ae4121bd89e3dce27b519ed469efbc15423af18 (patch) | |
tree | 58e74e54cc6d21f7702c2f8a0179d2cb9facba79 /kernel/trace/trace_functions.c | |
parent | 046cc3dd9a2507b8e111714807ab8bf15ea5bb70 (diff) |
bpf: Fix bpftool without skeleton code enabled
Fix segfault from bpftool by adding emit_obj_refs_plain when skeleton
code is disabled.
Tested by deleting BUILD_BPF_SKELS in Makefile. We found this doing
backports for Cilium when a testing image pulled in latest bpf-next
bpftool, but kept using an older clang-7.
# ./bpftool prog show
Error: bpftool built without PID iterator support
3: cgroup_skb tag 7be49e3934a125ba gpl
loaded_at 2020-07-01T08:01:29-0700 uid 0
Segmentation fault
Fixes: d53dee3fe013 ("tools/bpftool: Show info for processes holding BPF map/prog/link/btf FDs")
Reported-by: Joe Stringer <[email protected]>
Signed-off-by: John Fastabend <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Yonghong Song <[email protected]>
Link: https://lore.kernel.org/bpf/159375071997.14984.17404504293832961401.stgit@john-XPS-13-9370
Diffstat (limited to 'kernel/trace/trace_functions.c')
0 files changed, 0 insertions, 0 deletions