Re: [PATCH bpf-next 2/2] bpf: treewide: Annotate BPF kfuncs in BTF

From
Daniel Xu <hidden>
Date
2024-01-05 02:38:11
Also in
bpf, cgroups, linux-input, linux-kselftest, linux-trace-kernel, lkml, netfilter-devel
Reply to
Daniel Xu, 2024-01-05
On Thu, Jan 04, 2024 at 06:17:50PM -0700, Daniel Xu wrote:
[...]
quoted
also given that we can have modules calling register_btf_kfunc_id_set,
should we just return error instead of the warn?
It looks like quite a few registrations go through late_initcall(),
in which error codes are thrown away. I'm looking at
init/main.c:do_initcall_level:

        for (fn = initcall_levels[level]; fn < initcall_levels[level+1]; fn++)
                do_one_initcall(initcall_from_entry(fn));

Higher level question: if out of tree module does not follow convention,
it would still make sense to WARN(), right?
Ah, I got what you meant now. I'd say returning error makes sense but
WARN() is also useful. I'll send v2 with both.

[...]
Thread (5 messages) 5 messages, 2 authors, last reply 2024-01-05
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help