summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2025-12-05 10:17:00 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2025-12-05 10:17:00 -0800
commit0b1b4a3d8ebec3c42231c306d4b9a5153d047674 (patch)
treec54f9128d49a089bf11e91054e4d7f1f79ba263a /include/linux
parent0771cee974607ffcf19ff6022f971865db8e0b4a (diff)
parentbbaacdc339d4bde2690b659dc090af7c20a1937e (diff)
Merge tag 'trace-rv-6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull runtime verifier updates from Steven Rostedt: - Adapt the ftracetest script to be run from a different folder This uses the already existing OPT_TEST_DIR but extends it further to run independent tests, then add an --rv flag to allow using the script for testing RV (mostly) independently on ftrace. - Add basic RV selftests in selftests/verification for more validations Add more validations for available/enabled monitors and reactors. This could have caught the bug introducing kernel panic solved above. Tests use ftracetest. - Convert react() function in reactor to use va_list directly Use a central helper to handle the variadic arguments. Clean up macros and mark functions as static. - Add lockdep annotations to reactors to have lockdep complain of errors If the reactors are called from improper context. Useful to develop new reactors. This highlights a warning in the panic reactor that is related to the printk subsystem and not to RV. - Convert core RV code to use lock guards and __free helpers This completely removes goto statements. - Fix compilation if !CONFIG_RV_REACTORS Fix the warning by keeping LTL monitor variable as always static. * tag 'trace-rv-6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: rv: Fix compilation if !CONFIG_RV_REACTORS rv: Convert to use __free rv: Convert to use lock guard rv: Add explicit lockdep context for reactors rv: Make rv_reacting_on() static rv: Pass va_list to reactors selftests/verification: Add initial RV tests selftest/ftrace: Generalise ftracetest to use with RV
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/rv.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/linux/rv.h b/include/linux/rv.h
index 9520aab34bcb..92fd467547e7 100644
--- a/include/linux/rv.h
+++ b/include/linux/rv.h
@@ -88,7 +88,7 @@ union rv_task_monitor {
struct rv_reactor {
const char *name;
const char *description;
- __printf(1, 2) void (*react)(const char *msg, ...);
+ __printf(1, 0) void (*react)(const char *msg, va_list args);
struct list_head list;
};
#endif
@@ -102,7 +102,7 @@ struct rv_monitor {
void (*reset)(void);
#ifdef CONFIG_RV_REACTORS
struct rv_reactor *reactor;
- __printf(1, 2) void (*react)(const char *msg, ...);
+ __printf(1, 0) void (*react)(const char *msg, va_list args);
#endif
struct list_head list;
struct rv_monitor *parent;
@@ -116,13 +116,14 @@ int rv_get_task_monitor_slot(void);
void rv_put_task_monitor_slot(int slot);
#ifdef CONFIG_RV_REACTORS
-bool rv_reacting_on(void);
int rv_unregister_reactor(struct rv_reactor *reactor);
int rv_register_reactor(struct rv_reactor *reactor);
+__printf(2, 3)
+void rv_react(struct rv_monitor *monitor, const char *msg, ...);
#else
-static inline bool rv_reacting_on(void)
+__printf(2, 3)
+static inline void rv_react(struct rv_monitor *monitor, const char *msg, ...)
{
- return false;
}
#endif /* CONFIG_RV_REACTORS */