lkml.org 
[lkml]   [2022]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] tracing/eprobe: Update cond flag before enabling trigger
On Thu, 24 Nov 2022 01:01:52 +0900
Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote:

> On Fri, 18 Nov 2022 11:19:40 -0500
> Steven Rostedt <rostedt@goodmis.org> wrote:
>
> > On Fri, 18 Nov 2022 10:34:40 -0300
> > Rafael Mendonca <rafaelmendsr@gmail.com> wrote:
> >
> > > It did not trigger the NULL pointer issue to be more specific. When
> > > creating event probe for all events I was unable to create any event for
> > > the xhci-hcd system:
> > >
> > > root@localhost:/sys/kernel/tracing# echo 'e xhci-hcd/xhci_add_endpoint' > dynamic_events
> > > -bash: echo: write error: Invalid argument
> > >
> > > Debugging the issue it seems that the problem is in the is_good_name()
> > > check, which returns false for "xhci-hcd". Should we sanitize it by
> >
> > Ouch. I didn't realize that.
>
> Maybe we need better error message so that user can notice which character
> caused the error.
>
> >
> > > converting '-' into '_'?
> >
> > Actually, it's just the system name that's an issue. I tested this patch
> > and it appears to work.
>
> Ah, the system name is more flexible than the event name because it has
> TRACE_SYSTEM_VAR.
>
> Steve, can you send me the below patch?

I already did ;-)

https://patchwork.kernel.org/project/linux-trace-kernel/patch/20221122122345.160f5077@gandalf.local.home/


>
> BTW, TRACE_DEFINE_ENUM() and TRACE_DEFINE_SIZEOF() macros are using
> TRACE_SYSTEM instead of TRACE_SYSTEM_VAR. Should those use TRACE_SYSTEM_VAR
> for defining a variable?

Hmm, good question. Probably. But since nothing that has a bad name uses
it, we can fix that whenever (but before a system with a hyphen uses those
macros). Do you want to make the change, or shall I?

-- Steve

\
 
 \ /
  Last update: 2022-11-23 17:34    [W:0.079 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site