On Mon, Jul 01, 2024 at 10:56:22PM +0200, Christian Kujau wrote: > This has been brought up before along with a patch[0] but has not been > pushed to mainline: > > $ make allnoconfig > $ enable CONFIG_WERROR and CONFIG_BPF > $ make > [...] > kernel/bpf/bpf_local_storage.c: In function ‘bpf_local_storage_map_alloc’: > kernel/bpf/bpf_local_storage.c:785:60: error: ‘kvmalloc_array_node_noprof’ sizes specified with ‘sizeof’ in the earlier > argument and not in the later argument [-Werror=calloc-transposed-args] > 785 | smap->buckets = bpf_map_kvcalloc(&smap->map, sizeof(*smap->buckets), > | ^ > > I always compile kernels with CONFIG_WERROR=y and I'm surprised that this > has not been caught by any build bots yet (or I did not see those > reports), the help text even says "If in doubt, say Y", so I'm very > puzzled why almost nobody else would be affected by this. The compilation > error happens on a Fedora 40 laptop, with gcc 14.1.1 20240620 (Red Hat > 14.1.1-6) installed. > > The fix posted in [0] does fix the compilation errors, but maybe never > made it to the correct trees to be included upstream? We are already in > -rc6 and I fear that the next release will be shipped with that problem. > > Thanks, > Christian. > > [0] https://lore.kernel.org/bpf/363ad8d1-a2d2-4fca-b66a-3d838eb5def9@xxxxxxxxx/T/ hum.. it's in bpf-next and linux-next tree [1], but not sure it's on the way for next release.. Daniel? jirka [1] 6f130e4d4a5f bpf: Fix order of args in call to bpf_map_kvcalloc > -- > BOFH excuse #424: > > operation failed because: there is no message for this error (#1014)