Re: Which is oldest linux kernel version that can support BTF? #bcc
On Sun, Feb 28, 2021 at 12:37 PM <bg.salunke09@...> wrote:
/sys/kernel/btf/vmlinux appeared in 5.4 kernel (upstream version). If
you see it on 4.18, that means someone backported the changes. But for
BPF CO-RE (which I assume is what you are referring to) to work,
kernel itself doesn't need to "support BTF", it just needs to have
.BTF data built-in inside its vmlinux binary image, and that image
needs to be in one of the supported locations (see ). Starting from
5.2 kernel CONFIG_DEBUG_INTO_BTF=y is supported with adds .BTF section
as part of the kernel build process.
But one could technically add .BTF by using pahole tool (part of
dwarves package) even before that, as long as vmlinux image contains
So in short, the easiest way is to get the latest kernel you can. But
with enough persistence and effort you can get kernel BTF embedded for
pretty much any kernel version.