Skip to content

Commit 097a6c3

Browse files
committed
Merge tag 'trace-rv-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull runtime verifier fixes from Steven Rostedt: - 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. * tag 'trace-rv-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: rv: Add Gabriele Monaco as maintainer for Runtime Verification rv: Fix missing mutex unlock in rv_register_monitor() include/linux/rv.h: remove redundant include file rv: Fix wrong type cast in enabled_monitors_next() rv: Support systems with time64-only syscalls
2 parents cbf658d + ef442fc commit 097a6c3

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22052,6 +22052,7 @@ F: drivers/infiniband/ulp/rtrs/
2205222052

2205322053
RUNTIME VERIFICATION (RV)
2205422054
M: Steven Rostedt <rostedt@goodmis.org>
22055+
M: Gabriele Monaco <gmonaco@redhat.com>
2205522056
L: linux-trace-kernel@vger.kernel.org
2205622057
S: Maintained
2205722058
F: Documentation/trace/rv/

include/linux/rv.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,14 @@
77
#ifndef _LINUX_RV_H
88
#define _LINUX_RV_H
99

10-
#include <linux/types.h>
11-
#include <linux/list.h>
12-
1310
#define MAX_DA_NAME_LEN 32
1411
#define MAX_DA_RETRY_RACING_EVENTS 3
1512

1613
#ifdef CONFIG_RV
14+
#include <linux/array_size.h>
1715
#include <linux/bitops.h>
16+
#include <linux/list.h>
1817
#include <linux/types.h>
19-
#include <linux/array_size.h>
2018

2119
/*
2220
* Deterministic automaton per-object variables.

kernel/trace/rv/monitors/sleep/sleep.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ static void handle_sys_enter(void *data, struct pt_regs *regs, long id)
127127
mon = ltl_get_monitor(current);
128128

129129
switch (id) {
130+
#ifdef __NR_clock_nanosleep
130131
case __NR_clock_nanosleep:
132+
#endif
131133
#ifdef __NR_clock_nanosleep_time64
132134
case __NR_clock_nanosleep_time64:
133135
#endif
@@ -138,7 +140,9 @@ static void handle_sys_enter(void *data, struct pt_regs *regs, long id)
138140
ltl_atom_update(current, LTL_CLOCK_NANOSLEEP, true);
139141
break;
140142

143+
#ifdef __NR_futex
141144
case __NR_futex:
145+
#endif
142146
#ifdef __NR_futex_time64
143147
case __NR_futex_time64:
144148
#endif

kernel/trace/rv/rv.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ static void *available_monitors_next(struct seq_file *m, void *p, loff_t *pos)
495495
*/
496496
static void *enabled_monitors_next(struct seq_file *m, void *p, loff_t *pos)
497497
{
498-
struct rv_monitor *mon = p;
498+
struct rv_monitor *mon = container_of(p, struct rv_monitor, list);
499499

500500
(*pos)++;
501501

@@ -805,7 +805,7 @@ int rv_register_monitor(struct rv_monitor *monitor, struct rv_monitor *parent)
805805

806806
retval = create_monitor_dir(monitor, parent);
807807
if (retval)
808-
return retval;
808+
goto out_unlock;
809809

810810
/* keep children close to the parent for easier visualisation */
811811
if (parent)

0 commit comments

Comments
 (0)