top | item 33790343

(no title)

kaeso | 3 years ago

Nice post @javierhonduco, really interesting read!

As you mention that you are looking into loosening the minimum kernel requirements, what is currently the primitive(s) that is dictating the minimum required version? And how do you plan to sidestep that?

discuss

order

javierhonduco|3 years ago

Thanks! :)

Good question! We are building atop the incredible job that the BPF community does. BPF is a restricted environment [0], among others, the stack size is very small, programs have to be proved to finish, and there's no access to arbitrary kernel function.

We've done most of the work to loosen the minimum required kernel, sorry if that wasn't clear. The minimum supported kernel is 4.18.

More context, for those interested:

In order to provide an API to interact with the rest of the kernel, we use BPF helpers, which are like a library (sorta "syscalls") functions that BPF programs can make.

Not every BPF helper is available in a given kernel. The BCC project has a comprehensive and up-to-date list of the different helpers and other features and their introductory commit [1].

The minimum kernel that we can support is then decided by the most modern helper or feature we use. In our case, the most modern features we require are:

- BPF tail calls: since 4.2

- BPF Type Format (BTF): since 4.18

[0]: https://www.kernel.org/doc/html/latest/bpf/bpf_design_QA.htm...

[1]: https://github.com/iovisor/bcc/blob/master/docs/kernel-versi...

tdullien|3 years ago

FWIW, the prodfiler.com agent has had no-symbol stack unwinding since summer 2021, and a minimum kernel version of 4.15 :-), and happens to have a lower footprint than the solution discussed here.