linux-stable/tools
Andrii Nakryiko 9ec71c1cdb libbpf: fix btf_dedup equivalence check handling of different kinds
btf_dedup_is_equiv() used to compare btf_type->info fields, before doing
kind-specific equivalence check. This comparsion implicitly verified
that candidate and canonical types are of the same kind. With enum fwd
resolution logic this check couldn't be done generically anymore, as for
enums info contains vlen, which differs between enum fwd and
fully-defined enum, so this check was subsumed by kind-specific
equivalence checks.

This change caused btf_dedup_is_equiv() to let through VOID vs other
types check to reach switch, which was never meant to be handing VOID
kind, as VOID kind is always pre-resolved to itself and is only
equivalent to itself, which is checked early in btf_dedup_is_equiv().

This change adds back BTF kind equality check in place of more generic
btf_type->info check, still defering further kind-specific checks to
a per-kind switch.

Fixes: 9768095ba9 ("btf: resolve enum fwds in btf_dedup")
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2019-03-27 08:01:24 -07:00
..
accounting
arch Merge branch 'fixes' into next 2019-02-19 19:56:26 +11:00
bpf tools: libbpf: add a correctly named define for map iteration 2019-03-01 00:53:45 +01:00
build tools build feature sched_getcpu: Undef _GNU_SOURCE at the end 2019-02-14 15:39:21 -03:00
cgroup
crypto
debugging tools: add a kernel-chktaint to tools/debugging 2019-01-08 16:29:52 -07:00
firewire
firmware tools/firmware/ihex2fw: Replace explicit alignment with ALIGN 2019-01-22 10:23:18 +01:00
gpio tools gpio: Allow overriding CFLAGS 2018-12-28 16:33:08 -03:00
hv
iio Merge 5.0-rc6 into staging-next 2019-02-11 09:25:01 +01:00
include Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf 2019-03-16 12:20:08 -07:00
io_uring io_uring: add a few test tools 2019-03-06 13:00:16 -07:00
kvm/kvm_stat
laptop
leds
lib libbpf: fix btf_dedup equivalence check handling of different kinds 2019-03-27 08:01:24 -07:00
memory-model tools/memory-model: Make scripts take "-j" abbreviation for "--jobs" 2019-01-21 11:07:04 +01:00
nfsd
objtool
pci
pcmcia
perf Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-03-10 15:22:03 -07:00
power Additional power management updates for 5.1-rc1 2019-03-14 10:30:06 -07:00
scripts
spi
testing selftests/bpf: test case for invalid call stack in dead code 2019-03-26 13:02:16 -07:00
thermal/tmon tools thermal tmon: Use -O3 instead of -O1 if available 2019-01-04 12:54:49 -03:00
time
usb
virtio virtio: fix test build after uio.h change 2018-12-19 18:23:49 -05:00
vm tools/vm/slabinfo: clean up usage menu debug items 2019-03-05 21:07:20 -08:00
wmi
Makefile Merge branch 'thorsten' into docs-next 2019-01-08 16:38:36 -07:00