On Wed, Aug 07, 2019 at 02:39:51PM -0700, Andrii Nakryiko wrote: > This patch implements the core logic for BPF CO-RE offsets relocations. > Every instruction that needs to be relocated has corresponding > bpf_offset_reloc as part of BTF.ext. Relocations are performed by trying > to match recorded "local" relocation spec against potentially many > compatible "target" types, creating corresponding spec. Details of the > algorithm are noted in corresponding comments in the code. > > Signed-off-by: Andrii Nakryiko <andriin@xxxxxx> > Acked-by: Song Liu <songliubraving@xxxxxx> ... > +static struct btf *bpf_core_find_kernel_btf(void) > +{ > + const char *locations[] = { > + "/lib/modules/%1$s/vmlinux-%1$s", > + "/usr/lib/modules/%1$s/kernel/vmlinux", > + }; the vmlinux finding logic didn't work out of the box for me. My vmlinux didn't have -`uname -r` suffix. Probably worth adding /boot/vmlinux-uname too. May be vmlinuz can have BTF as well? Overall looks great. Applied to bpf-next. Thanks!