generate and ship vmlinux.h to allow packages to build BPF CO-RE

Bug #2050083 reported by Luca Boccassi
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
New
Undecided
Kleber Sacilotto de Souza

Bug Description

A vmlinux.h header generated from a kernel build with bpftool is needed to build and ship BPF CO-RE programs. We are looking to ship these in the next version of systemd.
vmlinux.h being generated depends on the kernel version, architecture and kconfig. There are some vague promises of backward compatibility, but it is hard to gauge.

We definitely do not want this file to be generated from the kernel running the build machine when building a package though, as very often these are very old and stable kernels building packages for the bleeding edge.

In Fedora and now Debian we generate vmlinux.h at kernel package build time, and ship it with the other kernel headers (_not_ UAPI, the internal headers): https://salsa.debian.org/kernel-team/linux/-/commit/ac6f7eda4c3e8b0d0db20ad4bb8236371cf8d38e

Please consider doing the same in Ubuntu's linux-headers.

Changed in linux (Ubuntu):
assignee: nobody → Kleber Sacilotto de Souza (kleber-souza)
Revision history for this message
Luca Boccassi (bluca) wrote :

We have now moved it in Debian:

https://salsa.debian.org/kernel-team/linux/-/commit/f52d006f3915ac4358dc8c98aa417477ebee026e

New binary package 'linux-bpf-dev' that installs /usr/include/${DEB_HOST_MULTIARCH}/linux/bpf/vmlinux.h - it would be great to have the same setup in Ubuntu so that we don't have to ifdef in debian/rules. It would greatly simplify things. Thanks!

Revision history for this message
Luca Boccassi (bluca) wrote :

I have sent a patch to kernel-team adding this new package, tested a local build on oracular amd64 and it seems to work:

https://lists.ubuntu.com/archives/kernel-team/2024-July/152477.html

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.