backport dkms fixes to build modules correctly for hwe-5.19+ kernels with custom compiler
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
backport-iwlwifi-dkms (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned | ||
dkms (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Dimitri John Ledkov | ||
linux (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Incomplete
|
Undecided
|
Unassigned | ||
v4l2loopback (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned | ||
zfs-linux (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
tl; dr
this has proven to be a bit futile, and instead we went ahead with changing the default kernel makefiles to default to the correct toolchain and we have reverted hwe-5.19 kernel to use stock gcc on jammy for now.
So the things described here are not strictly even needed in jammy for now.
[ Impact ]
* hwe-5.19 kernel has to be compiled with gcc-12+ for the new security kernel config options that have been enabled in that kernel (init zero structs).
* dkms needs to be patched to attempt to use the same compiler as was used to build the kernel, specifically use gcc for v5.15 but gcc-12 for v5.19+ in jammy
* dkms autopkgtests also need to be improved to ensure there are no false negatives when kernel has module under test already built-in at the same version.
* because linux-headers packages in Ubuntu do not depend on a toolchain, and it is very hard to correctly depend on a native or cross-toolchain, add gcc-12 dependency in the dkms package.
[ Test Plan ]
* Retrigger dkms module test for a built-in package of the same version as already built into the kernel, for example zfs-linux dkms. It should pass.
* Attempt to build dkms modules against v5.15 kernel and v5.19 kernel from proposed. dkms module should be built with gcc and gcc-12 respectively.
[ Where problems could occur ]
* New gcc-12 dependency on the dkms package may result in two compilers being installed in the Ubuntu Desktop Live image
* New gcc-12 dependency may prevent automatic upgrade/
[ Other Info ]
* It is questionable for dkms to depend on any c-compiler, given that a module for a given kernel can really be built with the same toolchain and the same compiler features.
* In debian, linux kernel packages ship and extra configuration file in the kernel headers, dkms uses said configuration file to use a matching compiler, and linux-headers packages depend on the toolchain used to build a given kernel. Maybe in the future Ubuntu could consider using the same packaging.
* Some DKMS modules need further fixes to preserve and not loose the compiler setting
Changed in dkms (Ubuntu): | |
status: | New → Fix Released |
Changed in dkms (Ubuntu Jammy): | |
status: | New → Triaged |
assignee: | nobody → Dimitri John Ledkov (xnox) |
Changed in dkms (Ubuntu): | |
status: | Fix Released → Triaged |
description: | updated |
summary: |
backport dkms fixes to build modules correctly for hwe-5.19+ kernels + with custom compiler |
Changed in v4l2loopback (Ubuntu): | |
status: | New → In Progress |
Changed in backport-iwlwifi-dkms (Ubuntu): | |
status: | New → In Progress |
Changed in zfs-linux (Ubuntu): | |
status: | New → In Progress |
Changed in dkms (Ubuntu): | |
status: | Triaged → In Progress |
no longer affects: | ivsc-driver (Ubuntu Jammy) |
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 1991664
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.