selftests/bpf: align kfuncs renamed in bpf tree
Subsystems (3)
PATCH 1/1 selftests/bpf: align kfuncs renamed in bpf tree
From: Mykyta Yatsenko <[email protected]>
bpf_task_work_schedule_resume() and bpf_task_work_schedule_signal() have been renamed in bpf tree to bpf_task_work_schedule_resume_impl() and bpf_task_work_schedule_signal_impl() accordingly.
There are few uses of these kfuncs in selftests that are not in bpf tree, so that when we port [1] into bpf-next, those BPF programs will not compile.
This patch aligns those remaining callsites with the kfunc renaming. It should go on top of [1] when applying on bpf-next.
---
1: https://lore.kernel.org/all/[email protected]/
--- tools/testing/selftests/bpf/progs/file_reader.c | 2 +- tools/testing/selftests/bpf/progs/verifier_async_cb_context.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
tools/testing/selftests/bpf/progs/file_reader.c +1 -1
@@ -77,7 +77,7 @@ int on_open_validate_file_read(void *c) err =1 ;return 0 ; } -bpf_task_work_schedule_signal (task, &work->tw, &arrmap, task_work_callback,NULL ); +bpf_task_work_schedule_signal_impl (task, &work->tw, &arrmap, task_work_callback,NULL );return 0 ; }
tools/testing/selftests/bpf/progs/verifier_async_cb_context.c +2 -2
@@ -156,7 +156,7 @@ int task_work_non_sleepable_prog(void *ctx)if (!task)return 0 ; -bpf_task_work_schedule_resume (task, &val->tw, &task_work_map, task_work_cb,NULL ); +bpf_task_work_schedule_resume_impl (task, &val->tw, &task_work_map, task_work_cb,NULL );return 0 ; }
@@ -176,6 +176,6 @@ int task_work_sleepable_prog(void *ctx)if (!task)return 0 ; -bpf_task_work_schedule_resume (task, &val->tw, &task_work_map, task_work_cb,NULL ); +bpf_task_work_schedule_resume_impl (task, &val->tw, &task_work_map, task_work_cb,NULL );return 0 ; }
Signature · 1 line
2.51.1
[email protected]
AI reviewAre the _impl kfuncs defined in this tree? A search of kernel/bpf/helpers.c shows only bpf_task_work_schedule_signal() at line 4286 and bpf_task_work_schedule_resume() at line 4303, without the…
tools/testing/selftests/bpf/progs/file_reader.c int on_open_validate_file_read(void *c) · line 80
Quoted 10 lines
tools/testing/selftests/bpf/progs/file_reader.c +1
-1@@ -77,7 +77,7 @@ int on_open_validate_file_read(void *c) err =1 ;return 0 ; } -bpf_task_work_schedule_signal (task, &work->tw, &arrmap, task_work_callback,NULL ); +bpf_task_work_schedule_signal_impl (task, &work->tw, &arrmap, task_work_callback,NULL );
^^^^
Are the _impl kfuncs defined in this tree? A search of kernel/bpf/helpers.c shows only bpf_task_work_schedule_signal() at line 4286 and bpf_task_work_schedule_resume() at line 4303, without the _impl suffix.
The commit message says "It should go on top of [1] when applying on bpf-next", suggesting this patch depends on another patch that hasn't been applied yet. Without the dependency, these BPF programs will fail verification when the verifier cannot find the _impl kfunc declarations.
tools/testing/selftests/bpf/progs/verifier_async_cb_context.c int task_work_non_sleepable_prog(void *ctx) · line 159
Quoted 13 lines
tools/testing/selftests/bpf/progs/file_reader.c +0
-0return 0 ; }tools/testing/selftests/bpf/progs/verifier_async_cb_context.c +1
-1@@ -156,7 +156,7 @@ int task_work_non_sleepable_prog(void *ctx)if (!task)return 0 ; -bpf_task_work_schedule_resume (task, &val->tw, &task_work_map, task_work_cb,NULL ); +bpf_task_work_schedule_resume_impl (task, &val->tw, &task_work_map, task_work_cb,NULL );
^^^^
Same issue here in task_work_non_sleepable_prog() and also at the next call site below in task_work_sleepable_prog().
tools/testing/selftests/bpf/progs/verifier_async_cb_context.c int task_work_sleepable_prog(void *ctx) · line 181
Quoted 11 lines
tools/testing/selftests/bpf/progs/verifier_async_cb_context.c +1
-1return 0 ; }@@ -176,6 +176,6 @@ int task_work_sleepable_prog(void *ctx)if (!task)return 0 ; -bpf_task_work_schedule_resume (task, &val->tw, &task_work_map, task_work_cb,NULL ); +bpf_task_work_schedule_resume_impl (task, &val->tw, &task_work_map, task_work_cb,NULL );return 0 ; }
---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md
CI run summary: https://github.com/kernel-patches/bpf/actions/runs/19103767001
This patch was applied to bpf/bpf-next.git (master) by Alexei Starovoitov <[email protected]>:
Hello:
This patch was applied to bpf/bpf-next.git (master) by Alexei Starovoitov <[email protected]>:
Quoted 11 lines · On Wed, 5 Nov 2025 13:21:05 +0000 you wrote:
From: Mykyta Yatsenko <[email protected]>
bpf_task_work_schedule_resume()andbpf_task_work_schedule_signal()have been renamed in bpf tree tobpf_task_work_schedule_resume_impl()andbpf_task_work_schedule_signal_impl()accordingly.
There are few uses of these kfuncs in selftests that are not in bpf tree, so that when we port [1] into bpf-next, those BPF programs will not compile.
This patch aligns those remaining callsites with the kfunc renaming. It should go on top of [1] when applying on bpf-next.
Quoted 1 line
[...]
Here is the summary with links:
- [bpf-next,v1] selftests/bpf: align kfuncs renamed in bpf tree
https://git.kernel.org/bpf/bpf-next/c/a4d31f451d5b
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html