-
Notifications
You must be signed in to change notification settings - Fork 516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include "kheaders" and build a kernel-devel RPM #557
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might help review to include a copy of kernel_devel_files
(in a private gist if it's long) so we can see what will be in the package.
Dropped the |
packages/kernel/0008-Backport-sys-kheaders.tar.xz-feature.patch
Outdated
Show resolved
Hide resolved
Backport the "kheaders" functionality from upstream which adds /sys/kernels/kheaders.tar.xz, an archive of the current kernel headers. While this doesn't support out-of-tree module building, for BPF probes that only need the current kernel headers it is sufficient. Signed-off-by: Samuel Mendoza-Jonas <[email protected]>
When building the kernel also create a 'kernel-devel' RPM which includes the configured kernel source tree and extra artifacts to support building out-of-tree modules. This is not included in the Thar image, but is instead intended to be downloaded later on a running instance via a TUF target, for example. Based off a similar script provided by Ben Cressey <[email protected]> Signed-off-by: Samuel Mendoza-Jonas <[email protected]>
Updated with the kheaders patches split out individually. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appreciated, ship it!
Issue #, if available:
#454
Description of changes:
This includes two changes, one to the Thar image and one that produces an extra build artifact.
/sys/kernel/kheaders.tar.xz
which provides an archive of (just) the current kernel header filesBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Tested by launching an instance and unpacking the kernel headers. Module building tested by building a module and eBPF probe against the RPM contents and running it on Thar.