lttng-modules:stable-2.12

Last commit made on 2024-04-15
Get this branch:
git clone -b stable-2.12 https://git.launchpad.net/lttng-modules

Branch merges

Branch information

Name:
stable-2.12
Repository:
lp:lttng-modules

Recent commits

a208676... by Kienan Stewart <email address hidden>

Fix: timer_expire_entry changed in 4.19.312

See upstream commit:

    commit bbb5b1c060d73ca96ccc8cceaa81f5e1a96e8fa4
    Author: Anna-Maria Gleixner <email address hidden>
    Date: Thu Mar 21 13:09:21 2019 +0100

        timer/trace: Improve timer tracing

        [ Upstream commit f28d3d5346e97e60c81f933ac89ccf015430e5cf ]

        Timers are added to the timer wheel off by one. This is required in
        case a timer is queued directly before incrementing jiffies to prevent
        early timer expiry.

        When reading a timer trace and relying only on the expiry time of the timer
        in the timer_start trace point and on the now in the timer_expiry_entry
        trace point, it seems that the timer fires late. With the current
        timer_expiry_entry trace point information only now=jiffies is printed but
        not the value of base->clk. This makes it impossible to draw a conclusion
        to the index of base->clk and makes it impossible to examine timer problems
        without additional trace points.

        Therefore add the base->clk value to the timer_expire_entry trace
        point, to be able to calculate the index the timer base is located at
        during collecting expired timers.

Change-Id: I2ebdbb637db0966ff51f45bf66916a59a496b50c
Signed-off-by: Kienan Stewart <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

0155bce... by Kienan Stewart <email address hidden>

Fix: build kvm probe on EL 8.4+

The lower value of the EL range, 240.15.1, corresponds to the first
import of EL r8 kernels into Rocky Linux's kernel staging repo.
The change may have been introduced in an earlier RHEL 8 kernel,
prior to the history of imports into Rocky.

Change-Id: Icefe472d43e28cc09746e9e046b12299609ebab1
Signed-off-by: Kienan Stewart <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

e96d6e0... by Kienan Stewart <email address hidden>

Fix: support ext4_journal_start on EL 8.4+

The lower value of the EL range, 240.15.1, corresponds to the first
import of EL r8 kernels into Rocky Linux's kernel staging repo.
The change may have been introduced in an earlier RHEL 8 kernel,
prior to the history of imports into Rocky.

Change-Id: Ibec02b382478bee33947d079f33835823827f4c5
Signed-off-by: Kienan Stewart <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

67053c5... by Kienan Stewart <email address hidden>

Fix: correct RHEL range for kmem_cache_free define

When compiling against RHEL 8.5 kernels, lttng-modules builds fail
with the following error:

```
lttng-modules/src/probes/../../include/lttng/tracepoint-event-impl.h:133:6: error: conflicting types for ‘trace_kmem_
cache_free’; have ‘void(long unsigned int, const void *)’
```

The original range was introduced in commit
89d917153fc52c1e5b0ddabf8ee078897656b263 which tested against RHEL 8.6
and not RHEL 8.5.

Change-Id: Icff98c15415ce8e1e95a10974cd65ed6e84cd00a
Signed-off-by: Kienan Stewart <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

30e736e... by Mathieu Desnoyers

Version 2.12.16

Signed-off-by: Mathieu Desnoyers <email address hidden>
Change-Id: I0dca55a99ba0dacdf5b08b6a9853f0829be02b1b

7f63713... by Kienan Stewart <email address hidden>

fix: lttng-probe-kvm-x86-mmu build with linux 6.6

A small change was made upstream in `spte.h` that requires
`arch/x86/kvm` to be added to the search path when
building lttng-probe-kvm.x86-mmu.o.

See upstream commit :

  commit d10f3780bc2f80744d291e118c0c8bade54ed3b8
  Author: Sean Christopherson <email address hidden>
  Date: Tue Aug 8 15:40:59 2023 -0700

      KVM: x86/mmu: Include mmu.h in spte.h

      Explicitly include mmu.h in spte.h instead of relying on the "parent" to
      include mmu.h. spte.h references a variety of macros and variables that
      are defined/declared in mmu.h, and so including spte.h before (or instead
      of) mmu.h will result in build errors, e.g.

Signed-off-by: Kienan Stewart <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>
Change-Id: I5c3fc87d3b006cefbcca198e6e15868a342cb8dd

e6d0ac2... by Kienan Stewart <email address hidden>

docs: Add supported versions and fix-backport policy

Change-Id: I5d6da21b9541f838cb326263eff8c1448e37fc55
Signed-off-by: Kienan Stewart <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

9d72c49... by Kienan Stewart <email address hidden>

docs: Add links to project resources

