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: <20150114010905.GA800@sejong>
Date:	Wed, 14 Jan 2015 10:09:05 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Wang Nan <wangnan0@...wei.com>
Cc:	Steven Rostedt <rostedt@...dmis.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	mingo@...nel.org, Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	paulmck@...ux.vnet.ibm.com, mathieu.desnoyers@...icios.com,
	xiakaixu 00238161 <xiakaixu@...wei.com>
Subject: Re: [PATCH 1/2] tracing: Move enabling tracepoints to just after
 rcu_init()

On Wed, Jan 14, 2015 at 08:12:40AM +0800, Wang Nan wrote:
> Ping...
> 
> On 2015/1/9 12:06, Wang Nan wrote:
> > Hi Steven Rostedt,
> > 
> > During studying your code we find a problem, please see below.
> > 
> >>
> >> From: "Steven Rostedt (Red Hat)" <rostedt@...dmis.org>
> >>
> >> Enabling tracepoints at boot up can be very useful. The tracepoint
> >> can be initialized right after RCU has been. There's no need to
> >> wait for the early_initcall() to be called. That's too late for some
> >> things that can use tracepoints for debugging. Move the logic to
> >> enable tracepoints out of the initcalls and into init/main.c to
> >> right after rcu_init().
> >>
> >> This also allows trace_printk() to be used early too.
> >>
> >> Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1412121539300.16494@nanos
> >> Link: http://lkml.kernel.org/r/20141214164104.307127356@goodmis.org
> >>
> >> Reviewed-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
> >> Suggested-by: Thomas Gleixner <tglx@...utronix.de>
> >> Tested-by: Thomas Gleixner <tglx@...utronix.de>
> >> Acked-by: Thomas Gleixner <tglx@...utronix.de>
> >> Signed-off-by: Steven Rostedt <rostedt@...dmis.org>
> > 
> > [...]
> > 
> >> +void __init trace_init(void)
> >> +{
> >> +	tracer_alloc_buffers();
> >> +	init_ftrace_syscalls();
> >> +	trace_event_init();	
> >> +}
> >> +
> > 
> > [...]
> > 
> >> +
> >> +void __init trace_event_init(void)
> >> +{
> >> +	event_trace_memsetup();
> >> +	init_ftrace_syscalls();
> >> +	event_trace_enable();
> >> +}
> >> +
> > 
> > init_ftrace_syscalls() get called twice by trace_init() and trace_event_init(), some resources are wasted.
> > At lease one of them can be removed.

I think it's more natural to keep it in the trace_event_init().

Thanks,
Namhyung
--
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