Skip to content

Conversation

@kernel-patches-daemon-bpf
Copy link

Pull request for series with
subject: selftests/bpf: align kfuncs renamed in bpf tree
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1019881

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 4cb4897
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1019881
version: 1

@kernel-patches-review-bot
Copy link

commit 9b96a3888c6f15cc74ee80eeda0104a10acd1248
Author: Mykyta Yatsenko <[email protected]>

selftests/bpf: align kfuncs renamed in bpf tree

This patch renames calls to bpf_task_work_schedule_resume() and
bpf_task_work_schedule_signal() to their _impl variants in BPF
selftests. The commit message states this should be applied on top
of another patch that renames these kfuncs in the kernel.

> 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

In-Reply-To-Subject: selftests/bpf: align kfuncs renamed in bpf tree
CI run summary: https://github.com/kernel-patches/bpf/actions/runs/19103767001

@kernel-patches-daemon-bpf
Copy link
Author

Forwarding comment 3491322356 via email
In-Reply-To: [email protected]
Patch: https://patchwork.kernel.org/project/netdevbpf/patch/[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.
@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: b54a8e1
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1019881
version: 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants