aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorAlan Maguire <[email protected]>2021-07-16 23:46:55 +0100
committerAndrii Nakryiko <[email protected]>2021-07-16 17:24:55 -0700
commit8d44c3578b48d5f605eddcfd6a644e3944455a6b (patch)
treeffbd29e58a926dec56fb62ca483932521f15f2dc /tools/perf/scripts/python/bin
parent068dfc655b666b54e08fc3d7108b309d7f906d34 (diff)
libbpf: Clarify/fix unaligned data issues for btf typed dump
If data is packed, data structures can store it outside of usual boundaries. For example a 4-byte int can be stored on a unaligned boundary in a case like this: struct s { char f1; int f2; } __attribute((packed)); ...the int is stored at an offset of one byte. Some platforms have problems dereferencing data that is not aligned with its size, and code exists to handle most cases of this for BTF typed data display. However pointer display was missed, and a simple function to test if "ptr_is_aligned(data, data_sz)" would help clarify this code. Suggested-by: Andrii Nakryiko <[email protected]> Signed-off-by: Alan Maguire <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions