Enabling vmlinux + btf & bpf

Using AWS EC2, ClearLinux AMI (latest).

Problem begins with this message when the host boots

[    0.146721] x86/mktme: No known encryption algorithm is supported: 0x0
libbpf: failed to find valid kernel BTF
libbpf: Error loading vmlinux BTF: -3
libbpf: failed to load object 'iterators_bpf'
libbpf: failed to load BPF skeleton 'iterators_bpf': -3
Failed load could be due to wrong endianness

So, I Google around.

  1. Make sure I have pahole installed
  2. Follow the ClearLinux Kernel Development Guide → recompile kernel-aws with CONFIG_DEBUG_INFO=y and CONFIG_DEBUG_INFO_BTF=y added to the config-fragment file
  3. Install new kernel RPM with rpm2cpio armen-linux-aws-5.15.75-351.x86_64.rpm | (cd /; cpio -i -d -u -v);
  4. Update bootloader, set the correct kernel, and reboot as per the Kernel Dev Guide
  5. Still seeing the same errors
  6. Cannot stat or find vmlinuxstat /sys/kernel/btf/vmlinux
  7. Install the rest of the generated rpm files from the kernel build make step with:
rpm -Uvhi armen-linux-aws-license-5.15.75-351.x86_64.rpm --nodeps
rpm -Uvhi armen-linux-aws-extra-5.15.75-351.x86_64.rpm --nodeps
rpm -Uvhi armen-linux-aws-dev-5.15.75-351.x86_64.rpm --nodeps
clr-boot-manager update
shutdown -r now

…Still no luck. Can someone help me understand how to get vmlinux + btf + libbpf working properly, please? :slightly_frowning_face: