Missing BTF file in Ubuntu ESM kernels

Bug #2038685 reported by Andres
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Undecided
Unassigned
Trusty
New
Undecided
Unassigned
Xenial
New
Undecided
Unassigned
Bionic
New
Undecided
Unassigned

Bug Description

This is a follow-up from: https://discourse.ubuntu.com/t/ask-us-anything-about-ubuntu-kernels/27664/142

Older Ubuntu distributions come with a kernel image that support eBPF but are not built with a BTF file published (/sys/kernel/btf/vmlinux). This BTF file is crucial when trying to run eBPF programs that were built with CO-RE in mind such that a program can be compiled once and run in any kernel (with some caveats) because the BPF loaders can use the BTF file to relocate addresses of kernel fields at load time for the currently running kernel. In the past I've used the debug symbols that Ubuntu publishes to create BTF files using `pahole` for these older kernels and then re-using that BTF file for any machine running that kernel. This is not ideal but I had managed to work around it.

However, on distributions that are under ESM (Ubuntu 16 + Ubuntu 18) there isn't a debug symbols repository from where to pull the debug symbols packages to build their respective BTF file and no BTF file is generated when the kernel is built. This essentially makes these ESM kernels incompatible with eBPF programs that run using CO-RE (which is more or less the norm nowadays). Based on my conversation on the discourse link above it seems like ideally these ESM kernels should be published with a BTF file.

P.S. I wasn't able to submit this through `ubuntu-bug linux` as it gave me an error saying `Problem in linux-image-4.15.0-218-generic This is not an official Ubuntu package. Please remove any third party package and try again`. I am not sure why it says that as this is a Ubuntu VM downloaded from the Ubuntu site, upgraded by doing `pro attach` and then updated to the latest ESM kernel.

---
ProblemType: Bug
ApportVersion: 2.20.9-0ubuntu7.29
Architecture: amd64
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CRDA: Error: command ['iw', 'reg', 'get'] failed with exit code 1: nl80211 not found.
CurrentDesktop: ubuntu:GNOME
DistroRelease: Ubuntu 18.04
InstallationDate: Installed on 2021-05-18 (870 days ago)
InstallationMedia: Ubuntu 18.04.5 LTS "Bionic Beaver" - Release amd64 (20200806.1)
Lsusb:
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 002 Device 004: ID 0e0f:0008 VMware, Inc.
 Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
 Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
 Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
MachineType: VMware, Inc. VMware Virtual Platform
Package: linux (not installed)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcFB:

ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.15.0-218-generic root=UUID=c6dbf1d0-3a95-4d98-a0f8-fdea28a5ffc9 ro find_preseed=/preseed.cfg auto noprompt priority=critical locale=en_US quiet
ProcVersionSignature: Ubuntu 4.15.0-218.229-generic 4.15.18
RelatedPackageVersions:
 linux-restricted-modules-4.15.0-218-generic N/A
 linux-backports-modules-4.15.0-218-generic N/A
 linux-firmware 1.173.21
RfKill:

Tags: bionic
Uname: Linux 4.15.0-218-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip docker kvm libvirt lpadmin plugdev sambashare sudo
_MarkForUpload: True
dmi.bios.date: 11/12/2020
dmi.bios.vendor: Phoenix Technologies LTD
dmi.bios.version: 6.00
dmi.board.name: 440BX Desktop Reference Platform
dmi.board.vendor: Intel Corporation
dmi.board.version: None
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 1
dmi.chassis.vendor: No Enclosure
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnPhoenixTechnologiesLTD:bvr6.00:bd11/12/2020:svnVMware,Inc.:pnVMwareVirtualPlatform:pvrNone:rvnIntelCorporation:rn440BXDesktopReferencePlatform:rvrNone:cvnNoEnclosure:ct1:cvrN/A:
dmi.product.name: VMware Virtual Platform
dmi.product.version: None
dmi.sys.vendor: VMware, Inc.

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 2038685

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Andres (andres-rc)
tags: added: apport-collected bionic
description: updated
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Andres (andres-rc) wrote : AlsaInfo.txt

apport information

description: updated
Revision history for this message
Andres (andres-rc) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Andres (andres-rc) wrote : IwConfig.txt

apport information

Revision history for this message
Andres (andres-rc) wrote : Lspci.txt

apport information

Revision history for this message
Andres (andres-rc) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Andres (andres-rc) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Andres (andres-rc) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Andres (andres-rc) wrote : ProcModules.txt

apport information

Revision history for this message
Andres (andres-rc) wrote : PulseList.txt

apport information

Revision history for this message
Andres (andres-rc) wrote : UdevDb.txt

apport information

Revision history for this message
Andres (andres-rc) wrote : WifiSyslog.txt

apport information

description: updated
Revision history for this message
Andres (andres-rc) wrote :
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I think if linux-headers package produces /usr/src/linux-headers-4.15.0-219-generic/vmlinux file everything will "just" work for everybody.

Although stuff might be surprised if it is not a full vmlinux but just btf info.

But this might even fix generating btf info for dkms modules.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.