* [regression] bpf_local_storage.c:785:60: error: ‘kvmalloc_array_node_noprof’ sizes specified with ‘sizeof’
@ 2024-07-01 20:56 Christian Kujau
2024-07-01 23:21 ` Jiri Olsa
0 siblings, 1 reply; 2+ messages in thread
From: Christian Kujau @ 2024-07-01 20:56 UTC (permalink / raw)
To: linux-kernel
Cc: Martin KaFai Lau, Alexei Starovoitov, Daniel Borkmann,
Andrii Nakryiko, Eduard Zingerman, Song Liu, Yonghong Song,
John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
regressions, patchwork-bot+netdevbpf, peter.ujfalusi
[-- Attachment #1: Type: text/plain, Size: 1405 bytes --]
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@intel.com/T/
--
BOFH excuse #424:
operation failed because: there is no message for this error (#1014)
[-- Attachment #2: Type: application/gzip, Size: 9149 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [regression] bpf_local_storage.c:785:60: error: ‘kvmalloc_array_node_noprof’ sizes specified with ‘sizeof’
2024-07-01 20:56 [regression] bpf_local_storage.c:785:60: error: ‘kvmalloc_array_node_noprof’ sizes specified with ‘sizeof’ Christian Kujau
@ 2024-07-01 23:21 ` Jiri Olsa
0 siblings, 0 replies; 2+ messages in thread
From: Jiri Olsa @ 2024-07-01 23:21 UTC (permalink / raw)
To: Christian Kujau, Daniel Borkmann
Cc: linux-kernel, Martin KaFai Lau, bpf, Alexei Starovoitov,
Andrii Nakryiko, Eduard Zingerman, Song Liu, Yonghong Song,
John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo,
regressions, patchwork-bot+netdevbpf, peter.ujfalusi
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@intel.com/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)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-01 23:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-01 20:56 [regression] bpf_local_storage.c:785:60: error: ‘kvmalloc_array_node_noprof’ sizes specified with ‘sizeof’ Christian Kujau
2024-07-01 23:21 ` Jiri Olsa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox