<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/trace/rv/rv_reactors.c, branch v6.19</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.19</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.19'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2025-12-02T06:28:32Z</updated>
<entry>
<title>rv: Convert to use __free</title>
<updated>2025-12-02T06:28:32Z</updated>
<author>
<name>Nam Cao</name>
<email>namcao@linutronix.de</email>
</author>
<published>2025-11-17T09:06:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b30f635bb6492f02f2f704b46d898679371015cb'/>
<id>urn:sha1:b30f635bb6492f02f2f704b46d898679371015cb</id>
<content type='text'>
Convert to use __free to tidy up the code.

Signed-off-by: Nam Cao &lt;namcao@linutronix.de&gt;
Reviewed-by: Gabriele Monaco &lt;gmonaco@redhat.com&gt;
Link: https://lore.kernel.org/r/62854e2fcb8f8dd2180a98a9700702dcf89a6980.1763370183.git.namcao@linutronix.de
Signed-off-by: Gabriele Monaco &lt;gmonaco@redhat.com&gt;
</content>
</entry>
<entry>
<title>rv: Convert to use lock guard</title>
<updated>2025-12-02T06:28:20Z</updated>
<author>
<name>Nam Cao</name>
<email>namcao@linutronix.de</email>
</author>
<published>2025-11-17T09:06:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8db3790c4d57946aaf446704dfd020a39513e213'/>
<id>urn:sha1:8db3790c4d57946aaf446704dfd020a39513e213</id>
<content type='text'>
Convert to use lock guard to tidy up the code.

Signed-off-by: Nam Cao &lt;namcao@linutronix.de&gt;
Reviewed-by: Gabriele Monaco &lt;gmonaco@redhat.com&gt;
Link: https://lore.kernel.org/r/dbefeb868093c40d4b29fd6b57294a6aa011b719.1763370183.git.namcao@linutronix.de
Signed-off-by: Gabriele Monaco &lt;gmonaco@redhat.com&gt;
</content>
</entry>
<entry>
<title>rv: Add explicit lockdep context for reactors</title>
<updated>2025-11-11T12:18:56Z</updated>
<author>
<name>Thomas Weißschuh</name>
<email>thomas.weissschuh@linutronix.de</email>
</author>
<published>2025-10-14T05:51:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=69d8895cb9a9f6450374577af8584c2e21cb5a9f'/>
<id>urn:sha1:69d8895cb9a9f6450374577af8584c2e21cb5a9f</id>
<content type='text'>
Reactors can be called from any context through tracepoints.
When developing reactors care needs to be taken to only call APIs which
are safe. As the tracepoints used during testing may not actually be
called from restrictive contexts lockdep may not be helpful.

Add explicit overrides to help lockdep find invalid code patterns.

The usage of LD_WAIT_FREE will trigger lockdep warnings in the panic
reactor. These are indeed valid warnings but they are out of scope for
RV and will instead be fixed by the printk subsystem.

Signed-off-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Acked-by: Nam Cao &lt;namcao@linutronix.de&gt;
Link: https://lore.kernel.org/r/20251014-rv-lockdep-v1-3-0b9e51919ea8@linutronix.de
Signed-off-by: Gabriele Monaco &lt;gmonaco@redhat.com&gt;
</content>
</entry>
<entry>
<title>rv: Make rv_reacting_on() static</title>
<updated>2025-11-11T12:18:56Z</updated>
<author>
<name>Thomas Weißschuh</name>
<email>thomas.weissschuh@linutronix.de</email>
</author>
<published>2025-10-14T05:51:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=68f63cea46d3a410a41d9ab74d338038a22bc2ad'/>
<id>urn:sha1:68f63cea46d3a410a41d9ab74d338038a22bc2ad</id>
<content type='text'>
There are no external users left.

