linux-next: build failure after merge of the bpf-next tree
Subsystems (5)
Hi all,
After merging the bpf-next tree, today's linux-next build (x86_64_perf) failed like this:
CC builtin-trace.o
builtin-trace.c: In function ‘syscall_arg__strtoul_btf_enum’:
builtin-trace.c:972:27: error: comparison of integer expressions of different signedness: ‘int’ and ‘__u32’ {aka ‘unsigned int’} [-Werror=sign-compare]
972 | for (int i = 0; i < btf_vlen(bt); ++i, ++be) {
| ^
CC util/btf.o
util/btf.c: In function ‘__btf_type__find_member_by_name’:
util/btf.c:19:43: error: comparison of integer expressions of different signedness: ‘int’ and ‘__u32’ {aka ‘unsigned int’} [-Werror=sign-compare]
19 | for (i = 0, m = btf_members(t); i < btf_vlen(t); i++, m++) {
| ^
Caused by commit
f7a6b9eaff3e ("bpf: Extend BTF UAPI vlen, kinds to use unused bits")
I've fixed it up like below, but please fix this in your tree as well.
Thanks,
Thierry
--- >8 ---
From 4689669414ed7de19a69803714bc04e96fd82618 Mon Sep 17 00:00:00 2001
From: Thierry Reding <[email protected]>
Date: Mon, 27 Apr 2026 12:32:06 +0200
Subject: [PATCH] perf: Fixup for btf_vlan() API change
--- tools/perf/builtin-trace.c | 2 +- tools/perf/util/btf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
tools/perf/builtin-trace.c +1 -1
@@ -969,7 +969,7 @@ static bool syscall_arg__strtoul_btf_enum(char *bf, size_t size, struct syscall_struct btf *btf = arg->trace->btf;struct btf_enum *be =btf_enum (bt); -for (int i =0 ; i <btf_vlen (bt); ++i, ++be) { +for (u32 i =0 ; i <btf_vlen (bt); ++i, ++be) {const char *name =btf__name_by_offset (btf, be->name_off);int max_len =max (size,strlen (name));
tools/perf/util/btf.c +1 -1
@@ -14,7 +14,7 @@ const struct btf_member *__btf_type__find_member_by_name(struct btf *btf, {const struct btf_type *t =btf__type_by_id (btf, type_id);const struct btf_member *m; -int i; +u32 i;for (i =0 , m =btf_members (t); i <btf_vlen (t); i++, m++) {const char *current_member_name =btf__name_by_offset (btf, m->name_off);
Signature · 2 lines
2.52.0 --- >8 ---
linux-next: build failure after merge of the bfp-next tree
Hi all,
After merging the bfp-next tree, today's linux-next build (x86_64 allmodconfig ) failed like this:
ERROR: modpost: "cnum64_umin" [drivers/net/ethernet/netronome/nfp/nfp.ko] undefined!
ERROR: modpost: "cnum64_umax" [drivers/net/ethernet/netronome/nfp/nfp.ko] undefined!
Caused by commit
b93f7180f0bc ("bpf: use accessor functions for bpf_reg_state min/max fields")
It looks like the issue here is that these new accessor functions are not exported symbols and therefore can't be used by a driver that is built as a module.
I've used the previous tree for today's linux-next.
Thanks,
Thierry
Re: linux-next: build failure after merge of the bfp-next tree
Quoted 8 lines · Thierry Reding
Hi all,
After merging the bfp-next tree, today's linux-next build (
x86_64allmodconfig ) failed like this:ERROR: modpost: "
cnum64_umin" [drivers/net/ethernet/netronome/nfp/nfp.ko] undefined!
ERROR: modpost: "cnum64_umax" [drivers/net/ethernet/netronome/nfp/nfp.ko] undefined!
Quoted 8 lines
Caused by commit
b93f7180f0bc("bpf: use accessor functions forbpf_reg_statemin/max fields")It looks like the issue here is that these new accessor functions are not exported symbols and therefore can't be used by a driver that is built as a module.
See [1] for a proposed fix; thanks for reporting this!
[1] https://lore.kernel.org/bpf/[email protected]/
Quoted 5 lines
I've used the previous tree for today's linux-next.
Thanks,
Thierry
Quoted 16 lines · Thierry Reding
Hi all,
After merging the bpf-next tree, today's linux-next build (
x86_64_perf) failed like this:CC builtin-trace.o
builtin-trace.c: In function ‘syscall_arg__strtoul_btf_enum’:
builtin-trace.c:972:27: error: comparison of integer expressions of different signedness: ‘int’ and ‘__u32’ {aka ‘unsigned int’} [-Werror=sign-compare]
972 | for (int i = 0; i <btf_vlen(bt); ++i, ++be) {
| ^
CCutil/btf.o
util/btf.c: In function ‘__btf_type__find_member_by_name’:
util/btf.c:19:43: error: comparison of integer expressions of different signedness: ‘int’ and ‘__u32’ {aka ‘unsigned int’} [-Werror=sign-compare]
19 | for (i = 0, m =btf_members(t); i <btf_vlen(t); i++, m++) {
| ^
Quoted 5 lines
Caused by commit
f7a6b9eaff3e("bpf: Extend BTF UAPI vlen, kinds to use unused bits")I've fixed it up like below, but please fix this in your tree as well.
Given that I later saw that the build broke due to the other change and I had to use the old bpf-next tree, this fixup is no longer in the tree but it should still be fixed so that bpf-next can be merged into linux- next again soon.
Thierry
Alan Maguire
Reviewed-byQuoted 25 lines · Thierry Reding
Hi all,
After merging the bpf-next tree, today's linux-next build (
x86_64_perf) failed like this:CC builtin-trace.o
builtin-trace.c: In function ‘syscall_arg__strtoul_btf_enum’:
builtin-trace.c:972:27: error: comparison of integer expressions of different signedness: ‘int’ and ‘__u32’ {aka ‘unsigned int’} [-Werror=sign-compare]
972 | for (int i = 0; i <btf_vlen(bt); ++i, ++be) {
| ^
CCutil/btf.o
util/btf.c: In function ‘__btf_type__find_member_by_name’:
util/btf.c:19:43: error: comparison of integer expressions of different signedness: ‘int’ and ‘__u32’ {aka ‘unsigned int’} [-Werror=sign-compare]
19 | for (i = 0, m =btf_members(t); i <btf_vlen(t); i++, m++) {
| ^Caused by commit
f7a6b9eaff3e("bpf: Extend BTF UAPI vlen, kinds to use unused bits")I've fixed it up like below, but please fix this in your tree as well.
Thanks,
Thierry
Quoted 7 lines
--- >8 ---
From4689669414ed7de19a69803714bc04e96fd82618Mon Sep 17 00:00:00 2001
From: Thierry Reding <[email protected]>
Date: Mon, 27 Apr 2026 12:32:06 +0200
Subject: [PATCH] perf: Fixup forbtf_vlan()API changeSigned-off-by Thierry Reding <[email protected]>
Thanks for the fix!
Quoted 31 lines
--- tools/perf/builtin-trace.c | 2 +- tools/perf/util/btf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)tools/perf/builtin-trace.c +1
-1@@ -969,7 +969,7 @@ static bool syscall_arg__strtoul_btf_enum(char *bf, size_t size, struct syscall_struct btf *btf = arg->trace->btf;struct btf_enum *be =btf_enum (bt); -for (int i =0 ; i <btf_vlen (bt); ++i, ++be) { +for (u32 i =0 ; i <btf_vlen (bt); ++i, ++be) {const char *name =btf__name_by_offset (btf, be->name_off);int max_len =max (size,strlen (name));tools/perf/util/btf.c +1
-1@@ -14,7 +14,7 @@ const struct btf_member *__btf_type__find_member_by_name(struct btf *btf, {const struct btf_type *t =btf__type_by_id (btf, type_id);const struct btf_member *m; -int i; +u32 i;for (i =0 , m =btf_members (t); i <btf_vlen (t); i++, m++) {const char *current_member_name =btf__name_by_offset (btf, m->name_off);
[email protected]
AI reviewSashiko AI review found 1 potential issue(s): - [Low] Incomplete adaptation to the btf_vlen() return type change. --
Sashiko AI review found 1 potential issue(s):
- [Low] Incomplete adaptation to the btf_vlen() return type change. --
commit 0212f8f14ef9fb92c19bf796baf0b7ea6478e094
Author: Thierry Reding <[email protected]>
linux-next: build failure after merge of the bpf-next tree
After merging the bpf-next tree, today's linux-next build (x86_64_perf) failed due to a sign-compare error. This patch fixes the build by changing loop variables to match the unsigned return type of btf_vlen().
tools/perf/builtin-trace.c static bool syscall_arg__strtoul_btf_enum(char *bf, size_t size, struct syscall_ · line 974
Quoted 12 lines
tools/perf/builtin-trace.c +1
-1@@ -969,7 +969,7 @@ static bool syscall_arg__strtoul_btf_enum(char *bf, size_t size, struct syscall_struct btf *btf = arg->trace->btf;struct btf_enum *be =btf_enum (bt); -for (int i =0 ; i <btf_vlen (bt); ++i, ++be) { +for (u32 i =0 ; i <btf_vlen (bt); ++i, ++be) {const char *name =btf__name_by_offset (btf, be->name_off);int max_len =max (size,strlen (name));
Should btf_enum_scnprintf() in the same file also be updated for consistency?
It appears the unsigned return value of btf_vlen() is implicitly cast to int there, masking the sign-compare warning:
tools/perf/builtin-trace.c:btf_enum_scnprintf() {
...
const int nr_entries = btf_vlen(type);
for (int i = 0; i < nr_entries; ++i, ++be) {
...
}Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1