public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Tao Chen <chentao.kernel@linux.alibaba.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@redhat.com>,
	Tzvetomir Stoyanov <tz.stoyanov@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tracing/eprobe: Fix alloc event dir failed when event name no set
Date: Fri, 23 Sep 2022 14:29:14 +0900	[thread overview]
Message-ID: <20220923142914.3488abb9f60422f27584896e@kernel.org> (raw)
In-Reply-To: <1663504148-40723-1-git-send-email-chentao.kernel@linux.alibaba.com>

On Sun, 18 Sep 2022 20:29:08 +0800
Tao Chen <chentao.kernel@linux.alibaba.com> wrote:

> The event dir will alloc failed when event name no set, using the
> command:
> "echo "e:esys/ syscalls/sys_enter_openat file=\$filename:string"
> >> dynamic_events"
> It seems that dir name="syscalls/sys_enter_openat" is not allowed
> in debugfs. So just use the "sys_enter_openat" as the event name.

Good catch! 

> 
> Fixes: 7491e2c44278 ("tracing: Add a probe that attaches to trace
> events")

But actually, this code was introduced by below commit, so Fixes tag
must be updated. (this is important because stable backport version
will be decided by this tag.)

Fixes: 95c104c378dc ("tracing: Auto generate event name when creating a group of events")

Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>

Thank you!

> Signed-off-by: Tao Chen <chentao.kernel@linux.alibaba.com>
> ---
>  kernel/trace/trace_eprobe.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/kernel/trace/trace_eprobe.c b/kernel/trace/trace_eprobe.c
> index 1783e3478912..a8938e54cd34 100644
> --- a/kernel/trace/trace_eprobe.c
> +++ b/kernel/trace/trace_eprobe.c
> @@ -968,8 +968,7 @@ static int __trace_eprobe_create(int argc, const char *argv[])
>  	}
>  
>  	if (!event) {
> -		strscpy(buf1, argv[1], MAX_EVENT_NAME_LEN);
> -		sanitize_event_name(buf1);
> +		strscpy(buf1, sys_event, MAX_EVENT_NAME_LEN);
>  		event = buf1;
>  	}
>  
> -- 
> 2.32.0
> 


-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>

  reply	other threads:[~2022-09-23  5:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-18 12:29 [PATCH] tracing/eprobe: Fix alloc event dir failed when event name no set Tao Chen
2022-09-23  5:29 ` Masami Hiramatsu [this message]
2022-09-24 13:25   ` Tao Chen

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=20220923142914.3488abb9f60422f27584896e@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=chentao.kernel@linux.alibaba.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=tz.stoyanov@gmail.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