Signed-off-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Link: https://lore.kernel.org/r/20251014-rv-lockdep-v1-2-0b9e51919ea8@linutronix.de
Signed-off-by: Gabriele Monaco &lt;gmonaco@redhat.com&gt;
</content>
</entry>
<entry>
<title>rv: Pass va_list to reactors</title>
<updated>2025-11-11T12:18:55Z</updated>
<author>
<name>Thomas Weißschuh</name>
<email>thomas.weissschuh@linutronix.de</email>
</author>
<published>2025-10-14T05:51:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4f739ed19d222de33b19ca639a34523fbbec20d0'/>
<id>urn:sha1:4f739ed19d222de33b19ca639a34523fbbec20d0</id>
<content type='text'>
The only thing the reactors can do with the passed in varargs is to
convert it into a va_list. Do that in a central helper instead.
It simplifies the reactors, removes some hairy macro-generated code
and introduces a convenient hook point to modify reactor behavior.

Signed-off-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Link: https://lore.kernel.org/r/20251014-rv-lockdep-v1-1-0b9e51919ea8@linutronix.de
Signed-off-by: Gabriele Monaco &lt;gmonaco@redhat.com&gt;
</content>
</entry>
<entry>
<title>rv: Fix wrong type cast in reactors_show() and monitor_reactor_show()</title>
<updated>2025-07-28T14:39:34Z</updated>
<author>
<name>Nam Cao</name>
<email>namcao@linutronix.de</email>
</author>
<published>2025-07-27T17:31:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3cfb9c1a7db091f9030826b897d07ddce1591e7f'/>
<id>urn:sha1:3cfb9c1a7db091f9030826b897d07ddce1591e7f</id>
<content type='text'>
Argument 'p' of reactors_show() and monitor_reactor_show() is not a pointer
to struct rv_reactor, it is actually a pointer to the list_head inside
struct rv_reactor. Therefore it's wrong to cast 'p' to struct rv_reactor *.

