android_kernel_motorola_sm6375/tools/lib
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Andrii Nakryiko 6a8a0da4d8 libbpf: Fix no-args func prototype BTF dumping syntax
[ Upstream commit 189f1a976e426011e6a5588f1d3ceedf71fe2965 ]

For all these years libbpf's BTF dumper has been emitting not strictly
valid syntax for function prototypes that have no input arguments.

Instead of `int (*blah)()` we should emit `int (*blah)(void)`.

This is not normally a problem, but it manifests when we get kfuncs in
vmlinux.h that have no input arguments. Due to compiler internal
specifics, we get no BTF information for such kfuncs, if they are not
declared with proper `(void)`.

The fix is trivial. We also need to adjust a few ancient tests that
happily assumed `()` is correct.

Fixes: 351131b51c ("libbpf: add btf_dump API for BTF-to-C conversion")
Reported-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Link: https://lore.kernel.org/bpf/20240712224442.282823-1-andrii@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-08-19 05:33:41 +02:00
..
api tools api fs: Make xxx__mountpoint() more scalable 2020-06-22 09:30:58 +02:00
bpf libbpf: Fix no-args func prototype BTF dumping syntax 2024-08-19 05:33:41 +02:00
lockdep
subcmd libsubcmd: Fix parse-options memory leak 2024-06-16 13:28:43 +02:00
symbol
traceevent tools lib traceevent: Fix memory leak in process_dynamic_array_len 2020-08-11 15:33:38 +02:00
argv_split.c
bitmap.c
ctype.c
find_bit.c
hweight.c
rbtree.c
str_error_r.c
string.c
vsprintf.c
zalloc.c