Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

bpf: selftests: Fix fentry test kfunc prototypes

Some prototypes in progs/get_func_ip_test.c were not in line with how the
actual kfuncs are defined in net/bpf/test_run.c. This causes compilation
errors when kfunc prototypes are generated from BTF.

Fix by aligning with actual kfunc definitions.

Also remove two unused prototypes.

Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
Link: https://lore.kernel.org/r/1e68870e7626b7b9c6420e65076b307fc404a2f0.1718207789.git.dxu@dxuuu.xyz
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

authored by

Daniel Xu and committed by
Alexei Starovoitov
dff96e4f 718135f5

+3 -4
+3 -4
tools/testing/selftests/bpf/progs/get_func_ip_test.c
··· 5 5 6 6 char _license[] SEC("license") = "GPL"; 7 7 8 - extern const void bpf_fentry_test1 __ksym; 8 + extern int bpf_fentry_test1(int a) __ksym; 9 + extern int bpf_modify_return_test(int a, int *b) __ksym; 10 + 9 11 extern const void bpf_fentry_test2 __ksym; 10 12 extern const void bpf_fentry_test3 __ksym; 11 13 extern const void bpf_fentry_test4 __ksym; 12 - extern const void bpf_modify_return_test __ksym; 13 - extern const void bpf_fentry_test6 __ksym; 14 - extern const void bpf_fentry_test7 __ksym; 15 14 16 15 extern bool CONFIG_X86_KERNEL_IBT __kconfig __weak; 17 16