lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221219132102.0dc6b7b9@gandalf.local.home>
Date:   Mon, 19 Dec 2022 13:21:02 -0500
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Zheng Yejian <zhengyejian1@...wei.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Linux Trace Kernel <linux-trace-kernel@...r.kernel.org>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Ross Zwisler <zwisler@...gle.com>,
        Tom Zanussi <zanussi@...nel.org>
Subject: Re: [PATCH] tracing: Add a way to filter function addresses to
 function names

On Mon, 19 Dec 2022 10:38:50 +0800
Zheng Yejian <zhengyejian1@...wei.com> wrote:

> > diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
> > index 33e0b4f8ebe6..db6e2f399440 100644
> > --- a/kernel/trace/trace_events.c
> > +++ b/kernel/trace/trace_events.c
> > @@ -2822,7 +2822,7 @@ static __init int setup_trace_triggers(char *str)
> >   		if (!trigger)
> >   			break;
> >   		bootup_triggers[i].event = strsep(&trigger, ".");
> > -		bootup_triggers[i].trigger = strsep(&trigger, ".");
> > +		bootup_triggers[i].trigger = strsep(&trigger, "");  
> 
> Would it be better to change to:
> 
>       bootup_triggers[i].trigger = trigger;
> 

Sure, I'll make the update.

> Because there is unnecessary loop if call strsep(s, "") :-)
>    strsep(s, ct) {
>      strpbrk(cs, ct) {
>        // when 'ct' is empty string, here will always return NULL
>        // after traversing string 'cs'

I'm not sure what you mean about an extra loop.

Thanks,

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