2021-12-07 15:59:20 |
Stefan Bader |
bug |
|
|
added bug |
2021-12-07 15:59:30 |
Stefan Bader |
nominated for series |
|
Ubuntu Bionic |
|
2021-12-07 15:59:30 |
Stefan Bader |
bug task added |
|
lttng-modules (Ubuntu Bionic) |
|
2021-12-07 15:59:56 |
Stefan Bader |
lttng-modules (Ubuntu Bionic): importance |
Undecided |
Medium |
|
2021-12-07 15:59:56 |
Stefan Bader |
lttng-modules (Ubuntu Bionic): status |
New |
Triaged |
|
2021-12-07 15:59:56 |
Stefan Bader |
lttng-modules (Ubuntu Bionic): assignee |
|
Stefan Bader (smb) |
|
2021-12-07 16:05:12 |
Stefan Bader |
attachment added |
|
Proposed fix for lttng-modules in Bionic https://bugs.launchpad.net/ubuntu/bionic/+source/lttng-modules/+bug/1953522/+attachment/5546055/+files/proposed-fix.debdiff |
|
2021-12-07 16:24:01 |
Ubuntu Foundations Team Bug Bot |
tags |
|
patch |
|
2021-12-07 16:32:42 |
Stefan Bader |
attachment added |
|
Updated fix for Bionic https://bugs.launchpad.net/ubuntu/bionic/+source/lttng-modules/+bug/1953522/+attachment/5546060/+files/proposed-fix-v2.patch |
|
2021-12-07 17:04:55 |
Kamal Mostafa |
bug |
|
|
added subscriber Kamal Mostafa |
2021-12-08 02:47:00 |
Launchpad Janitor |
lttng-modules (Ubuntu): status |
New |
Confirmed |
|
2021-12-08 09:57:14 |
Stefan Bader |
description |
An upstream kernel change which was introduced to avoid high sub-level numbers in 4.14.y to overflow into the minor number has uncovered a similar issue with LTTNG's macros which allow versioned code adaptions.
To allow that the ABI number of the kernel is inserted as a new sub-sub-level number. Which is done by shifting the existing LINUX_VERSION_CODE by another 8 bits. But this only allows for ABI numbers up to 255. After that they overflow into the sub-level part of the kernel. This went unnoticed until the kernel side changed this number to be 255 fix. Now the overflow reaches the minor number and this breaks assumptions in the code.
For example bionic:linux-snapdragon (-1117) fails to produce lttng-modules (DKMS) but the previous version would succeed. When changing the LINUX_VERSION_CODE back, this works in both cases.
Since the macros are only used to make compile time decisions the proposed fix would be to extend the ABI number size to 16bit. That will work in all cases. |
[SRU Justification]
== Impact ==
The kernel change (which may or may not be taken back) revealed a build issue we already have with lltng-modules and our high ABI numbers for derivative/custom kernels. It should be fixed regardless of what the kernel will do.
== Fix ==
The proposed fix changes macros which are used to do run-time adaptions of code based on the kernel version for which the DKMS modules are built for. The number keys which the macros are using are not included in the code and the way those are used will either cause build failures or produce the same code as before.
== Test case ==
Producing DKMS modules is the test case here. I did tests with the previous bionic:linux-snapdragon (which uses the old sub-level in the kernel) and the same kernel in proposed which has the sub-level set to 255 fix). Both worked.
== Regression Potential ==
Building DKMS modules for lttng could start to fail.
---
An upstream kernel change which was introduced to avoid high sub-level numbers in 4.14.y to overflow into the minor number has uncovered a similar issue with LTTNG's macros which allow versioned code adaptions.
To allow that the ABI number of the kernel is inserted as a new sub-sub-level number. Which is done by shifting the existing LINUX_VERSION_CODE by another 8 bits. But this only allows for ABI numbers up to 255. After that they overflow into the sub-level part of the kernel. This went unnoticed until the kernel side changed this number to be 255 fix. Now the overflow reaches the minor number and this breaks assumptions in the code.
For example bionic:linux-snapdragon (-1117) fails to produce lttng-modules (DKMS) but the previous version would succeed. When changing the LINUX_VERSION_CODE back, this works in both cases.
Since the macros are only used to make compile time decisions the proposed fix would be to extend the ABI number size to 16bit. That will work in all cases. |
|
2021-12-08 15:38:47 |
Stefan Bader |
bug task added |
|
linux (Ubuntu) |
|
2021-12-08 15:39:02 |
Stefan Bader |
linux (Ubuntu Bionic): importance |
Undecided |
Medium |
|
2021-12-08 15:39:02 |
Stefan Bader |
linux (Ubuntu Bionic): status |
New |
Triaged |
|
2021-12-08 16:00:09 |
Ubuntu Kernel Bot |
linux (Ubuntu): status |
New |
Incomplete |
|
2021-12-08 16:25:34 |
Ubuntu Foundations Team Bug Bot |
bug |
|
|
added subscriber Terry Rudd |
2021-12-09 06:53:46 |
Stefan Bader |
linux (Ubuntu): status |
Incomplete |
Invalid |
|
2021-12-09 07:43:00 |
Stefan Bader |
linux (Ubuntu Bionic): status |
Triaged |
Fix Committed |
|
2021-12-09 15:22:58 |
Ubuntu Kernel Bot |
tags |
patch |
patch verification-needed-bionic |
|
2021-12-10 14:10:41 |
Kleber Sacilotto de Souza |
tags |
patch verification-needed-bionic |
patch verification-done-bionic |
|
2022-01-04 14:22:42 |
Launchpad Janitor |
linux (Ubuntu Bionic): status |
Fix Committed |
Fix Released |
|
2022-01-04 14:22:42 |
Launchpad Janitor |
cve linked |
|
2018-25020 |
|
2022-01-04 14:22:42 |
Launchpad Janitor |
cve linked |
|
2021-4002 |
|