Can eBPF programs call kfuncs of out-of-tree modules?
Hello.
Recently we found that eBPF can call kernel functions, but we don’t know whether it is possible to call register_btf_kfunc_id_set in the out-of-tree module, and enable eBPF programs of types such as kprobe and tracepoint to call functions defined in out-of-tree modules.
Thanks in advance!
Yonghong Song
reviewerQuoted 3 lines · Shuyi Cheng
Hello.
Recently we found that eBPF can call kernel functions, but we don’t know whether it is possible to call
register_btf_kfunc_id_setin the out-of-tree module, and enable eBPF programs of types such as kprobe and tracepoint to call functions defined in out-of-tree modules.
Never tried but I think it is possible. register_btf_kfunc_id_set() can be used in modules.
btf.c:EXPORT_SYMBOL_GPL(register_btf_kfunc_id_set);
Quoted 3 lines
Thanks in advance!