[GIT PULL] rv: Fixes for v6.17

Steven Rostedt posted 1 patch 1 week, 6 days ago
MAINTAINERS                            | 1 +
include/linux/rv.h                     | 6 ++----
kernel/trace/rv/monitors/sleep/sleep.c | 4 ++++
kernel/trace/rv/rv.c                   | 4 ++--
4 files changed, 9 insertions(+), 6 deletions(-)
[GIT PULL] rv: Fixes for v6.17
Posted by Steven Rostedt 1 week, 6 days ago

Linus,

Runtime Verifier fixes for v6.17

- Fix build in some RISC-V flavours

  Some system calls only are available for the 64bit RISC-V machines.
  #ifdef out the cases of clock_nanosleep and futex in the sleep monitor
  if they are not supported by the architecture.

- Fix wrong cast, obsolete after refactoring

  Use container_of() to get to the rv_monitor structure from the
  enable_monitors_next() 'p' pointer. The assignment worked only because
  the list field used happened to be the first field of the structure.

- Remove redundant include files

  Some include files were listed twice. Remove the extra ones and sort
  the includes.

- Fix missing unlock on failure

  There was an error path that exited the rv_register_monitor() function
  without releasing a lock. Change that to goto the lock release.

- Add Gabriele Monaco to be Runtime Verifier maintainer

  Gabriele is doing most of the work on RV as well as collecting patches.
  Add him to the maintainers file for Runtime Verification.


Please pull the latest trace-rv-v6.17-rc5 tree, which can be found at:


  git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
trace-rv-v6.17-rc5

Tag SHA1: ecf198bd883bc43654e237c91bb2964f4b89dab6
Head SHA1: ef442fc5c1a9a2a232de85a0e6967f388b6c0c8e


Akhilesh Patil (1):
      include/linux/rv.h: remove redundant include file

Nam Cao (1):
      rv: Fix wrong type cast in enabled_monitors_next()

Palmer Dabbelt (1):
      rv: Support systems with time64-only syscalls

Steven Rostedt (1):
      rv: Add Gabriele Monaco as maintainer for Runtime Verification

Zhen Ni (1):
      rv: Fix missing mutex unlock in rv_register_monitor()

----
 MAINTAINERS                            | 1 +
 include/linux/rv.h                     | 6 ++----
 kernel/trace/rv/monitors/sleep/sleep.c | 4 ++++
 kernel/trace/rv/rv.c                   | 4 ++--
 4 files changed, 9 insertions(+), 6 deletions(-)
---------------------------
diff --git a/MAINTAINERS b/MAINTAINERS
index cd7ff55b5d32..17073c075bf7 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -22048,6 +22048,7 @@ F:	drivers/infiniband/ulp/rtrs/
 
 RUNTIME VERIFICATION (RV)
 M:	Steven Rostedt <rostedt@goodmis.org>
+M:	Gabriele Monaco <gmonaco@redhat.com>
 L:	linux-trace-kernel@vger.kernel.org
 S:	Maintained
 F:	Documentation/trace/rv/
diff --git a/include/linux/rv.h b/include/linux/rv.h
index 14410a42faef..9520aab34bcb 100644
--- a/include/linux/rv.h
+++ b/include/linux/rv.h
@@ -7,16 +7,14 @@
 #ifndef _LINUX_RV_H
 #define _LINUX_RV_H
 
-#include <linux/types.h>
-#include <linux/list.h>
-
 #define MAX_DA_NAME_LEN			32
 #define MAX_DA_RETRY_RACING_EVENTS	3
 
 #ifdef CONFIG_RV
+#include <linux/array_size.h>
 #include <linux/bitops.h>
+#include <linux/list.h>
 #include <linux/types.h>
-#include <linux/array_size.h>
 
 /*
  * Deterministic automaton per-object variables.
diff --git a/kernel/trace/rv/monitors/sleep/sleep.c b/kernel/trace/rv/monitors/sleep/sleep.c
index eea447b06907..c1347da69e9d 100644
--- a/kernel/trace/rv/monitors/sleep/sleep.c
+++ b/kernel/trace/rv/monitors/sleep/sleep.c
@@ -127,7 +127,9 @@ static void handle_sys_enter(void *data, struct pt_regs *regs, long id)
 	mon = ltl_get_monitor(current);
 
 	switch (id) {
+#ifdef __NR_clock_nanosleep
 	case __NR_clock_nanosleep:
+#endif
 #ifdef __NR_clock_nanosleep_time64
 	case __NR_clock_nanosleep_time64:
 #endif
@@ -138,7 +140,9 @@ static void handle_sys_enter(void *data, struct pt_regs *regs, long id)
 		ltl_atom_update(current, LTL_CLOCK_NANOSLEEP, true);
 		break;
 
+#ifdef __NR_futex
 	case __NR_futex:
+#endif
 #ifdef __NR_futex_time64
 	case __NR_futex_time64:
 #endif
diff --git a/kernel/trace/rv/rv.c b/kernel/trace/rv/rv.c
index 1482e91c39f4..48338520376f 100644
--- a/kernel/trace/rv/rv.c
+++ b/kernel/trace/rv/rv.c
@@ -495,7 +495,7 @@ static void *available_monitors_next(struct seq_file *m, void *p, loff_t *pos)
  */
 static void *enabled_monitors_next(struct seq_file *m, void *p, loff_t *pos)
 {
-	struct rv_monitor *mon = p;
+	struct rv_monitor *mon = container_of(p, struct rv_monitor, list);
 
 	(*pos)++;
 
@@ -805,7 +805,7 @@ int rv_register_monitor(struct rv_monitor *monitor, struct rv_monitor *parent)
 
 	retval = create_monitor_dir(monitor, parent);
 	if (retval)
-		return retval;
+		goto out_unlock;
 
 	/* keep children close to the parent for easier visualisation */
 	if (parent)
Re: [GIT PULL] rv: Fixes for v6.17
Posted by pr-tracker-bot@kernel.org 1 week, 6 days ago
The pull request you sent on Thu, 18 Sep 2025 16:35:51 -0400:

> git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git trace-rv-v6.17-rc5

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/097a6c336d0080725c626fda118ecfec448acd0f

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html