Re: [PATCH bpf-next v1 0/4] libbpf: Support kernel-side kfunc flavors

From: Ihor Solodrai

Date: Wed Nov 18 2026 - 18:14:26 EST


On 2026-11-18 3:11 p.m., Eduard Zingerman wrote:
On Wed, 2026-11-18 at 14:37 -0700, Ihor Solodrai wrote:
On 2026-11-18 2:12 p.m., Eduard Zingerman wrote:
On Tue, 2026-11-17 at 12:21 -0700, Ihor Solodrai wrote:
An incompatible change to a kfunc's prototype, such as an added
parameter, breaks BPF programs built against the old one. libbpf
ignores the ___<flavor> suffix of a kfunc declared in a BPF program,
but makes an exact name look up on the kernel side, so the kernel
can't keep the old prototype available under the kfunc's name.

sched_ext ran into this. cded46d97159 ("sched_ext: Make
scx_bpf_dsq_insert*() return bool") kept the old prototype as
scx_bpf_dsq_insert___compat, expecting libbpf to bind old binaries to
it, and broke them. 2dbbdeda77a6 ("sched_ext: Fix scx_bpf_dsq_insert()
backward binary compatibility") reversed the naming. A ___v2 kfunc
declared as vmlinux.h spells it doesn't bind: 56bbc91219c0
("sched_ext: Fix scx_bpf_dsq_move_to_local___v2 compat detection")
fixed a compat macro that silently dropped enq_flags because of this.

Please prefer examples to prose in cover letters.

The sched_ext story above narrates the commit history to illustrate
the motivation for the feature.  Would you like to see code samples
from there, or are you suggesting to drop the paragraph?

The documentation patch includes code examples of the new binding
rules, I didn't want to duplicate that in the cover.

There are two ways to act while reading the above paragraph:
- follow the referenced commits and reconstruct the issue (time consuming).
- ignore it (not helpful).

sigh... There are more:

- Read the paragraph to understand the issue on the high level,
without loading the entirety of the details into your head.
Example interpretation:
- sched-ext had a problem with scx_bpf_dsq_insert() changing the
return type, which led to reverts and inconvenient hacks
- Give the paragraph to your helpful assistant and ask it exact
questions that interest you. Since the paragraph has commit hashes,
it's trivial for ai to navigate this.

And other approaches in between. It all depends on how deeply do you
want/need to understand the specific thing.


Also, please de-Claude the included prose.

Please be more specific. Which "included prose"?

sched_ext ran into this. cded46d97159 ... kept the old prototype as
scx_bpf_dsq_insert___compat, expecting libbpf to bind old binaries to
it, and broke them. 2dbbdeda77a6 ... reversed the naming. A ___v2
kfunc declared as vmlinux.h spells it doesn't bind: 56bbc91219c0 ...
fixed a compat macro that silently dropped enq_flags because of this.

This screams Claude from 1000 miles distance.

Sure. So what? Have you read the bpf list lately?
(I also use Codex and Muse btw, not only Claude)

AI-generated prose is not a bad thing by itself. It can be no less
useful than human-written prose. Yes there is a wide spectrum of
slopiness, and submitters need to know what they are posting.

Personally, I try to be careful about commit messages and cover
letters. I iterate on them multiple times with AI, then I read them
and edit by hand. If I posted the first generated thing it would look
much worse.

Look around on the list. Do you think this paragraph is the worst slop
cover letter compared to things that have been landed already?

I'm a little annoyed by your comment, because the slop filter you are
applying now is not applied uniformly on the list. It's not fair.

I would write the cover entirely by hand if that was a strict rule
here, because I respect the rules. But it's not.

Maybe I have reading comprehension issues, but in order to decipher it
one has to:
- "kept old prototype" - figure out that two functions were declared
"scx_bpf_dsq_insert" and "scx_bpf_dsq_insert___compat"
- "bind old binaries to it and broke them" - figure out that existing
bpf programs referred to "scx_bpf_dsq_insert" and libbpf mechanics
didn't work as expected.
- "reversed the naming" - like a new function became ___compat or what
happened?
- "A ___v2 kfunc declared as vmlinux.h spells it ..."
Now there is a ___v2 in the picture.
- "... doesn't bind" - figure out that this refers to libbpf mechanics.
- "fixed a compat macro that silently dropped enq_flags because of this."
Incomprehensible w/o looking in the code.

Your reading is a valid approach to understand the history in more
details, and you are correct that the paragraph does not provide them.

However IMO those details are unnecessary in the cover, but pointers
are useful. Which is why I left this ai-generated paragraph be.

It's a minor issue, however. I'm happy to drop the paragraph, I just
disagree that "it screams Claude" is a valid reason.



[...]