summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2023-05-08 23:55:02 -0700
committerAlexei Starovoitov <ast@kernel.org>2023-05-12 12:05:21 -0700
commitbdeeed3498c7871c17465bb4f11d1bc67f9098af (patch)
treeb221e4b559bc7a642dd03266074cdb91ecdabbd7 /tools/perf/scripts/python/export-to-postgresql.py
parentee9fd0ac3017c4313be91a220a9ac4c99dde7ad4 (diff)
libbpf: fix offsetof() and container_of() to work with CO-RE
It seems like __builtin_offset() doesn't preserve CO-RE field relocations properly. So if offsetof() macro is defined through __builtin_offset(), CO-RE-enabled BPF code using container_of() will be subtly and silently broken. To avoid this problem, redefine offsetof() and container_of() in the form that works with CO-RE relocations more reliably. Fixes: 5fbc220862fc ("tools/libpf: Add offsetof/container_of macro in bpf_helpers.h") Reported-by: Lennart Poettering <lennart@poettering.net> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Yonghong Song <yhs@fb.com> Link: https://lore.kernel.org/r/20230509065502.2306180-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions