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]
Date:	Wed, 23 Sep 2015 21:49:43 +0800
From:	Yaowei Bai <bywxiaobai@....com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	mingo@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] kernel/trace: call helper function to check
 global_trace

On Tue, Sep 22, 2015 at 09:58:47AM -0400, Steven Rostedt wrote:
> On Tue, 22 Sep 2015 21:43:12 +0800
> Yaowei Bai <bywxiaobai@....com> wrote:
> 
> > Use helper function tracing_is_enabled() to check if global_trace
> > has been disabled.
> 
> Actually, I prefer not to.
> 
> > 
> > No functional change.
> > 
> > Signed-off-by: Yaowei Bai <bywxiaobai@....com>
> > ---
> >  kernel/trace/trace.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> > index 6e79408..b0bd322a 100644
> > --- a/kernel/trace/trace.c
> > +++ b/kernel/trace/trace.c
> > @@ -7111,7 +7111,7 @@ __init static int tracer_alloc_buffers(void)
> >  		goto out_free_savedcmd;
> >  	}
> >  
> > -	if (global_trace.buffer_disabled)
> > +	if (!tracing_is_enabled())
> 
> Yes, the above is functionally equivalent. But tracing_is_enabled() is
> not a "helper function" but actually an external interface for other
> parts of the tracing system.

Got it.

> 
> The above code is the actual setup of the tracing infrastructure, that
> is used to allocate the tracing buffers. They may now use the same
> logic, but there's no guarantee that it will in the future.

Appreciate you wonderful explanation.

> 
> -- Steve
> 
> 
> >  		tracing_off();
> >  
> >  	if (trace_boot_clock) {

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