<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/verification/rv/src, branch v6.6.132</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.132</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.132'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-08-15T10:08:49+00:00</updated>
<entry>
<title>tools/rv: Do not skip idle in trace</title>
<updated>2025-08-15T10:08:49+00:00</updated>
<author>
<name>Gabriele Monaco</name>
<email>gmonaco@redhat.com</email>
</author>
<published>2025-07-23T16:12:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c9be5abdaf2ef4b0a1f9b25191283118e3f679a8'/>
<id>urn:sha1:c9be5abdaf2ef4b0a1f9b25191283118e3f679a8</id>
<content type='text'>
[ Upstream commit f60227f3448911b682c45041c3fbd94f6d3b15a2 ]

Currently, the userspace RV tool skips trace events triggered by the RV
tool itself, this can be changed by passing the parameter -s, which sets
the variable config_my_pid to 0 (instead of the tool's PID).
This has the side effect of skipping events generated by idle (PID 0).

Set config_my_pid to -1 (an invalid pid) to avoid skipping idle.

Cc: Nam Cao &lt;namcao@linutronix.de&gt;
Cc: Tomas Glozar &lt;tglozar@redhat.com&gt;
Cc: Juri Lelli &lt;jlelli@redhat.com&gt;
Cc: Clark Williams &lt;williams@redhat.com&gt;
Cc: John Kacur &lt;jkacur@redhat.com&gt;
Link: https://lore.kernel.org/20250723161240.194860-2-gmonaco@redhat.com
Fixes: 6d60f89691fc ("tools/rv: Add in-kernel monitor interface")
Signed-off-by: Gabriele Monaco &lt;gmonaco@redhat.com&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools/rv: Fix curr_reactor uninitialized variable</title>
<updated>2024-02-23T08:25:14+00:00</updated>
<author>
<name>Daniel Bristot de Oliveira</name>
<email>bristot@kernel.org</email>
</author>
<published>2024-02-06T11:05:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2863f8cf9f5611244b8769c6a6dcd09b40fec5b4'/>
<id>urn:sha1:2863f8cf9f5611244b8769c6a6dcd09b40fec5b4</id>
<content type='text'>
commit 61ec586bc0815959d3314cf7ce242529c977b357 upstream.

clang is reporting:

$ make HOSTCC=clang CC=clang LLVM_IAS=1

clang -O -g -DVERSION=\"6.8.0-rc3\" -flto=auto -fexceptions
	-fstack-protector-strong -fasynchronous-unwind-tables
	-fstack-clash-protection  -Wall -Werror=format-security
	-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
	$(pkg-config --cflags libtracefs)  -I include
	-c -o src/in_kernel.o src/in_kernel.c
[...]

src/in_kernel.c:227:6: warning: variable 'curr_reactor' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
  227 |         if (!end)
      |             ^~~~
src/in_kernel.c:242:9: note: uninitialized use occurs here
  242 |         return curr_reactor;
      |                ^~~~~~~~~~~~
src/in_kernel.c:227:2: note: remove the 'if' if its condition is always false
  227 |         if (!end)
      |         ^~~~~~~~~
  228 |                 goto out_free;
      |                 ~~~~~~~~~~~~~
src/in_kernel.c:221:6: warning: variable 'curr_reactor' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
  221 |         if (!start)
      |             ^~~~~~
src/in_kernel.c:242:9: note: uninitialized use occurs here
  242 |         return curr_reactor;
      |                ^~~~~~~~~~~~
src/in_kernel.c:221:2: note: remove the 'if' if its condition is always false
  221 |         if (!start)
      |         ^~~~~~~~~~~
  222 |                 goto out_free;
      |                 ~~~~~~~~~~~~~
src/in_kernel.c:215:20: note: initialize the variable 'curr_reactor' to silence this warning
  215 |         char *curr_reactor;
      |                           ^
      |                            = NULL
2 warnings generated.

Which is correct. Setting curr_reactor to NULL avoids the problem.

Link: https://lkml.kernel.org/r/3a35551149e5ee0cb0950035afcb8082c3b5d05b.1707217097.git.bristot@kernel.org

Cc: stable@vger.kernel.org
Cc: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Cc: Nathan Chancellor &lt;nathan@kernel.org&gt;
Cc: Nick Desaulniers &lt;ndesaulniers@google.com&gt;
Cc: Bill Wendling &lt;morbo@google.com&gt;
Cc: Justin Stitt &lt;justinstitt@google.com&gt;
Cc: Donald Zickus &lt;dzickus@redhat.com&gt;
Fixes: 6d60f89691fc ("tools/rv: Add in-kernel monitor interface")
Signed-off-by: Daniel Bristot de Oliveira &lt;bristot@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rv: Fix addition on an uninitialized variable 'run'</title>
<updated>2023-04-25T21:02:13+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.i.king@gmail.com</email>
</author>
<published>2023-04-24T09:47:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=54a0dffa62de0c91b406ff32082a121ccfa0d7f1'/>
<id>urn:sha1:54a0dffa62de0c91b406ff32082a121ccfa0d7f1</id>
<content type='text'>
The variable run is not initialized however it is being accumulated
by the return value from the call to ikm_run_monitor.  Fix this by
initializing run to zero at the start of the function.

Link: https://lkml.kernel.org/r/20230424094730.105313-1-colin.i.king@gmail.com

Fixes: 4bc4b131d44c ("rv: Add rv tool")

Signed-off-by: Colin Ian King &lt;colin.i.king@gmail.com&gt;
Acked-by: Daniel Bristot de Oliveira &lt;bristot@kernel.org&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tools/rv: Remove unneeded semicolon</title>
<updated>2023-02-01T00:21:12+00:00</updated>
<author>
<name>zhang songyi</name>
<email>zhang.songyi@zte.com.cn</email>
</author>
<published>2022-12-19T06:31:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a37380ef8b54b18717e908e173179bf78c143ed2'/>
<id>urn:sha1:a37380ef8b54b18717e908e173179bf78c143ed2</id>
<content type='text'>
The semicolon after the "}" is unneeded.

Link: https://lore.kernel.org/linux-trace-devel/202212191431057948891@zte.com.cn

Signed-off-by: zhang songyi &lt;zhang.songyi@zte.com.cn&gt;
Acked-by: Daniel Bristot de Oliveira &lt;bristot@kernel.org&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tools/rv: Add in-kernel monitor interface</title>
<updated>2022-12-09T23:06:24+00:00</updated>
<author>
<name>Daniel Bristot de Oliveira</name>
<email>bristot@kernel.org</email>
</author>
<published>2022-11-11T15:53:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6d60f89691fc979e55b88508f4cfa8f6b4c56eac'/>
<id>urn:sha1:6d60f89691fc979e55b88508f4cfa8f6b4c56eac</id>
<content type='text'>
Add the ability to control and trace in-kernel monitors. This is
a generic interface, it will check for existing monitors and enable
standard setup, like enabling reactors.

For example:

  # rv list
  wip                      wakeup in preemptive per-cpu testing monitor. [OFF]
  wwnr                     wakeup while not running per-task testing model. [OFF]

  # rv mon wwnr --help
  rv version 6.1.0-rc4: help

  usage: rv mon wwnr [-h] [-q] [-r reactor] [-s] [-v]
	-h/--help: print this menu and the reactor list
	-r/--reactor 'reactor': enables the 'reactor'
	-s/--self: when tracing (-t), also trace rv command
	-t/--trace: trace monitor's event
	-v/--verbose: print debug messages

  available reactors: nop printk panic

  # rv mon wwnr --trace
          &lt;TASK&gt;-PID      [CPU]  TYPE       ID                    STATE x EVENT                    -&gt; NEXT_STATE               FINAL
              |   |          |     |        |                        |     |                           |                       |
              rv-3613     [001] event     3613                  running x switch_out               -&gt; not_running              Y
            sshd-1248     [005] event     1248                  running x switch_out               -&gt; not_running              Y
          &lt;idle&gt;-0        [005] event       71              not_running x wakeup                   -&gt; not_running              Y
          &lt;idle&gt;-0        [005] event       71              not_running x switch_in                -&gt; running                  N
      kcompactd0-71       [005] event       71                  running x switch_out               -&gt; not_running              Y
          &lt;idle&gt;-0        [000] event      860              not_running x wakeup                   -&gt; not_running              Y
          &lt;idle&gt;-0        [000] event      860              not_running x switch_in                -&gt; running                  N
    systemd-oomd-860      [000] event      860                  running x switch_out               -&gt; not_running              Y
          &lt;idle&gt;-0        [000] event      860              not_running x wakeup                   -&gt; not_running              Y
          &lt;idle&gt;-0        [000] event      860              not_running x switch_in                -&gt; running                  N
    systemd-oomd-860      [000] event      860                  running x switch_out               -&gt; not_running              Y
          &lt;idle&gt;-0        [005] event       71              not_running x wakeup                   -&gt; not_running              Y
          &lt;idle&gt;-0        [005] event       71              not_running x switch_in                -&gt; running                  N
      kcompactd0-71       [005] event       71                  running x switch_out               -&gt; not_running              Y
          &lt;idle&gt;-0        [000] event      860              not_running x wakeup                   -&gt; not_running              Y
          &lt;idle&gt;-0        [000] event      860              not_running x switch_in                -&gt; running                  N
    systemd-oomd-860      [000] event      860                  running x switch_out               -&gt; not_running              Y
          &lt;idle&gt;-0        [001] event     3613              not_running x wakeup                   -&gt; not_running              Y

Link: https://lkml.kernel.org/r/1e57547e3acadda6e23949b2672c89e76ec2ec42.1668180100.git.bristot@kernel.org

Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;
Signed-off-by: Daniel Bristot de Oliveira &lt;bristot@kernel.org&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>rv: Add rv tool</title>
<updated>2022-12-09T23:06:24+00:00</updated>
<author>
<name>Daniel Bristot de Oliveira</name>
<email>bristot@kernel.org</email>
</author>
<published>2022-11-11T15:53:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4bc4b131d44c8ead00130fae678ff6c3417d7e13'/>
<id>urn:sha1:4bc4b131d44c8ead00130fae678ff6c3417d7e13</id>
<content type='text'>
This is the (user-space) runtime verification tool, named rv.

This tool aims to be the interface for in-kernel rv monitors, as
well as the home for monitors in user-space (online asynchronous),
and in *eBPF.

The tool receives a command as the first argument, the current
commands are:

  list	- list all available monitors
  mon	- run a given monitor

Each monitor is an independent piece of software inside the
tool and can have their own arguments.

There is no monitor implemented in this patch, it only
adds the basic structure of the tool, based on rtla.

  # rv --help
    rv version 6.1.0-rc4: help

    usage: rv command [-h] [command_options]

	-h/--help: print this menu

	command: run one of the following command:
	  list: list all available monitors
	  mon:  run a monitor

	[command options]: each command has its own set of options
		           run rv command -h for further information

*dot2bpf is the next patch set, depends on this, doing cleanups.

Link: https://lkml.kernel.org/r/fb51184f3b95aea0d7bfdc33ec09f4153aee84fa.1668180100.git.bristot@kernel.org

Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;
Signed-off-by: Daniel Bristot de Oliveira &lt;bristot@kernel.org&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
</feed>
