<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/tracing/rtla/src, branch v6.18.21</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-03-04T12:20:13+00:00</updated>
<entry>
<title>rtla: Fix NULL pointer dereference in actions_parse</title>
<updated>2026-03-04T12:20:13+00:00</updated>
<author>
<name>Wander Lairson Costa</name>
<email>wander@redhat.com</email>
</author>
<published>2026-01-06T11:49:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=27272429732d9db5b5d4b0449ed08c982967d9ef'/>
<id>urn:sha1:27272429732d9db5b5d4b0449ed08c982967d9ef</id>
<content type='text'>
[ Upstream commit a0890f9dbd24b302d327fe7dad9b9c5be0e278aa ]

The actions_parse() function uses strtok() to tokenize the trigger
string, but does not check if the returned token is NULL before
passing it to strcmp(). If the trigger parameter is an empty string
or contains only delimiter characters, strtok() returns NULL, causing
strcmp() to dereference a NULL pointer and crash the program.

This issue can be triggered by malformed user input or edge cases in
trigger string parsing. Add a NULL check immediately after the strtok()
call to validate that a token was successfully extracted before using
it. If no token is found, the function now returns -1 to indicate a
parsing error.

Signed-off-by: Wander Lairson Costa &lt;wander@redhat.com&gt;
Link: https://lore.kernel.org/r/20260106133655.249887-13-wander@redhat.com
Signed-off-by: Tomas Glozar &lt;tglozar@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>rtla/timerlat_bpf: Stop tracing on user latency</title>
<updated>2026-01-02T11:57:29+00:00</updated>
<author>
<name>Tomas Glozar</name>
<email>tglozar@redhat.com</email>
</author>
<published>2025-10-06T14:31:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=88b71cd0aa39e7c97990a9e9213a360076927610'/>
<id>urn:sha1:88b71cd0aa39e7c97990a9e9213a360076927610</id>
<content type='text'>
commit e4240db9336c25826a2d6634adcca86d5ee01bde upstream.

rtla-timerlat allows a *thread* latency threshold to be set via the
-T/--thread option. However, the timerlat tracer calls this *total*
latency (stop_tracing_total_us), and stops tracing also when the
return-to-user latency is over the threshold.

Change the behavior of the timerlat BPF program to reflect what the
timerlat tracer is doing, to avoid discrepancy between stopping
collecting data in the BPF program and stopping tracing in the timerlat
tracer.

Cc: stable@vger.kernel.org
Fixes: e34293ddcebd ("rtla/timerlat: Add BPF skeleton to collect samples")
Reviewed-by: Wander Lairson Costa &lt;wander@redhat.com&gt;
Link: https://lore.kernel.org/r/20251006143100.137255-1-tglozar@redhat.com
Signed-off-by: Tomas Glozar &lt;tglozar@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rtla: Fix -a overriding -t argument</title>
<updated>2025-12-18T13:03:10+00:00</updated>
<author>
<name>Ivan Pravdin</name>
<email>ipravdin.official@gmail.com</email>
</author>
<published>2025-11-03T16:19:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=97ee9b4f32c8a594f3d26a53baf03c3de9580361'/>
<id>urn:sha1:97ee9b4f32c8a594f3d26a53baf03c3de9580361</id>
<content type='text'>
[ Upstream commit ddb6e42494e5c48c17e64f29b7674b9add486a19 ]

When running rtla as

    `rtla &lt;timerlat|osnoise&gt; &lt;top|hist&gt; -t custom_file.txt -a 100`

-a options override trace output filename specified by -t option.
Running the command above will create &lt;timerlat|osnoise&gt;_trace.txt file
instead of custom_file.txt. Fix this by making sure that -a option does
not override trace output filename even if it's passed after trace
output filename is specified.

Fixes: 173a3b014827 ("rtla/timerlat: Add the automatic trace option")
Signed-off-by: Ivan Pravdin &lt;ipravdin.official@gmail.com&gt;
Reviewed-by: Tomas Glozar &lt;tglozar@redhat.com&gt;
Link: https://lore.kernel.org/r/b6ae60424050b2c1c8709e18759adead6012b971.1762186418.git.ipravdin.official@gmail.com
[ use capital letter in subject, as required by tracing subsystem ]
Signed-off-by: Tomas Glozar &lt;tglozar@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools/rtla: Fix --on-threshold always triggering</title>
<updated>2025-12-18T13:03:07+00:00</updated>
<author>
<name>Tomas Glozar</name>
<email>tglozar@redhat.com</email>
</author>
<published>2025-10-07T09:53:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f75dc8cb4117067ed2bec2b27a61ccbc4ab65f33'/>
<id>urn:sha1:f75dc8cb4117067ed2bec2b27a61ccbc4ab65f33</id>
<content type='text'>
[ Upstream commit 417bd0d502f90a2e785e7299dae4f248b5ac0292 ]

