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: <20090615184250.GB6520@Krystal>
Date:	Mon, 15 Jun 2009 14:42:50 -0400
From:	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>, mingo@...hat.com,
	hpa@...or.com, paulus@...ba.org, acme@...hat.com,
	linux-kernel@...r.kernel.org, a.p.zijlstra@...llo.nl,
	penberg@...helsinki.fi, vegard.nossum@...il.com, efault@....de,
	jeremy@...p.org, npiggin@...e.de, tglx@...utronix.de,
	linux-tip-commits@...r.kernel.org
Subject: Re: [tip:perfcounters/core] perf_counter: x86: Fix call-chain
	support to use NMI-safe methods

* Ingo Molnar (mingo@...e.hu) wrote:
> 
> * Ingo Molnar <mingo@...e.hu> wrote:
> 
> > The GUP based method is pretty generic though - and can be used on 
> > other architectures as well. It's not as fast as direct access 
> > though.
> 
> Another question is: your patch switches over all normal exceptions 
> from IRET to hand-unroll+RET.
> 

Nope, it actually only switches the exceptions returning from an
exception handler nested in NMI context to the hand-unroll+RET version.
Given such exception nesting is expected to be very rare, it should not
show any performance difference.

I also organised the code to make sure I did not add any test to the
fast paths in my original patch.

> It would be really nice to benchmark it (via 'perf stat' for example 
> ;-) whether that's a slowdown or a speedup.
> 
> If it's a slowdown then the decision is easy: we dont want this, we 
> want to push the overhead into the sampling code, away from common 
> codepaths.
> 

I did not try to make the "hand unroll + ret" the default. I therefore
don't know if it is faster or slower than iret. But I prefered to stay
on the safe side and only modify the exceptions nested within NMI
handlers.

Mathieu

> [ If on the other hand it's a speedup of a few cycles then we have 
>   the problem of me suddenly liking this patch a whole lot more ;-) ]
> 
> 	Ingo

-- 
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
--
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