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: <E02DFBB5-4841-4C6F-8142-0E7D0F1D4A30@orcon.net.nz>
Date:	Tue, 25 May 2010 09:58:05 +1200
From:	Michael Cree <mcree@...on.net.nz>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	linux-kernel@...r.kernel.org, Paul Mackerras <paulus@...ba.org>,
	Ingo Molnar <mingo@...e.hu>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Richard Henderson <rth@...ddle.net>,
	Ivan Kokshaysky <ink@...assic.park.msu.ru>,
	Matt Turner <mattst88@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	linux-alpha@...r.kernel.org
Subject: Re: [PATCH 3/3] alpha: Implement HW performance events on the EV67 and later CPUs.

On 4/05/2010, at 7:40 PM, Peter Zijlstra wrote:
> On Sat, 2010-05-01 at 11:55 +1200, Michael Cree wrote:
>> +/* I wonder what this is for ??? */
>> +void set_perf_event_pending(void)
>> +{
>> +}
>
> If the PMU Interrupt comes in as an NMI we cannot take locks and such
> from its handler. So what we do is queue that work to be ran later.  
> The
> kernel has a fallback to run this stuff from the timer hardirq, but if
> the PMI is IRQ context (like ARM) you can simply call
> perf_event_do_pending() at its tail.

My understanding from the Alpha HW Ref. Man. and a brief look at the  
kernel code is that the PMI comes in through the normal IRQ entry  
point on the Alpha.  It is a high priority interrupt and only a  
machine check (i.e. detected hardware failure) can interrupt the PMU  
interrupt handler.  I don't know whether that is an issue for taking  
locks or not and need advice on that.

I originally based the Alpha implementation on the Sparc  
implementation and would've copied the set_perf_event_pending()  
definition from the Sparc code, but I now see that newer Sparc code  
does not have that definition nor does it call perf_event_do_pending()  
in the interrupt handler.

So I need advice on whether to:

1) Just remove the set_perf_event_pending() definition so we are like  
the Sparc code,

2) Add perf_event_do_pending() to the tail of the IRQ handler so we  
are like the ARM code, or

3) Implement the following suggestion:

> Alternatively you can self-IPI like x86 does and run
> perf_event_do_pending() from there.

Another question is what are the observeable symptoms if an incorrect  
option above is implemented?

Regards
Michael.

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