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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <A5ED84D3BB3A384992CBB9C77DEDA4D414A9A312@USINDEM103.corp.hds.com>
Date:	Sat, 16 Feb 2013 05:18:53 +0000
From:	Seiji Aguchi <seiji.aguchi@....com>
To:	Steven Rostedt <rostedt@...dmis.org>,
	"H. Peter Anvin" <hpa@...or.com>
CC:	"x86@...nel.org" <x86@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"Thomas Gleixner (tglx@...utronix.de)" <tglx@...utronix.de>,
	"'mingo@...e.hu' (mingo@...e.hu)" <mingo@...e.hu>,
	"Borislav Petkov (bp@...en8.de)" <bp@...en8.de>,
	Satoru Moriya <satoru.moriya@....com>,
	"dle-develop@...ts.sourceforge.net" 
	<dle-develop@...ts.sourceforge.net>,
	"linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
	"Luck, Tony (tony.luck@...el.com)" <tony.luck@...el.com>,
	"Paul E. McKenney" <paulmck@...ibm.com>
Subject: RE: [PATCH v9 3/3] trace,x86: code-sharing between non-trace and
 trace irq handlers

> > How important is it that the tracepoint is *inside* the enter/exit
> > handling?  If not, it would be simpler to just do:
> >
> > smp_trace_irq_handler()
> > {
> > 	trace_irq_entry();
> > 	smp_irq_handler();
> > 	trace_irq_exit();
> > }
> >
> > ... which seems a bit cleaner.  If this isn't possible, then this
> > patch is fine, but please add to the patch description why the simple
> > wrapper isn't doable.
> 
> The problem is with irq_enter/exit() being called. They must be called before trace_irq_enter/exit(), because of the rcu_irq_enter()
> must be called before any tracepoints are used, as tracepoints use rcu to synchronize.
>

I tried to place tracepoints outside the enter/exit handling. But it didn't work because of the rcu_irq_enter().

> Now perhaps we could do this and have trace_irq_entry().
> 
> Not only that, the tracepoint callbacks expect irq_enter() to already be called.
> 
> Hmm, if irq_enter() can nest, which I think it can, perhaps we can call
> irq_enter() first. I'm not sure if that will screw up the second
> irq_entry() inside smp_irq_handler().
> 
> smp_trace_irq_hander()
> {
> 	irq_entry();
> 	trace_irq_entry();
> 	smp_irq_handler();
> 	trace_irq_exit();
> 	irq_exit();
> }

If irq_enter() is nested, it may have a time penalty because it has to check if it was already called or not.  
It doesn't satisfy a goal of this patch.
Therefore, I think current coding is reasonable.

I will update the patch description.

Seiji
--
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