Commit 8d933d5c89e8 ("rtla/timerlat: Add continue action") moved the
code performing on-threshold actions (enabled through --on-threshold
option) to inside the RTLA main loop.

The condition in the loop does not check whether the threshold was
actually exceeded or if stop tracing was requested by the user through
SIGINT or duration. This leads to a bug where on-threshold actions are
always performed, even when the threshold was not hit.

(BPF mode is not affected, since it uses a different condition in the
while loop.)

Add a condition that checks for !stop_tracing before executing the
actions. Also, fix incorrect brackets in hist_main_loop to match the
semantics of top_main_loop.

Fixes: 8d933d5c89e8 ("rtla/timerlat: Add continue action")
Fixes: 2f3172f9dd58 ("tools/rtla: Consolidate code between osnoise/timerlat and hist/top")
Reviewed-by: Crystal Wood &lt;crwood@redhat.com&gt;
Reviewed-by: Wander Lairson Costa &lt;wander@redhat.com&gt;
Link: https://lore.kernel.org/r/20251007095341.186923-1-tglozar@redhat.com
Signed-off-by: Tomas Glozar &lt;tglozar@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools/rtla: Fix unassigned nr_cpus</title>
<updated>2025-12-18T13:03:07+00:00</updated>
<author>
<name>Costa Shulyupin</name>
<email>costa.shul@redhat.com</email>
</author>
<published>2025-10-02T17:08:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=efdb8e298907639746a283eefd699e4bfd94c100'/>
<id>urn:sha1:efdb8e298907639746a283eefd699e4bfd94c100</id>
<content type='text'>
[ Upstream commit b4275b23010df719ec6508ddbc84951dcd24adce ]

In recently introduced timerlat_free(),
the variable 'nr_cpus' is not assigned.

Assign it with sysconf(_SC_NPROCESSORS_CONF) as done elsewhere.
Remove the culprit: -Wno-maybe-uninitialized. The rest of the
code is clean.

Signed-off-by: Costa Shulyupin &lt;costa.shul@redhat.com&gt;
Reviewed-by: Tomas Glozar &lt;tglozar@redhat.com&gt;
Fixes: 2f3172f9dd58 ("tools/rtla: Consolidate code between osnoise/timerlat and hist/top")
Link: https://lore.kernel.org/r/20251002170846.437888-1-costa.shul@redhat.com
Signed-off-by: Tomas Glozar &lt;tglozar@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'trace-tools-v6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace</title>
<updated>2025-10-05T16:38:26+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2025-10-05T16:38:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d9f24f8e60798c066ead61f77e67ee6a5a204514'/>
<id>urn:sha1:d9f24f8e60798c066ead61f77e67ee6a5a204514</id>
<content type='text'>
Pull tracing tools updates from Steven Rostedt

 - This is mostly just consolidating code between osnoise/timerlat and
   top/hist for easier maintenance and less future divergence

* tag 'trace-tools-v6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  tools/rtla: Add remaining support for osnoise actions
  tools/rtla: Add test engine support for unexpected output
  tools/rtla: Fix -A option name in test comment
  tools/rtla: Consolidate code between osnoise/timerlat and hist/top
  tools/rtla: Create common_apply_config()
  tools/rtla: Move top/hist params into common struct
  tools/rtla: Consolidate common parameters into shared structure
</content>
</entry>
<entry>
<title>rtla/actions: Fix condition for buffer reallocation</title>
<updated>2025-09-27T10:01:20+00:00</updated>
<author>
<name>Wander Lairson Costa</name>
<email>wander@redhat.com</email>
</author>
<published>2025-09-15T18:10:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2227f273b7dc25a791ae6b152550098aa6934b2f'/>
<id>urn:sha1:2227f273b7dc25a791ae6b152550098aa6934b2f</id>
<content type='text'>
The condition to check if the actions buffer needs to be resized was
incorrect. The check `self-&gt;size &gt;= self-&gt;len` would evaluate to
true on almost every call to `actions_new()`, causing the buffer to
be reallocated unnecessarily each time an action was added.

Fix the condition to `self-&gt;len &gt;= self.size`, ensuring
that the buffer is only resized when it is actually full.

