diff options
author | Andrii Nakryiko <andriin@fb.com> | 2019-03-01 02:31:24 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-03-01 03:31:48 +0300 |
commit | 91097fbee4c025ac72f91ae41feba3a822cc1316 (patch) | |
tree | 3e1fb0359be566403120bd51df1e921c3b217d83 /Documentation/xilinx | |
parent | 51edf5f6e015c48b62e24ab2fbcad8885ca1c74e (diff) | |
download | linux-91097fbee4c025ac72f91ae41feba3a822cc1316.tar.xz |
btf: fix bug with resolving STRUCT/UNION into corresponding FWD
When checking available canonical candidates for struct/union algorithm
utilizes btf_dedup_is_equiv to determine if candidate is suitable. This
check is not enough when candidate is corresponding FWD for that
struct/union, because according to equivalence logic they are
equivalent. When it so happens that FWD and STRUCT/UNION end in hashing
to the same bucket, it's possible to create remapping loop from FWD to
STRUCT and STRUCT to same FWD, which will cause btf_dedup() to loop
forever.
This patch fixes the issue by additionally checking that type and
canonical candidate are strictly equal (utilizing btf_equal_struct).
Fixes: d5caef5b5655 ("btf: add BTF types deduplication algorithm")
Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Acked-by: Song Liu <songliubraving@fb.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'Documentation/xilinx')
0 files changed, 0 insertions, 0 deletions