Indicate that Gerrit (https://review.lttng.org) is the principal place
where patches are submitted and reviewed, rather than the mailing list.

Based on feedback received on the mailing list:
https://lists.lttng.org/pipermail/lttng-dev/2023-November/030670.html

Change-Id: I611deeec26393fc25c9a103c022687198100df0c
Signed-off-by: Kienan Stewart <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

1efb917... by Kienan Stewart <email address hidden>

Fix: Correct minimum version in jbd2 SLE kernel range

This range was introduced in commit b49650509ff072d37ec112cf45a5f14f382c9a31;
however, the range is wrong and worked because the kernel versions
(eg. `5.14.21-150400.24.100-default`) were evaluated to values
greater than `LTTNG_SLE_KERNEL_RANGE(5,14,21,24,46,1)`.

As a result builds of lttng-modules against older versions of SLE
kernels failed.

Change-Id: I23d97d84a23c7b24e957fe943932d6aefbe1b409
Signed-off-by: Kienan Stewart <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

c9ca49a... by Kienan Stewart <email address hidden>

Fix: Handle recent SLE major version codes

Starting in early 2022, the SLE linux version codes changed from the
previous style `5.3.18-59.40.1` to a new convention in which the major
version is a compound number consisting of the major release version,
the service pack version, and the auxillary version (currently unused
from my understanding) similar to the following `5.3.18-150300.59.43.1`[1].

The newer values used in the SLE major version causes the integer
value to "overflow" the expected number of digits and the comparisons
may fail. The `LTTNG_SLE_KERNEL_VERSION` macro also multiplies the
`LTTNG_KERNEL_VERSION` by `100000000ULL` which doesn't work in all
situations, as the resulting value is too large to be stored fully in
an `unsigned long long`.

Example of previous results:

```
// Example range comparison. True or false depending on the value of
// `LTTNG_SLE_VERSION_CODE` and `LTTNG_LINUX_VERSION_CODE`.
LTTNG_SLE_KERNEL_RANGE(5,15,21,150400,24,46, 5,15,0,0,0,0);

// Note: values printed with `%ull`
LTTNG_SLE_KERNEL_VERSION(5,15,21,24,26,1); // 6106486698364570153
LTTNG_SLE_KERNEL_VERSION(5,15,0,0,0,0); // 0
LTTNG_KERNEL_VERSION(5,15,0); // 84869120

// Corrected SLE version codes
LTTNG_SLE_KERNEL_VERSION(5,14,21,150400,24,26); // 14918348902249793914
LTTNG_SLE_KERNEL_VERSION(5,14,21,150400,24,46); // 14918348902249793934
LTTNG_SLE_KERNEL_VERSION(5,15,0,150400,0,0)); // 6971507145825058816
```

`LTTNG_KERNEL_VERSION` packs the kernel version into a 32-bit integer;
however, using that type of packing on the SLE kernel version will not
work well:

* Major: `150400` needs 18 bits
* Minor: may exceed 127, requires 8 bits (eg. `4.12.14-150100.197.148.1`)
* Patch: may exceed 127, requires 8 bits (eg. `5.3.18-150300.59.124.1`)

In this patch, the SLE version is packed into a 64-bit integer
with 48 bits for the major version, 8 bits for each of the minor and
patch versions.

As a result of packing the SLE version into a 64-bit integer,
it is not possible to coherently combine an `LTTNG_KERNEL_VERSION` and
an `LTTNG_SLE_KERNEL_VERSION`. Doing so would require an integer
larger than 64-bits. Therefore, the `LTTNG_SLE_KERNEL_RANGE` macro has
been adjusted to perform the range comparisons using the two values
separately. The usage of the `LTTNG_SLE_KERNEL_RANGE` remains
unchanged, as `LTTNG_SLE_VERSION` is only used inside that macro.

Using the adjusted macros:

```
// Example range comparison. True or false depending on the value of
// `LTTNG_SLE_VERSION_CODE` and `LTTNG_LINUX_VERSION_CODE`.
LTTNG_SLE_KERNEL_RANGE(5,15,21,150400,24,46, 5,15,0,0,0,0);

// Note: values printed with `%ull`
LTTNG_SLE_VERSION(24,26,1); // 1579521
LTTNG_SLE_VERSION(0,0,0); // 0
LTTNG_KERNEL_VERSION(5,15,0); // 84869120

// Corrected SLE version codes
LTTNG_SLE_VERSION(150400,24,26); // 9856620570
LTTNG_SLE_VERSION(150400,24,46); // 9856620590
LTTNG_SLE_VERSION(150400,0,0)); // 9863168000
```

Known drawbacks
===============

It's possible that future releases of SLE kernels have minor or patch
values that exceed 255 (SLE15SP1 has a release using `197`, for example),
requiring an adjustment to using more bits for those fields when
packing into a 64-bit integer.

The schema of multiplying an `LTTNG_KERNEL_VERSION` by a large value
is used for other distributions. RHEL in particular uses
`100000000ULL`, which could lead to overflow issues with certain
comparisons similar to the previous behaviour of
`LTTNG_SLE_KERNEL_VERSION(5,15,0,0,0,0);`.

[1]: https://www.suse.com/support/kb/doc/?id=000019587#SLE15SP4

Change-Id: Iaa90bfa422e47213a13829cdf008ab20d7484cab
Signed-off-by: Kienan Stewart <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>