BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next v1] selftests/bpf: align kfuncs renamed in bpf tree
@ 2025-11-05 13:21 Mykyta Yatsenko
  2025-11-05 13:57 ` bot+bpf-ci
  2025-11-15  2:01 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Mykyta Yatsenko @ 2025-11-05 13:21 UTC (permalink / raw)
  To: bpf, ast, andrii, daniel, kafai, kernel-team; +Cc: Mykyta Yatsenko

From: Mykyta Yatsenko <yatsenko@meta.com>

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/20251104-implv2-v3-0-4772b9ae0e06@meta.com/

Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com>
---
 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(-)

diff --git a/tools/testing/selftests/bpf/progs/file_reader.c b/tools/testing/selftests/bpf/progs/file_reader.c
index 166c3ac6957d..4d756b623557 100644
--- a/tools/testing/selftests/bpf/progs/file_reader.c
+++ b/tools/testing/selftests/bpf/progs/file_reader.c
@@ -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;
 }
 
diff --git a/tools/testing/selftests/bpf/progs/verifier_async_cb_context.c b/tools/testing/selftests/bpf/progs/verifier_async_cb_context.c
index 96ff6749168b..7efa9521105e 100644
--- a/tools/testing/selftests/bpf/progs/verifier_async_cb_context.c
+++ b/tools/testing/selftests/bpf/progs/verifier_async_cb_context.c
@@ -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;
 }
-- 
2.51.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH bpf-next v1] selftests/bpf: align kfuncs renamed in bpf tree
  2025-11-05 13:21 [PATCH bpf-next v1] selftests/bpf: align kfuncs renamed in bpf tree Mykyta Yatsenko
@ 2025-11-05 13:57 ` bot+bpf-ci
  2025-11-15  2:01 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: bot+bpf-ci @ 2025-11-05 13:57 UTC (permalink / raw)
  To: mykyta.yatsenko5, bpf, ast, andrii, daniel, kafai, kernel-team
  Cc: yatsenko, ast, andrii, daniel, martin.lau, eddyz87, yonghong.song,
	clm, ihor.solodrai

[-- Attachment #1: Type: text/plain, Size: 2411 bytes --]

> diff --git a/tools/testing/selftests/bpf/progs/file_reader.c b/tools/testing/selftests/bpf/progs/file_reader.c
> index 166c3ac69..4d756b623 100644
> --- a/tools/testing/selftests/bpf/progs/file_reader.c
> +++ b/tools/testing/selftests/bpf/progs/file_reader.c
> @@ -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.

>  	return 0;
>  }
>
> diff --git a/tools/testing/selftests/bpf/progs/verifier_async_cb_context.c b/tools/testing/selftests/bpf/progs/verifier_async_cb_context.c
> index 96ff67491..7efa95211 100644
> --- a/tools/testing/selftests/bpf/progs/verifier_async_cb_context.c
> +++ b/tools/testing/selftests/bpf/progs/verifier_async_cb_context.c
> @@ -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().

>  	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;
>  }


---
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH bpf-next v1] selftests/bpf: align kfuncs renamed in bpf tree
  2025-11-05 13:21 [PATCH bpf-next v1] selftests/bpf: align kfuncs renamed in bpf tree Mykyta Yatsenko
  2025-11-05 13:57 ` bot+bpf-ci
@ 2025-11-15  2:01 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-11-15  2:01 UTC (permalink / raw)
  To: Mykyta Yatsenko; +Cc: bpf, ast, andrii, daniel, kafai, kernel-team, yatsenko

Hello:

This patch was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@kernel.org>:

On Wed,  5 Nov 2025 13:21:05 +0000 you wrote:
> From: Mykyta Yatsenko <yatsenko@meta.com>
> 
> 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.
> 
> [...]

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-11-15  2:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-05 13:21 [PATCH bpf-next v1] selftests/bpf: align kfuncs renamed in bpf tree Mykyta Yatsenko
2025-11-05 13:57 ` bot+bpf-ci
2025-11-15  2:01 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox