Linux Trace Kernel
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Yifan Feng <evanfengff@gmail.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] ftrace: Reject "!!" in front of a set_ftrace_filter command
Date: Thu, 19 Nov 2026 12:58:31 -0500	[thread overview]
Message-ID: <20261119125831.54ff59bf@gandalf.local.home> (raw)
In-Reply-To: <20261119030900.37343-1-evanfengff@gmail.com>

On Wed, 18 Nov 2026 19:09:00 -0800
Yifan Feng <evanfengff@gmail.com> wrote:

> diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
> index c7d74b33d36d..44a861f021be 100644
> --- a/kernel/trace/ftrace.c
> +++ b/kernel/trace/ftrace.c
> @@ -5846,6 +5846,9 @@ static int ftrace_process_regex(struct ftrace_iterator *iter,
>  
>  	/* command found */
>  

A comment is needed here. Something like:

	/*
	 * A double "!!" confuses the parser. This isn't a boolean operation,
	 * simply reject it.
	 */

> +	if (func[0] == '!' && func[1] == '!')
> +		return -EINVAL;
> +
>  	command = strsep(&next, ":");
>  
>  	guard(mutex)(&ftrace_cmd_mutex);

-- Steve

      reply	other threads:[~2026-11-19 17:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19  3:09 [PATCH v2] ftrace: Reject "!!" in front of a set_ftrace_filter command Yifan Feng
2026-11-19 17:58 ` Steven Rostedt [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=20261119125831.54ff59bf@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=evanfengff@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.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