Skip to content

bpf: fix a couple of missed btf_type_tag handling in libbpf

Yonghong Song bpf 1 version Applied

Status from this message: This series was applied to bpf/bpf-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesApplied 2/2

Patches in v1 All 2 applied

#Subject and filesSizeRepliesApplied
1/2libbpf: fix a couple of missed btf_type_tag handling in btf.ctools/lib/bpf/btf.c+2 -00 repliesApplied
2/2selftests/bpf: add a dedup selftest with equivalent structure typestools/testing/selftests/bpf/prog_tests/btf.c+26 -02 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH bpf-next 0/2] bpf: fix a couple of missed btf_type_tag handling in libbpf

Commit 2dc1e488e5cd ("libbpf: Support BTF_KIND_TYPE_TAG") added BTF_KIND_TYPE_TAG support. But BTF_KIND_TYPE_TAG is not handled properly in libbpf btf_dedup_is_equiv() which will cause pahole dedup failure if the kernel has the following hack:
#define __user __attribute__((btf_type_tag("user")))

Patch 1 fixed the issue and Patch 2 added a test for it.

Yonghong Song (2):
libbpf: fix a couple of missed btf_type_tag handling in btf.c selftests/bpf: add a dedup selftest with equivalent structure types

 tools/lib/bpf/btf.c                          |  2 ++
 tools/testing/selftests/bpf/prog_tests/btf.c | 26 ++++++++++++++++++++
 2 files changed, 28 insertions(+)
Signature · 1 line
2.30.2