Thread (34 messages) 34 messages, 4 authors, 2021-10-22

Re: [PATCH RFC bpf-next 00/10] bpf: CO-RE support in the kernel.

From: Lorenz Bauer <hidden>
Date: 2021-09-27 16:12:34

On Sat, 25 Sept 2021 at 00:13, Alexei Starovoitov
[off-list ref] wrote:
On Thu, Sep 23, 2021 at 12:33:58PM +0100, Lorenz Bauer wrote:
quoted
Some questions:
* How can this handle kernels that don't have built-in BTF? Not a
problem for myself, but some people have to deal with BTF-less distro
kernels by using pahole to generate external BTF from debug symbols.
Can we accommodate that?
I think so, but it probably should be done as a generic feature:
"populate kernel BTF".
When kernel wasn't compiled with BTF there could be a way to
populate it with such. Just like we do sys_bpf(BTF_LOAD)
for program's BTF we can allow populating vmlinux BTF this way.
Unlike builtin BTF it wouldn't be trusted for certain verifier assumptions,
but better than nothing and more convenient than specifying BTF file
on a side for every bpf prog load with traditional libbpf style.
From my POV we already have an API for external BTF (and I think
libbpf does too?) but would need a new API for "load kernel BTF".
Global state like this also doesn't work well for several individual
processes. Imagine multiple programs on the system trying to each
replace the kernel BTF, how would that work? Which one wins? Being
able to give my own fd for kernel BTF circumvents all those problems
and seems much cleaner to me.

Lorenz

-- 
Lorenz Bauer  |  Systems Engineer
6th Floor, County Hall/The Riverside Building, SE1 7PB, UK

www.cloudflare.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help