-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
modules_linux: Add support for builtin kernel modules #23953
Conversation
I mistakenly made it as draft. Please publish the PR. I am unable to change the state of this PR. :) |
Should I rebase? The one of the pipelines is failing (perhaps due to 0.6 gateway api upgrade). |
Yes, please. The ConformanceGatewayAPI failure doesn't look like a flake and seems fixed on master. |
/test |
IMO, it's more reliable to query subdirectories of /sys/module (which also exist for builtin modules), rather than files on filesystem (which technically don't have to exist). Imagine a hypothetical situation when all modules are builtin, there is no /lib/modules at all, and even the kernel image doesn't have to be on a mounted filesystem. In this case the only way to check what modules are present is to query sysfs. |
I thought that also. The problem with /sys/module is that only appears when at least has a version or at least one parameter and it is not reliable source due to Since the /lib/modules is getting already mounted due to cilium's btf (findVMLinux function) - I see no problem here. |
@TheAifam5 could you please squash the last commit into the first? Since it's not merged yet we can just have the |
@NikAleksandrov Understood. I will do it today, around 19-23:00 GMT+1. |
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.
Looks good to me, but it needs to be rebased on top of latest master.
Previously, kernel modules names were read from the `/proc/modules` only which prevented k8s linux distribution with kernel modules builtin into the kernel to pass the validation of required kernel modules by Cilium. This patch adds support for systems with builtin modules by trying to read the kernel module names from following files additionally: - `/lib/modules/<kernel-version>/modules.builtin` - `/usr/lib/modules/<kernel-version>/modules.builtin` - `/usr/lib/debug/lib/modules/<kernel-version>/modules.builtin` Fixes: #23863 Signed-off-by: Mateusz Paluszkiewicz (TheAifam5) <theaifam5@gmail.com>
/test |
Should I rebase it again? |
No. In general it's best not to rebase unless 1) you're going to push a change anyway, or 2) there is a merge conflict, or 3) a maintainer asks you to. When rebasing all tests need to be restarted. I'll triage CI results now and will rerun or mark ready to merge accordingly. |
Thanks for fixing this @TheAifam5! |
@pchaigno I was hoping this to be in the 1.13.2 release, but it seems to be not. Any idea when this will be released? |
This will be released in v1.14.0. I've added the backport label given that it fits the backporting criteria and shouldn't cause backport conflicts (that code is rarely touched). So unless the backporter hits issues, it should also be in the next v1.13 release. |
Awesome, thanks! |
Any idea when there will be another 1.13 release or the 1.14 release? |
Previously, kernel modules names were read from the
/proc/modules
only which prevented k8s linux distribution with kernel modules builtin into the kernel to pass the validation of required kernel modules by Cilium.This patch adds support for systems with builtin modules by trying to read the kernel module names from following files additionally:
/lib/modules/<kernel-version>/modules.builtin
/usr/lib/modules/<kernel-version>/modules.builtin
/usr/lib/debug/lib/modules/<kernel-version>/modules.builtin
Fixes: #23863
Please ensure your pull request adheres to the following guidelines:
Unable to test on my current machine
description and a
Fixes: #XXX
line if the commit addresses a particularGitHub issue.
Fixes: <commit-id>
tag, thenplease add the commit author[s] as reviewer[s] to this issue.