* [linux-next] selftests/bpf fails to build
@ 2025-05-09 12:02 Venkat Rao Bagalkote
2025-05-09 12:10 ` Saket Kumar Bhaskar
0 siblings, 1 reply; 2+ messages in thread
From: Venkat Rao Bagalkote @ 2025-05-09 12:02 UTC (permalink / raw)
To: Saket Kumar Bhaskar, Hari Bathini, Madhavan Srinivasan, bpf, LKML,
Linux Next Mailing List
Hello,
I am observing selftests/bpf fails to build on the next-20250508 kernel.
Errors:
GEN
/root/linux-next/tools/testing/selftests/bpf/tools/build/bpftool/vmlinux.h
bpf_testmod.c:494:17: error: initialization of 'ssize_t (*)(struct file
*, struct kobject *, const struct bin_attribute *, char *, loff_t,
size_t)' {aka 'long int (*)(struct file *, struct kobject *, const
struct bin_attribute *, char *, long long int, long unsigned int)'}
from incompatible pointer type 'ssize_t (*)(struct file *, struct
kobject *, struct bin_attribute *, char *, loff_t, size_t)' {aka 'long
int (*)(struct file *, struct kobject *, struct bin_attribute *, char *,
long long int, long unsigned int)'} [-Wincompatible-pointer-types]
494 | .read = bpf_testmod_test_read,
| ^~~~~~~~~~~~~~~~~~~~~
bpf_testmod.c:494:17: note: (near initialization for
'bin_attr_bpf_testmod_file.read')
bpf_testmod.c:495:18: error: initialization of 'ssize_t (*)(struct file
*, struct kobject *, const struct bin_attribute *, char *, loff_t,
size_t)' {aka 'long int (*)(struct file *, struct kobject *, const
struct bin_attribute *, char *, long long int, long unsigned int)'}
from incompatible pointer type 'ssize_t (*)(struct file *, struct
kobject *, struct bin_attribute *, char *, loff_t, size_t)' {aka 'long
int (*)(struct file *, struct kobject *, struct bin_attribute *, char *,
long long int, long unsigned int)'} [-Wincompatible-pointer-types]
495 | .write = bpf_testmod_test_write,
| ^~~~~~~~~~~~~~~~~~~~~~
bpf_testmod.c:495:18: note: (near initialization for
'bin_attr_bpf_testmod_file.write')
make[4]: *** [/root/linux-next/scripts/Makefile.build:203:
bpf_testmod.o] Error 1
make[3]: *** [/root/linux-next/Makefile:2009: .] Error 2
make[2]: *** [Makefile:248: __sub-make] Error 2
make[1]: *** [Makefile:18: all] Error 2
make: *** [Makefile:282: test_kmods/bpf_testmod.ko] Error 2
make: *** Waiting for unfinished jobs...
If you happen to fix this, please add below tag.
Reported-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Regards,
Venkat.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [linux-next] selftests/bpf fails to build
2025-05-09 12:02 [linux-next] selftests/bpf fails to build Venkat Rao Bagalkote
@ 2025-05-09 12:10 ` Saket Kumar Bhaskar
0 siblings, 0 replies; 2+ messages in thread
From: Saket Kumar Bhaskar @ 2025-05-09 12:10 UTC (permalink / raw)
To: Venkat Rao Bagalkote
Cc: Hari Bathini, Madhavan Srinivasan, bpf, LKML,
Linux Next Mailing List
On Fri, May 09, 2025 at 05:32:51PM +0530, Venkat Rao Bagalkote wrote:
> Hello,
>
>
> I am observing selftests/bpf fails to build on the next-20250508 kernel.
>
>
> Errors:
>
>
> GEN
> /root/linux-next/tools/testing/selftests/bpf/tools/build/bpftool/vmlinux.h
> bpf_testmod.c:494:17: error: initialization of 'ssize_t (*)(struct file *,
> struct kobject *, const struct bin_attribute *, char *, loff_t, size_t)'
> {aka 'long int (*)(struct file *, struct kobject *, const struct
> bin_attribute *, char *, long long int, long unsigned int)'} from
> incompatible pointer type 'ssize_t (*)(struct file *, struct kobject *,
> struct bin_attribute *, char *, loff_t, size_t)' {aka 'long int (*)(struct
> file *, struct kobject *, struct bin_attribute *, char *, long long int,
> long unsigned int)'} [-Wincompatible-pointer-types]
> 494 | .read = bpf_testmod_test_read,
> | ^~~~~~~~~~~~~~~~~~~~~
> bpf_testmod.c:494:17: note: (near initialization for
> 'bin_attr_bpf_testmod_file.read')
> bpf_testmod.c:495:18: error: initialization of 'ssize_t (*)(struct file *,
> struct kobject *, const struct bin_attribute *, char *, loff_t, size_t)'
> {aka 'long int (*)(struct file *, struct kobject *, const struct
> bin_attribute *, char *, long long int, long unsigned int)'} from
> incompatible pointer type 'ssize_t (*)(struct file *, struct kobject *,
> struct bin_attribute *, char *, loff_t, size_t)' {aka 'long int (*)(struct
> file *, struct kobject *, struct bin_attribute *, char *, long long int,
> long unsigned int)'} [-Wincompatible-pointer-types]
> 495 | .write = bpf_testmod_test_write,
> | ^~~~~~~~~~~~~~~~~~~~~~
> bpf_testmod.c:495:18: note: (near initialization for
> 'bin_attr_bpf_testmod_file.write')
> make[4]: *** [/root/linux-next/scripts/Makefile.build:203: bpf_testmod.o]
> Error 1
> make[3]: *** [/root/linux-next/Makefile:2009: .] Error 2
> make[2]: *** [Makefile:248: __sub-make] Error 2
> make[1]: *** [Makefile:18: all] Error 2
> make: *** [Makefile:282: test_kmods/bpf_testmod.ko] Error 2
> make: *** Waiting for unfinished jobs...
>
>
> If you happen to fix this, please add below tag.
>
>
> Reported-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
>
>
>
> Regards,
>
> Venkat.
>
Hi Venkat, thanks for reporting this. This is due to Commit
97d06802d10a ("sysfs: constify bin_attribute argument of bin_attribute::read/write()")
that changed the required type for struct bin_attribute to const struct bin_attribute.
Will send out a patch to fix this, shortly.
Thanks,
Saket
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-05-09 12:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-09 12:02 [linux-next] selftests/bpf fails to build Venkat Rao Bagalkote
2025-05-09 12:10 ` Saket Kumar Bhaskar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).