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] [day] [month] [year] [list]
Message-Id: <20190704145631.58e78ce0add30b3987ea8845@kernel.org>
Date:   Thu, 4 Jul 2019 14:56:31 +0900
From:   Masami Hiramatsu <mhiramat@...nel.org>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     linux-kernel@...r.kernel.org, shuah <shuah@...nel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 2/2] ftrace/selftest: Test if set_event/ftrace_pid
 exists before writing

On Wed, 3 Jul 2019 22:01:05 -0400
Steven Rostedt <rostedt@...dmis.org> wrote:

> On Thu, 4 Jul 2019 10:51:26 +0900
> Masami Hiramatsu <mhiramat@...nel.org> wrote:
> 
> > > > diff --git a/tools/testing/selftests/ftrace/test.d/functions b/tools/testing/selftests/ftrace/test.d/functions
> > > > index 779ec11f61bd..a7b06291e32c 100644
> > > > --- a/tools/testing/selftests/ftrace/test.d/functions
> > > > +++ b/tools/testing/selftests/ftrace/test.d/functions
> > > > @@ -91,8 +91,8 @@ initialize_ftrace() { # Reset ftrace to initial-state
> > > >      reset_events_filter
> > > >      reset_ftrace_filter
> > > >      disable_events
> > > > -    echo > set_event_pid	# event tracer is always on
> > > > -    echo > set_ftrace_pid
> > > > +    [ -f set_event_pid ] && echo > set_event_pid  # event tracer is always on  
> > > 
> > > I probably should remove that comment, because I believe that was why
> > > it wasn't tested :-/  
> > 
> > Hmm, OK. I think this comment means "the event tracer is always on if clearing
> > set_event_pid filter". Would this need to be removed?
> 
> When this was added in commit 131f840d5b7 ("selftests: ftrace:
> Initialize ftrace before each test"), we had this:
> 
> +    echo > set_event_pid       # event tracer is always on
> +    [ -f set_ftrace_filter ] && echo | tee set_ftrace_*
> +    [ -f set_graph_function ] && echo | tee set_graph_*
> +    [ -f stack_trace_filter ] && echo > stack_trace_filter
> +    [ -f kprobe_events ] && echo > kprobe_events
> +    [ -f uprobe_events ] && echo > uprobe_events
> 
> Where set_event_pid is the only file not tested for existence. I
> figured that comment was the reason for not testing it. If that was the
> case, then adding a test, I would think we should remove the comment.

Ah, I see.

> 
> Do you agree?

Yes, I agree with removing it.

Thank you!

> 
> -- Steve
> 
> 
> > 
> > Thank you,
> > 
> > > 
> > > -- Steve
> > > 
> > >   
> > > > +    [ -f set_ftrace_pid ] && echo > set_ftrace_pid
> > > >      [ -f set_ftrace_filter ] && echo | tee set_ftrace_*
> > > >      [ -f set_graph_function ] && echo | tee set_graph_*
> > > >      [ -f stack_trace_filter ] && echo > stack_trace_filter  
> > >   
> > 
> > 
> 


-- 
Masami Hiramatsu <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