]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Fix struct end padding in btf_dump
authorAndrii Nakryiko <andriin@fb.com>
Tue, 8 Oct 2019 23:10:06 +0000 (16:10 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 9 Oct 2019 22:38:36 +0000 (15:38 -0700)
commit4141dac754c706f05feb2bf76927562ae7b7dcc4
tree0877eb73842f3aa868f7cf801ab04e4911f4868c
parent097d5b5d20a11974d4294a04814ffc50bdc6d4cc
libbpf: Fix struct end padding in btf_dump

Fix a case where explicit padding at the end of a struct is necessary
due to non-standart alignment requirements of fields (which BTF doesn't
capture explicitly).

Fixes: b653ca9bf78a ("libbpf: add btf_dump API for BTF-to-C conversion")
Reported-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Tested-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20191008231009.2991130-2-andriin@fb.com
tools/lib/bpf/btf_dump.c