This wrong type cast has been there since the beginning. But it still
worked because the list_head was the first field in struct rv_reactor_def.
This is no longer true since commit 3d3c376118b5 ("rv: Merge struct
rv_reactor_def into struct rv_reactor") moved the list_head, and this wrong
type cast became a functional problem.

Properly use container_of() instead.

Cc: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Cc: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Cc: Gabriele Monaco &lt;gmonaco@redhat.com&gt;
Link: https://lore.kernel.org/b4febbd6844311209e4c8768b65d508b81bd8c9b.1753625621.git.namcao@linutronix.de
Fixes: 3d3c376118b5 ("rv: Merge struct rv_reactor_def into struct rv_reactor")
Signed-off-by: Nam Cao &lt;namcao@linutronix.de&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>rv: Remove struct rv_monitor::reacting</title>
<updated>2025-07-25T13:04:14Z</updated>
<author>
<name>Nam Cao</name>
<email>namcao@linutronix.de</email>
</author>
<published>2025-07-24T17:33:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b8a7fba39cd49eab343bfe561d85bb5dc57541af'/>
<id>urn:sha1:b8a7fba39cd49eab343bfe561d85bb5dc57541af</id>
<content type='text'>
The field 'reacting' in struct rv_monitor is set but never used. Delete it.

Cc: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Cc: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Link: https://lore.kernel.org/a6c16f845d2f1a09c4d0934ab83f3cb14478a71d.1753378331.git.namcao@linutronix.de
Reviewed-by: Gabriele Monaco &lt;gmonaco@redhat.com&gt;
Signed-off-by: Nam Cao &lt;namcao@linutronix.de&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>rv: Remove rv_reactor's reference counter</title>
<updated>2025-07-25T13:04:14Z</updated>
<author>
<name>Nam Cao</name>
<email>namcao@linutronix.de</email>
</author>
<published>2025-07-24T17:33:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3d3800b4f7f4b1472a0ec2cffd535c05603f8f60'/>
<id>urn:sha1:3d3800b4f7f4b1472a0ec2cffd535c05603f8f60</id>
<content type='text'>
rv_reactor has a reference counter to ensure it is not removed while
monitors are still using it.

However, this is futile, as __exit functions are not expected to fail and
will proceed normally despite rv_unregister_reactor() returning an error.

At the moment, reactors do not support being built as modules, therefore
they are never removed and the reference counters are not necessary.

If we support building RV reactors as modules in the future, kernel
module's centralized facilities such as try_module_get(), module_put() or
MODULE_SOFTDEP should be used instead of this custom implementation.

Remove this reference counter.

Cc: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Cc: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Link: https://lore.kernel.org/bb946398436a5e17fb0f5b842ef3313c02291852.1753378331.git.namcao@linutronix.de
Reviewed-by: Gabriele Monaco &lt;gmonaco@redhat.com&gt;
Signed-off-by: Nam Cao &lt;namcao@linutronix.de&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>rv: Merge struct rv_reactor_def into struct rv_reactor</title>
<updated>2025-07-25T13:04:14Z</updated>
<author>
<name>Nam Cao</name>
<email>namcao@linutronix.de</email>
</author>
<published>2025-07-24T17:33:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3d3c376118b5f7ed7723c2b4fd7a0a1c1893d63e'/>
<id>urn:sha1:3d3c376118b5f7ed7723c2b4fd7a0a1c1893d63e</id>
<content type='text'>
Each struct rv_reactor has a unique struct rv_reactor_def associated with
it. struct rv_reactor is statically allocated, while struct rv_reactor_def
is dynamically allocated.

This makes the code more complicated than it should be:

  - Lookup is required to get the associated rv_reactor_def from rv_reactor

  - Dynamic memory allocation is required for rv_reactor_def. This is
    harder to get right compared to static memory. For instance, there is
    an existing mistake: rv_unregister_reactor() does not free the memory
    allocated by rv_register_reactor(). This is fortunately not a real
    memory leak problem as rv_unregister_reactor() is never called.

Simplify and merge rv_reactor_def into rv_reactor.

Cc: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Cc: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Link: https://lore.kernel.org/71cb91c86cd40df5b8c492b788787f2a73c3eaa3.1753378331.git.namcao@linutronix.de
Reviewed-by: Gabriele Monaco &lt;gmonaco@redhat.com&gt;
Signed-off-by: Nam Cao &lt;namcao@linutronix.de&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>rv: Merge struct rv_monitor_def into struct rv_monitor</title>
<updated>2025-07-25T13:04:14Z</updated>
<author>
<name>Nam Cao</name>
<email>namcao@linutronix.de</email>
</author>
<published>2025-07-24T17:33:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=24cbfe18d55a6866bc2e27fda74306f4a1b5cb01'/>
<id>urn:sha1:24cbfe18d55a6866bc2e27fda74306f4a1b5cb01</id>
<content type='text'>
Each struct rv_monitor has a unique struct rv_monitor_def associated with
it. struct rv_monitor is statically allocated, while struct rv_monitor_def
is dynamically allocated.

This makes the code more complicated than it should be:

  - Lookup is required to get the associated rv_monitor_def from rv_monitor

  - Dynamic memory allocation is required for rv_monitor_def. This is
    harder to get right compared to static memory. For instance, there is
    an existing mistake: rv_unregister_monitor() does not free the memory
    allocated by rv_register_monitor(). This is fortunately not a real
    memory leak problem, as rv_unregister_monitor() is never called.

Simplify and merge rv_monitor_def into rv_monitor.

Cc: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Cc: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Link: https://lore.kernel.org/194449c00f87945c207aab4c96920c75796a4f53.1753378331.git.namcao@linutronix.de
Reviewed-by: Gabriele Monaco &lt;gmonaco@redhat.com&gt;
Signed-off-by: Nam Cao &lt;namcao@linutronix.de&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
</feed>
