Re: [PATCH bpf-next] libbpf: fix no-args func prototype BTF dumping syntax

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/12, Andrii Nakryiko wrote:
> 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.
> 
> Reported-by: Tejun Heo <tj@xxxxxxxxxx>
> Fixes: 351131b51c7a ("libbpf: add btf_dump API for BTF-to-C conversion")
> Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx>

Acked-by: Stanislav Fomichev <sdf@xxxxxxxxxxx>




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux