HWE kernels should support eBPF CO-RE

Bug #1926330 reported by Rafael David Tinoco
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dwarves-dfsg (Ubuntu)
Fix Released
Undecided
Unassigned
Bionic
Confirmed
Undecided
Unassigned
Focal
Confirmed
Undecided
Unassigned
Groovy
Fix Released
Undecided
Unassigned
linux (Ubuntu)
Fix Released
Undecided
Unassigned
Bionic
Confirmed
Undecided
Unassigned
Focal
Confirmed
Undecided
Unassigned
Groovy
Fix Released
Undecided
Unassigned

Bug Description

I had recent discussion with kernel team regarding support or not BTF in HWE kernels (Bionic and Focal). Having CONFIG_DEBUG_INFO_BTF option enabled for HWE kernels (v4.4 and v.4.8) would allow eBPF based code (powered by libbpf or not) to be RO.CE (https://github.com/rafaeldtinoco/portablebpf for more information).

By allowing runtime relocations, using provided BTF, libbpf binaries might end up running, without modifications, in different kernel versions (from Bionic HWE v5.4 kernel to Hirsute v5.11).

A good example would be to support tools such as:
https://github.com/aquasecurity/tracee/discussions/713#discussioncomment-665641
An ebpf powered backend for a containers security solution.

Considering:

$ rmadisonb dwarves
 dwarves | 1.9-1 | precise/universe | amd64
 dwarves | 1.10-2 | trusty | amd64
 dwarves | 1.10-2.1 | xenial/universe | amd64
 dwarves | 1.10-2.1build1 | bionic/universe | amd64
 dwarves | 1.15-2 | focal/universe | amd64
 dwarves | 1.17-1 | groovy/universe | amd64
 dwarves | 1.20-1 | hirsute/universe | amd64
 dwarves | 1.20-1 | impish/universe | amd64

And the fact that the 'pahole' binary, from dwarves package, is the one to blame, not to have CONFIG_DEBUG_INFO_BTF available, for this bug to be solved we would have to provide a backport of dwarves (at least 1.17-1) to Bionic and Focal. It could have another name (not to mess with original dwarves package and its dependencies) and it is unclear if it needs to be in [main] or [universe].

Question: Would have dwarves backported in -backports be enough for Bionic and Focal HWE kernels compilation to have CONFIG_DEBUG_INFO_BTF enabled ?

Changed in linux (Ubuntu Groovy):
status: New → Fix Committed
status: Fix Committed → Fix Released
Changed in linux (Ubuntu Focal):
status: New → Confirmed
Changed in linux (Ubuntu Bionic):
status: New → Confirmed
summary: - HWE kernels should enable BTF support to enable new eBPF based code
+ HWE kernels should enable BTF support to enable eBPF RO.CE support
Changed in dwarves-dfsg (Ubuntu Groovy):
status: New → Fix Released
Changed in dwarves-dfsg (Ubuntu Focal):
status: New → Confirmed
Changed in dwarves-dfsg (Ubuntu Bionic):
status: New → Confirmed
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 1926330

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
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Changed in dwarves-dfsg (Ubuntu):
status: New → Confirmed
Revision history for this message
Dimitri John Ledkov (xnox) wrote : Re: HWE kernels should enable BTF support to enable eBPF RO.CE support

And for v5.13 kernels even newer dwarves-dfsg is needed.

Changed in dwarves-dfsg (Ubuntu Bionic):
status: Confirmed → Won't Fix
Changed in linux (Ubuntu Bionic):
status: Confirmed → Won't Fix
Changed in dwarves-dfsg (Ubuntu):
status: Confirmed → Fix Released
Changed in linux (Ubuntu):
status: Confirmed → Fix Released
no longer affects: dwarves-dfsg (Ubuntu Hirsute)
no longer affects: linux (Ubuntu Hirsute)
summary: - HWE kernels should enable BTF support to enable eBPF RO.CE support
+ HWE kernels should enable BTF support to enable eBPF CO-RE support
summary: - HWE kernels should enable BTF support to enable eBPF CO-RE support
+ HWE kernels should support eBPF CO-RE
Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

I have placed a MIR for "pahole-btf" package (a backport of Impish's dwarves-dfsg package to Bionic and Focal) at: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1949286. This way, the kernel builds may depend on "pahole-btf" binary package, from main, and finally include BTF debug information into Bionic and Focal HWE kernels.

Changed in dwarves-dfsg (Ubuntu Bionic):
status: Won't Fix → Confirmed
Changed in linux (Ubuntu Bionic):
status: Won't Fix → Confirmed
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Note that dwarves-dfsg portion of this request was done a while back in https://bugs.launchpad.net/ubuntu/+source/dwarves-dfsg/+bug/1912811

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.