Linux Trace Kernel
 help / color / mirror / Atom feed
From: Gabriele Monaco <gmonaco@redhat.com>
To: linux-kernel@vger.kernel.org,
	Steven Rostedt <rostedt@goodmis.org>,
	Gabriele Monaco <gmonaco@redhat.com>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	linux-trace-kernel@vger.kernel.org
Cc: Nam Cao <namcao@linutronix.de>,
	Tobias Schaffner <tobias.schaffner@siemens.com>
Subject: [PATCH] rv: Fix BTF confusion in rv.h
Date: Mon, 23 Nov 2026 09:37:08 +0100	[thread overview]
Message-ID: <20261123083709.62502-1-gmonaco@redhat.com> (raw)

The private rv.h header includes directly the private ../trace.h header,
this brings a series of unneeded dependencies and, if included with
da_monitor.h, may cause failures for duplicated symbols in BTF (namely,
the events symbol).

Only import what is really necessary:
 * trace.h is necessary only in rv.c (init function)
 * the public tracepoint.h covers most uses
 * other specific headers are now needed (interrupt.h)
 * re-define RV_MODE_* as it is only private in trace

Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
---
 kernel/trace/rv/monitors/sts/sts_kunit.c | 1 +
 kernel/trace/rv/rv.c                     | 1 +
 kernel/trace/rv/rv.h                     | 6 +++---
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/kernel/trace/rv/monitors/sts/sts_kunit.c b/kernel/trace/rv/monitors/sts/sts_kunit.c
index a07316fff091..92836adbc620 100644
--- a/kernel/trace/rv/monitors/sts/sts_kunit.c
+++ b/kernel/trace/rv/monitors/sts/sts_kunit.c
@@ -3,6 +3,7 @@
 #include <linux/rv.h>
 #include <rv/kunit.h>
 #include <trace/events/sched.h>
+#include <linux/interrupt.h>
 #include "sts_kunit.h"
 
 #if IS_REACHABLE(CONFIG_RV_MON_STS)
diff --git a/kernel/trace/rv/rv.c b/kernel/trace/rv/rv.c
index 29f155c6968b..e37f0f7c990b 100644
--- a/kernel/trace/rv/rv.c
+++ b/kernel/trace/rv/rv.c
@@ -142,6 +142,7 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/slab.h>
+#include "../trace.h"
 
 #ifdef CONFIG_RV_MON_EVENTS
 #define CREATE_TRACE_POINTS
diff --git a/kernel/trace/rv/rv.h b/kernel/trace/rv/rv.h
index 62779e6b74bd..dbcb7a3a41a8 100644
--- a/kernel/trace/rv/rv.h
+++ b/kernel/trace/rv/rv.h
@@ -9,12 +9,12 @@ struct rv_interface {
 	struct dentry		*monitors_dir;
 };
 
-#include "../trace.h"
+#include <linux/tracepoint.h>
 #include <linux/tracefs.h>
 #include <linux/rv.h>
 
-#define RV_MODE_WRITE			TRACE_MODE_WRITE
-#define RV_MODE_READ			TRACE_MODE_READ
+#define RV_MODE_WRITE			0640
+#define RV_MODE_READ			0440
 
 #define rv_create_dir			tracefs_create_dir
 #define rv_create_file			tracefs_create_file

base-commit: 7475ea8b58616b33c04afb976cf0fbaad9dd63fb
-- 
2.56.1


                 reply	other threads:[~2026-11-23  8:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261123083709.62502-1-gmonaco@redhat.com \
    --to=gmonaco@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=namcao@linutronix.de \
    --cc=rostedt@goodmis.org \
    --cc=tobias.schaffner@siemens.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox