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:	Wed, 21 Dec 2011 17:19:23 -0500 (EST)
From:	Vince Weaver <vince@...ter.net>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
cc:	Vince Weaver <vweaver1@...s.utk.edu>, mingo@...e.hu,
	William Cohen <wcohen@...hat.com>,
	Stephane Eranian <eranian@...gle.com>,
	Arun Sharma <asharma@...com>, linux-kernel@...r.kernel.org
Subject: Re: [RFC][PATCH 0/6] perf: x86 RDPMC and RDTSC support

On Wed, 21 Dec 2011, Peter Zijlstra wrote:

> On Wed, 2011-12-21 at 16:32 -0500, Vince Weaver wrote:
> 
> > * One, is it possible to detect at runtime that rdpmc() is supported?  
> >   Maybe a field in the mmap'd buffer that can be read?
> 
> Ingo suggested a similar thing, will implement (although Christmas might
> interfere with delivery timelines etc..).

no rush.

> > * Second, if I try a start / run 100M instructions / read
> >   and measure retired instructions I get:
> >       281474977711543 instructions
> >   This is 0x10000000f45b7 which is 1<<48 + 100M.  I guess an artifact
> >   of how the counters are set up?  Is it possible to have this start
> >   at 0?  
> 
> Its supposed to be 0 based, clearly I messed up something and need to go
> figure out what. Thanks for reporting.

That's on a Nehalem machine, if it matters.

Speaking of bit 48, does your implementation do anything useful about
the 32/40/48 bit limitation that some processors have with rdpmc?
Or is the answer that if you might get overflow, then you have to use slow 
syscall-based read?

perfctr has some pretty clever code that manages to use rdpmc() while 
avoiding the overflow issue, but it was written at a time when older 
processors were in use and where this was more of an issue.

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