From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH] tracing: dynevent: Add a missing lockdown check on dynevent
Date: Wed, 24 Sep 2025 23:28:03 +0900 [thread overview]
Message-ID: <20250924232803.c6b1973802b969b86bb7a481@kernel.org> (raw)
In-Reply-To: <175824455687.45175.3734166065458520748.stgit@devnote2>
I think this should be backported to stable.
On Fri, 19 Sep 2025 10:15:56 +0900
"Masami Hiramatsu (Google)" <mhiramat@kernel.org> wrote:
> From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
>
> Since dynamic_events interface on tracefs is compatible with
> kprobe_events and uprobe_events, it should also check the lockdown
> status and reject if it is set.
>
> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Fixes: 17911ff38aa5 ("tracing: Add locked_down checks to the open calls of files created for tracefs")
Cc: stable@vger.kernel.org
Thanks,
> ---
> kernel/trace/trace_dynevent.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/kernel/trace/trace_dynevent.c b/kernel/trace/trace_dynevent.c
> index 5d64a18cacac..d06854bd32b3 100644
> --- a/kernel/trace/trace_dynevent.c
> +++ b/kernel/trace/trace_dynevent.c
> @@ -230,6 +230,10 @@ static int dyn_event_open(struct inode *inode, struct file *file)
> {
> int ret;
>
> + ret = security_locked_down(LOCKDOWN_TRACEFS);
> + if (ret)
> + return ret;
> +
> ret = tracing_check_open_get_tr(NULL);
> if (ret)
> return ret;
>
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
prev parent reply other threads:[~2025-09-24 14:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-19 1:15 [PATCH] tracing: dynevent: Add a missing lockdown check on dynevent Masami Hiramatsu (Google)
2025-09-24 14:28 ` Masami Hiramatsu [this message]
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=20250924232803.c6b1973802b969b86bb7a481@kernel.org \
--to=mhiramat@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=rostedt@goodmis.org \
/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;
as well as URLs for NNTP newsgroup(s).