Cc: John Kacur &lt;jkacur@redhat.com&gt;
Cc: Luis Goncalves &lt;lgoncalv@redhat.com&gt;
Cc: Arnaldo Carvalho de Melo &lt;acme@kernel.org&gt;
Cc: Chang Yin &lt;cyin@redhat.com&gt;
Cc: Costa Shulyupin &lt;costa.shul@redhat.com&gt;
Cc: Crystal Wood &lt;crwood@redhat.com&gt;
Cc: Gabriele Monaco &lt;gmonaco@redhat.com&gt;
Link: https://lore.kernel.org/20250915181101.52513-1-wander@redhat.com
Fixes: 6ea082b171e00 ("rtla/timerlat: Add action on threshold feature")
Signed-off-by: Wander Lairson Costa &lt;wander@redhat.com&gt;
Reviewed-by: Tomas Glozar &lt;tglozar@redhat.com&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>rtla: Fix buffer overflow in actions_parse</title>
<updated>2025-09-27T09:57:29+00:00</updated>
<author>
<name>Ivan Pravdin</name>
<email>ipravdin.official@gmail.com</email>
</author>
<published>2025-09-08T02:05:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b1e0ff7209e952bdb4f9a85a8450546700b4affa'/>
<id>urn:sha1:b1e0ff7209e952bdb4f9a85a8450546700b4affa</id>
<content type='text'>
Currently, tests 3 and 13-22 in tests/timerlat.t fail with error:

    *** buffer overflow detected ***: terminated
    timeout: the monitored command dumped core

The result of running `sudo make check` is

    tests/timerlat.t (Wstat: 0 Tests: 22 Failed: 11)
      Failed tests:  3, 13-22
    Files=3, Tests=34, 140 wallclock secs ( 0.07 usr  0.01 sys + 27.63 cusr
    27.96 csys = 55.67 CPU)
    Result: FAIL

Fix buffer overflow in actions_parse to avoid this error. After this
change, the tests results are

    tests/hwnoise.t ... ok
    tests/osnoise.t ... ok
    tests/timerlat.t .. ok
    All tests successful.
    Files=3, Tests=34, 186 wallclock secs ( 0.06 usr  0.01 sys + 41.10 cusr
    44.38 csys = 85.55 CPU)
    Result: PASS

Link: https://lore.kernel.org/164ffc2ec8edacaf1295789dad82a07817b6263d.1757034919.git.ipravdin.official@gmail.com
Fixes: 6ea082b171e0 ("rtla/timerlat: Add action on threshold feature")
Signed-off-by: Ivan Pravdin &lt;ipravdin.official@gmail.com&gt;
Reviewed-by: Tomas Glozar &lt;tglozar@redhat.com&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tools/rtla: Add remaining support for osnoise actions</title>
<updated>2025-09-27T08:53:48+00:00</updated>
<author>
<name>Crystal Wood</name>
<email>crwood@redhat.com</email>
</author>
<published>2025-09-07T02:23:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=05b7e10687c69e0c28e62b9a74ce78b3e7463806'/>
<id>urn:sha1:05b7e10687c69e0c28e62b9a74ce78b3e7463806</id>
<content type='text'>
The basic functionality came with the consolidation; now hook up the
command line options, and add documentation and tests.

Cc: John Kacur &lt;jkacur@redhat.com&gt;
Cc: Costa Shulyupin &lt;costa.shul@redhat.com&gt;
Link: https://lore.kernel.org/20250907022325.243930-8-crwood@redhat.com
Reviewed-by: Tomas Glozar  &lt;tglozar@redhat.com&gt;
Signed-off-by: Crystal Wood &lt;crwood@redhat.com&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tools/rtla: Consolidate code between osnoise/timerlat and hist/top</title>
<updated>2025-09-27T08:52:57+00:00</updated>
<author>
<name>Crystal Wood</name>
<email>crwood@redhat.com</email>
</author>
<published>2025-09-07T02:23:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2f3172f9dd58cca0f188bc0766b619d24f8116ad'/>
<id>urn:sha1:2f3172f9dd58cca0f188bc0766b619d24f8116ad</id>
<content type='text'>
Currently a lot of code is duplicated between the different rtla tools,
making maintenance more difficult, and encouraging divergence such as
features that are only implemented for certain tools even though they
could be more broadly applicable.

Merge the various main() functions into a common run_tool() with an ops
struct for tool-specific details.

Implement enough support for actions on osnoise to not need to keep the
old params-&gt;trace_output path.

Cc: John Kacur &lt;jkacur@redhat.com&gt;
Cc: Costa Shulyupin &lt;costa.shul@redhat.com&gt;
Link: https://lore.kernel.org/20250907022325.243930-5-crwood@redhat.com
Reviewed-by: Tomas Glozar  &lt;tglozar@redhat.com&gt;
Signed-off-by: Crystal Wood &lt;crwood@redhat.com&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
</feed>
