Thread (32 messages) 32 messages, 3 authors, 2025-08-06

Re: [PATCH 1/5] rv/ltl: Prepare for other monitor types

From: Gabriele Monaco <gmonaco@redhat.com>
Date: 2025-07-31 09:04:50
Also in: lkml
Subsystem: runtime verification (rv), the rest · Maintainers: Steven Rostedt, Gabriele Monaco, Linus Torvalds

On Wed, 2025-07-30 at 14:45 +0200, Nam Cao wrote:
quoted hunk ↗ jump to hunk
rv/ltl_monitor.h is the template file used by all LTL monitors. But
only per-task monitor is supported.

No functional change intended.

Signed-off-by: Nam Cao <redacted>
---
 include/linux/rv.h                            |  1 +
 include/rv/ltl_monitor.h                      | 85 +++++++++++------
--
 .../trace/rv/monitors/pagefault/pagefault.h   |  2 +
 kernel/trace/rv/monitors/sleep/sleep.h        |  2 +
 4 files changed, 55 insertions(+), 35 deletions(-)
diff --git a/include/linux/rv.h b/include/linux/rv.h
index 14410a42faef..175438a22641 100644
--- a/include/linux/rv.h
+++ b/include/linux/rv.h
@@ -28,6 +28,7 @@ struct da_monitor {
 
 #ifdef CONFIG_RV_LTL_MONITOR
 
+#define LTL_TASK_MONITOR 0
I stole your solution to get rid of macros for the DA as well (might
post it after this merge window or with the next changes) and I'm
currently running with this:
diff --git a/include/linux/rv.h b/include/linux/rv.h
index 14410a42faef..6a7594080db1 100644
--- a/include/linux/rv.h
+++ b/include/linux/rv.h
@@ -13,6 +13,10 @@
 #define MAX_DA_NAME_LEN			32
 #define MAX_DA_RETRY_RACING_EVENTS	3
 
+#define RV_MON_GLOBAL   0
+#define RV_MON_PER_CPU  1
+#define RV_MON_PER_TASK 2
+
The numbers don't really matter and you don't need to implement all, of
course.
I'm not sure how are our patches going to coordinate, but I think it
may make sense to share those values for all monitor types.

What do you think?

For the rest this patch looks good to me, nice use of the typedef.

Reviewed-by: Gabriele Monaco <gmonaco@redhat.com>

Thanks,
Gabriele
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help