aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorKP Singh <[email protected]>2021-03-19 19:21:17 +0000
committerAndrii Nakryiko <[email protected]>2021-03-19 14:03:39 -0700
commitea24b19562fe5f72c78319dbb347b701818956d9 (patch)
treec39ed23a8cfb3e93c7bc0d51c717512450bb9e51 /tools/perf/scripts/python
parent6d8b271682e2e0ff6a793c76803a5506b5535a5a (diff)
libbpf: Add explicit padding to btf_dump_emit_type_decl_opts
Similar to https://lore.kernel.org/bpf/[email protected]/ When DECLARE_LIBBPF_OPTS is used with inline field initialization, e.g: DECLARE_LIBBPF_OPTS(btf_dump_emit_type_decl_opts, opts, .field_name = var_ident, .indent_level = 2, .strip_mods = strip_mods, ); and compiled in debug mode, the compiler generates code which leaves the padding uninitialized and triggers errors within libbpf APIs which require strict zero initialization of OPTS structs. Adding anonymous padding field fixes the issue. Fixes: 9f81654eebe8 ("libbpf: Expose BTF-to-C type declaration emitting API") Suggested-by: Andrii Nakryiko <[email protected]> Signed-off-by: KP Singh <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions