linux-stable/tools
Yinjun Zhang edc21dc909 bpftool: Fix the error when lookup in no-btf maps
When reworking btf__get_from_id() in commit a19f93cfaf the error
handling when calling bpf_btf_get_fd_by_id() changed. Before the rework
if bpf_btf_get_fd_by_id() failed the error would not be propagated to
callers of btf__get_from_id(), after the rework it is. This lead to a
change in behavior in print_key_value() that now prints an error when
trying to lookup keys in maps with no btf available.

Fix this by following the way used in dumping maps to allow to look up
keys in no-btf maps, by which it decides whether and where to get the
btf info according to the btf value type.

Fixes: a19f93cfaf ("libbpf: Add internal helper to load BTF data by FD")
Signed-off-by: Yinjun Zhang <yinjun.zhang@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/bpf/1644249625-22479-1-git-send-email-yinjun.zhang@corigine.com
2022-02-15 09:03:40 -08:00
..
accounting delayacct: track delays from memory compact 2022-01-20 08:52:55 +02:00
arch Two larger x86 series: 2022-01-28 19:00:26 +02:00
bootconfig
bpf bpftool: Fix the error when lookup in no-btf maps 2022-02-15 09:03:40 -08:00
build Merge remote-tracking branch 'torvalds/master' into perf/core 2022-01-13 10:20:59 -03:00
cgroup
counter
debugging
edid
firewire
firmware
gpio
hv
iio iio: event_monitor: Flush output on event 2021-12-16 12:20:35 +00:00
include Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2022-02-09 18:40:56 -08:00
io_uring
kvm/kvm_stat
laptop
leds
lib libbpf: Use dynamically allocated buffer when receiving netlink messages 2022-02-12 07:57:44 -08:00
memory-model tools/memory-model: litmus: Add two tests for unlock(A)+lock(B) ordering 2021-11-30 17:47:08 -08:00
objtool Merge branch 'signal-for-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2022-01-17 05:49:30 +02:00
pci
pcmcia
perf Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2022-02-09 18:40:56 -08:00
power More ACPI updates for 5.17-rc1 2022-01-18 08:51:51 +02:00
rcu
scripts tools: Ignore errors from `which' when searching a GCC toolchain 2022-02-01 23:04:12 +01:00
spi
testing selftest/bpf: Check invalid length in test_xdp_update_frags 2022-02-10 17:48:30 -08:00
thermal/tmon thermal: tools: tmon: remove unneeded local variable 2021-11-24 17:26:13 +01:00
time
tracing tools/tracing: Update Makefile to build rtla 2022-01-27 19:15:47 -05:00
usb
virtio
vm
wmi
Makefile