Skip to content

Conversation

@florianl
Copy link
Contributor

@florianl florianl commented Nov 1, 2025

Update versions accroding to https://kernel.org/ (on 2025-11-01).

@ti-mo
Copy link
Contributor

ti-mo commented Nov 3, 2025

@florianl Looks like torvalds/linux@b720903 added a dependency on xxd during selftest builds, would you be able to add it as a dependency in the builder?

@florianl
Copy link
Contributor Author

florianl commented Nov 3, 2025

Looks like, we have to create a dedicated PR for d8b4e39 first.

I will remove this commit from this PR once #85 landed.

@ti-mo ti-mo mentioned this pull request Nov 3, 2025
1 task
@ti-mo
Copy link
Contributor

ti-mo commented Nov 3, 2025

Gave this a rebase after merging #85.

@ti-mo
Copy link
Contributor

ti-mo commented Nov 3, 2025

6.18-rc3 selftests are failing to build:

#18 72.54 In file included from progs/stream.c:8:
#18 72.54 /usr/src/linux/tools/testing/selftests/bpf/bpf_arena_common.h:47:15: error: conflicting types for 'bpf_arena_alloc_pages'
#18 72.54    47 | void __arena* bpf_arena_alloc_pages(void *map, void __arena *addr, __u32 page_cnt,
#18 72.54       |               ^
#18 72.54 /usr/src/linux/tools/testing/selftests/bpf/tools/include/vmlinux.h:105176:14: note: previous declaration is here
#18 72.54  105176 | extern void *bpf_arena_alloc_pages(void *p__map, void *addr__ign, u32 page_cnt, int node_id, u64 flags) __weak __ksym;
#18 72.54         |              ^
#18 72.54 In file included from progs/stream.c:8:
#18 72.54 /usr/src/linux/tools/testing/selftests/bpf/bpf_arena_common.h:49:5: error: conflicting types for 'bpf_arena_reserve_pages'
#18 72.54    49 | int bpf_arena_reserve_pages(void *map, void __arena *addr, __u32 page_cnt) __ksym __weak;
#18 72.54       |     ^
#18 72.54 /usr/src/linux/tools/testing/selftests/bpf/tools/include/vmlinux.h:105178:12: note: previous declaration is here
#18 72.54  105178 | extern int bpf_arena_reserve_pages(void *p__map, void *ptr__ign, u32 page_cnt) __weak __ksym;
#18 72.54         |            ^
#18 72.54 In file included from progs/stream.c:8:
#18 72.54 /usr/src/linux/tools/testing/selftests/bpf/bpf_arena_common.h:50:6: error: conflicting types for 'bpf_arena_free_pages'
#18 72.54    50 | void bpf_arena_free_pages(void *map, void __arena *ptr, __u32 page_cnt) __ksym __weak;
#18 72.54       |      ^
#18 72.54 /usr/src/linux/tools/testing/selftests/bpf/tools/include/vmlinux.h:105177:13: note: previous declaration is here
#18 72.54  105177 | extern void bpf_arena_free_pages(void *p__map, void *ptr__ign, u32 page_cnt) __weak __ksym;
#18 72.54         |             ^
#18 72.54 3 errors generated.
#18 72.55 make: *** [Makefile:760: /usr/src/linux/tools/testing/selftests/bpf/stream.bpf.o] Error 1
#18 72.55 make: *** Waiting for unfinished jobs....
#18 73.03 make: Leaving directory '/usr/src/linux/tools/testing/selftests/bpf'
#18 ERROR: process "/bin/sh -c ccache -z;     ./build-selftests.sh &&     ccache -s" did not complete successfully: exit code: 2
------
 > [build-selftests 3/5] RUN --mount=type=cache,target=/ccache     ccache -z;     ./build-selftests.sh &&     ccache -s:
72.54 /usr/src/linux/tools/testing/selftests/bpf/bpf_arena_common.h:50:6: error: conflicting types for 'bpf_arena_free_pages'
72.54    50 | void bpf_arena_free_pages(void *map, void __arena *ptr, __u32 page_cnt) __ksym __weak;
72.54       |      ^
72.54 /usr/src/linux/tools/testing/selftests/bpf/tools/include/vmlinux.h:105177:13: note: previous declaration is here
72.54  105177 | extern void bpf_arena_free_pages(void *p__map, void *ptr__ign, u32 page_cnt) __weak __ksym;
72.54         |             ^
72.54 3 errors generated.

I've bumped to -rc4 but don't see any changes that could've fixed this; let's see if this one succeeds. It's usually better to skip rc's for this reason.

@florianl
Copy link
Contributor Author

florianl commented Nov 3, 2025

I see the issue with the rc. Should we set mainline to 6.17.7 and stable to 6.16.12?

@ti-mo
Copy link
Contributor

ti-mo commented Nov 3, 2025

Let's see if we can fix upstream, don't think we're in a big rush to get this merged.

Signed-off-by: Timo Beckers <timo@isovalent.com>
@dylandreimerink
Copy link
Member

Trying this again in the new year, see if we can build v6.18 now that its released

@ti-mo
Copy link
Contributor

ti-mo commented Jan 7, 2026

iirc I tried again with the 6.18 release but no luck, selftest builds were still broken. Maybe a later release fixed them.

1 similar comment
@ti-mo
Copy link
Contributor

ti-mo commented Jan 7, 2026

iirc I tried again with the 6.18 release but no luck, selftest builds were still broken. Maybe a later release fixed them.

@dylandreimerink
Copy link
Member

dylandreimerink commented Jan 7, 2026

iirc I tried again with the 6.18 release but no luck, selftest builds were still broken. Maybe a later release fixed them.

Yea. It aborted 6.19-RC4 as well, I will try this locally to see if its fixed now, then we can skip a version. If not, we may need to patch it or something. I would like a >=6.18 kernel to validate potential fixes for cilium/ebpf#1916

@dylandreimerink
Copy link
Member

dylandreimerink commented Jan 7, 2026

I believe I have got it now, at least locally these changes do the trick. Turns out that selftests on v6.18 and above require at least pahole 1.30 to avoid the type conflict. I also made some additional changes for v6.19.

Edit: not quite. No 5.10 starts to fail with a unresolved symbol filp_close link error. Locally this does not happen, so will have to try an fix in CI. Rolling back latest commit to see if its the pahole update or the additional configs.

Edit2: Seems to be related to the pahole update, it breaks even without the config changes. It goes wrong in the BTFIDS step. Now trying to see if using 1.31 instead of 1.30 fixes it. Otherwise we will have to come up with another plan. (what a day)

Since kernel v6.18-rc3, the selftests have been failing to build due to
conflicting types between the generated vmlinux.h and bpf_arena_common.h
file in the selftests. The fix for this turns out to be upgrading
pahole to 1.30.

Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
In kernel commit beb3c67297d92f9428484410cf79135d38d0aff3 and
86433db9325693561794ac8072732cda1167a1ac selftests were added that rely
on types only compiled in under these additional kernel configuration.

Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
@dylandreimerink
Copy link
Member

🥳 This seems to work. So pahole 1.31 is the key + additional config for >=v6.19

@dylandreimerink dylandreimerink requested a review from ti-mo January 7, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants