Conversation

Christian Brauner 🦊🐺

So we're all collectively fine to turn every single bpf kfunc into EXPORT_SYMBOL{_GPL}()?
https://lore.kernel.org/all/5b3433d942eaecdbcc92876c9ed8b7d17f7e1086.1744169424.git.dxu@dxuuu.xyz/

2
1
0

@brauner my impression of bpf people is the 'we' in your statement = them only lol

0
0
0

@brauner To be fair, Alexei did reply as well the other day saying he thinks that is too far. So I guess the answer is "no", from the bpf camp as well. Which is the right answer...

1
0
0

Neal Gompa (ニール・ゴンパ) fedora

@axboe @brauner Why would it be the right answer? BPF programs are being used to replace drivers, so I don't see why we wouldn't want the same licensing intent there too.

1
0
0
@Conan_Kudo @axboe @brauner Kfuncs are designed with the BPF verifier in mind. The verifier (it is hoped) ensures safe usage, that locks are released, resources returned, pointers used within bounds, etc. Exporting those kfuncs to ordinary modules shorts out that layer of protection, perhaps exposing things beyond what was intended. A move like that definitely needs to be thought through well, if it is done at all.
1
1
4

@corbet @axboe @Conan_Kudo I definitely don't want our helpers exposed to rando modules. They were exposed specifically for use by bpf (begrudingly at times), not for general consumption by everyone.

1
0
0

@brauner @corbet @axboe @Conan_Kudo Alexei's reply didn't seem emphatically opposed to the concept, and he mentions a 'modular' verifier which seems vaguely concerning.

But I am no expert so that could be benign and modular in an internal sense rather than 'exposing as a module'.

But I suppose the important thing is this patch isn't going ahead, just not sure if the perceived reasons for not doing so are quite aligned with yours here (maybe they are? Maybe not? Guess just not clear).

1
0
0

Neal Gompa (ニール・ゴンパ) fedora

@ljs @brauner @corbet @axboe So I misunderstood here. I thought it was already agreed everything was going to be exported. My stance is that if everything is going to be exported, I want it to be tagged for GPL-only stuff.

1
0
0

@Conan_Kudo @ljs @brauner @corbet Oh I see - the objection is for the exports, not the fact that they are GPL exports. For the latter, no new non-GPL exports should be added in general, ever (imho).

1
0
1

Neal Gompa (ニール・ゴンパ) fedora

@axboe @ljs @brauner @corbet For what it's worth, I don't think any of this should be exported *ever*. 😢

0
0
0