← Back to team overview

lttng team mailing list archive

[Bug 1953522] [NEW] Ubuntu version macros overflow with high ABI numbers

 

Public bug reported:

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.

** Affects: lttng-modules (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: lttng-modules (Ubuntu Bionic)
     Importance: Medium
     Assignee: Stefan Bader (smb)
         Status: Triaged

** Also affects: lttng-modules (Ubuntu Bionic)
   Importance: Undecided
       Status: New

** Changed in: lttng-modules (Ubuntu Bionic)
   Importance: Undecided => Medium

** Changed in: lttng-modules (Ubuntu Bionic)
       Status: New => Triaged

** Changed in: lttng-modules (Ubuntu Bionic)
     Assignee: (unassigned) => Stefan Bader (smb)

-- 
You received this bug notification because you are a member of Ubuntu
LTTng, which is subscribed to lttng-modules in Ubuntu.
Matching subscriptions: lttng-modules-bugs
https://bugs.launchpad.net/bugs/1953522

Title:
  Ubuntu version macros overflow with high ABI numbers

Status in lttng-modules package in Ubuntu:
  New
Status in lttng-modules source package in Bionic:
  Triaged

Bug 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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lttng-modules/+bug/1953522/+subscriptions



Follow ups