Question about duplicated types in BTF and btf__dedup()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi. I found out that some of the BTF files provided by BTFHub contain
a lot of duplicated types definitions:

$ mkdir -p /tmp/foo
$ cd /tmp/foo/
$ wget https://github.com/aquasecurity/btfhub/raw/main/ubuntu/20.04/x86_64/5.4.0-88-generic.btf.tar.xz
$ tar -xf 5.4.0-88-generic.btf.tar.xz

$ bpftool btf dump file 5.4.0-88-generic.btf | grep "STRUCT 'dentry'"
[954] STRUCT 'dentry' size=192 vlen=16
[28359] STRUCT 'dentry' size=192 vlen=16

$ bpftool btf dump file 5.4.0-88-generic.btf | grep "STRUCT 'task_struct'"
[146] STRUCT 'task_struct' size=9216 vlen=213
[28317] STRUCT 'task_struct' size=9216 vlen=213

$ bpftool btf dump file 5.4.0-88-generic.btf | grep "STRUCT 'file'"
[640] STRUCT 'file' size=256 vlen=21
[28416] STRUCT 'file' size=256 vlen=21

I tried to use btf__dedup() but the result is just the same file. Is
this expected to have duplicated types in the BTF files? Why aren't
those types getting deduplicated by the algorithm?

btw, I also noted that the /sys/kernel/btf/vmlinux file contains
duplicated types in some kernels, so I don't think it's an issue
related to BTFHub.

Thanks
Mauricio.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux