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]
Date:	Thu, 11 Jul 2013 18:42:04 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	Sasha Levin <sasha.levin@...cle.com>,
	Dave Jones <davej@...hat.com>, Tejun Heo <tj@...nel.org>,
	tglx@...utronix.de, LKML <linux-kernel@...r.kernel.org>,
	trinity@...r.kernel.org
Subject: Re: timer: lockup in run_timer_softirq()

On Wed, Jul 10, 2013 at 08:58:11AM -0400, Steven Rostedt wrote:
> On Wed, 2013-07-10 at 14:42 +0200, Peter Zijlstra wrote:
> 
> > but but but preempt_disable_notrace() isn't an rcu_read_lock().. You can only
> > do that for rcu_sched.
> 
> Right. And not even rcu_sched is safe, as function tracing can trace
> functions out of rcu scope. That's why I had to add that code to do a
> schedule_on_each_cpu() in ftrace.
> 
> > 
> > Anyway, I don't see a nice way out of this mess :/ the entire perf core uses
> > regular RCU and converting all that is going to me a nasty big patch.
> 
> There is an easier way. We can add a way to have perf not trace specific
> functions. Now there's already infrastructure there to pick and choose
> what to trace and what not to for individual function tracing users like
> perf. The trick will be how to annotate them.
> 
> If there's a way to mark a function without moving it to a section, this
> would be possible. Perhaps similar to EXPORT_SYMBOL(). We could add a
> PERF_NOTRACE().
> 
> static void __local_bh_enable()
> {
> 	[...]
> }
> PERF_NOTRACE(__local_bh_enable);
> 
> And add these to a black list of functions that perf should not trace.
> 
> How's that sound?

I'm afraid this is going to be hard to create and hard to keep correct :/

Other than that, a function tracer environment that is safer to use might be
useful for other people as well.
--
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