Skip to content

bpf: add _impl suffix for kfuncs with implicit args

Mykyta Yatsenko bpf 3 versions – Applied

Status from this message: This series was applied to bpf/bpf.git (master)

Get series with b4
b4 am [email protected] change-id 20251104-implv2-d6c4be255026

Versions newest first

  1. v3 Latest2 patches 1 replyApplied 2/2
  2. v22 patches 6 repliesSuperseded inferred link
  3. v11 patch 0 repliesSuperseded

Changes in v3 from the cover letter

- Fix commit messages
- Link to v2: https://lore.kernel.org/r/[email protected]

Patches in v3 All 2 applied

#Subject and filesSizeRepliesApplied
1/2bpf:add _impl suffix for bpf_task_work_schedule* kfuncskernel/bpf/helpers.c kernel/bpf/verifier.c tools/testing/selftests/bpf/progs/task_work.c +2 more+29 -250 repliesApplied
2/2bpf: add _impl suffix for bpf_stream_vprintk() kfunckernel/bpf/helpers.c kernel/bpf/stream.c tools/bpf/bpftool/Documentation/bpftool-prog.rst +2 more+21 -200 repliesApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAndrii NakryikoIhor Solodrai
SeriesA-b
1/2A-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH bpf v3 0/2] bpf: add _impl suffix for kfuncs with implicit args

We have established a pattern of function naming win "_impl" suffix; those functions accept verifier-provided bpf_prog_aux argument. Following uniform convention will allow for transparent backwards compatibility with the upcoming KF_IMPLICIT_ARGS feature. This patch set aims to fix current deviation from the convention to eliminate unnecessary backwards incompatibility in the future.

Three kfuncs added in 6.18 don’t follow this *_impl convention and therefore won’t participate in the new KF_IMPLICIT_ARGS mechanism:
* bpf_task_work_schedule_resume()
* bpf_task_work_schedule_signal()
* bpf_stream_vprintk()

Rename them to align with the implicit-arg flow:
bpf_task_work_schedule_resume() -> bpf_task_work_schedule_resume_impl() bpf_task_work_schedule_signal() -> bpf_task_work_schedule_signal_impl() bpf_stream_vprintk() -> bpf_stream_vprintk_impl()

The KF_IMPLICIT_ARGS mechanism is not in tree yet, so callers must switch to the *_impl names for now. Once the new mechanism lands, the plain names (without _impl) will be reintroduced.

---
Changes in v3:
- Fix commit messages
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v1:
- Split commit into 2
- Rebase on the correct branch
- Link to v1: https://lore.kernel.org/all/[email protected]/

---
Mykyta Yatsenko (2):
bpf:add _impl suffix for bpf_task_work_schedule* kfuncs
bpf: add _impl suffix for bpf_stream_vprintk() kfunc

 kernel/bpf/helpers.c                               | 26 +++++++++++---------
 kernel/bpf/stream.c                                |  3 ++-
 kernel/bpf/verifier.c                              | 12 +++++-----
 tools/bpf/bpftool/Documentation/bpftool-prog.rst   |  2 +-
 tools/lib/bpf/bpf_helpers.h                        | 28 +++++++++++-----------
 tools/testing/selftests/bpf/progs/stream_fail.c    |  6 ++---
 tools/testing/selftests/bpf/progs/task_work.c      |  6 ++---
 tools/testing/selftests/bpf/progs/task_work_fail.c |  8 +++----
 .../testing/selftests/bpf/progs/task_work_stress.c |  4 ++--
 9 files changed, 50 insertions(+), 45 deletions(-)

---
base-commit: 6146a0f1dfae5d37442a9ddcba012add260bceb0
change-id: 20251104-implv2-d6c4be255026

Best regards,

Signature · 1 line
Mykyta Yatsenko <[email protected]>