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] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.10.1307111340090.32218@vincent-weaver-1.um.maine.edu>
Date:	Thu, 11 Jul 2013 13:53:11 -0400 (EDT)
From:	Vince Weaver <vincent.weaver@...ne.edu>
To:	Will Deacon <will.deacon@....com>
cc:	Vince Weaver <vincent.weaver@...ne.edu>,
	Peter Zijlstra <peterz@...radead.org>,
	Michael Ellerman <michael@...erman.id.au>,
	Vince Weaver <vince@...ter.net>,
	Runzhen Wang <runzhen@...ux.vnet.ibm.com>,
	"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"paulus@...ba.org" <paulus@...ba.org>,
	"acme@...hat.com" <acme@...hat.com>,
	"mingo@...nel.org" <mingo@...nel.org>,
	Stephane Eranian <eranian@...gle.com>,
	"sukadev@...ux.vnet.ibm.com" <sukadev@...ux.vnet.ibm.com>,
	"xiaoguangrong@...ux.vnet.ibm.com" <xiaoguangrong@...ux.vnet.ibm.com>
Subject: Re: [PATCH v2 2/2] perf tools: Make Power7 events available for
 perf

On Thu, 11 Jul 2013, Will Deacon wrote:
> On Tue, Jul 09, 2013 at 04:05:30PM +0100, Vince Weaver wrote:

> > libpfm4 uses the
> >    CPU part	: 0xc09
> > line in /proc/cpuinfo on ARM, and that's enough for the processors PAPI 
> 
> The CPU part you cite is actually A9-specific, so you probably want to
> probe each CPU specifically. Take a look at the cpuinfo parsing in OProfile
> (used by operf).

I meant we use the CPU part line to probe things.  I just cut and pasted
from a Cortex A9 I had handy as an example.

> > And speaking of ARM, I should be railing at them for breaking the ABI too, 
> > with their (understandable yet still ABI breaking) decision to remove 
> > BogoMIPS from /proc/cpuinfo.  That change will impact PAPI as well as 
> > various other programs I maintain that have the misfortune of parsing that 
> > file.
> 
> Really? Why are you checking for that line at all?

Old programs.

PAPI dates back to the day when processor frequency was meaningful (and 
stable).  In cases where MHz wasn't reported in cpuinfo (mostly MIPS and 
ARM) it tries to estimate it based on BogoMIPS.  Not the sanest thing to 
do, but it worked well enough at the time.  We recently fixed things so it 
should do something reasonable if BogoMIPS is missing, but if users wrote 
their code poorly they can get divide by zero errors if BogoMIPS suddenly 
goes missing from /proc/cpuinfo (and yes we have had a low but non-zero 
number of users report bugs of this type).

Other programs I have (like linux_logo and ll) are 15+ years old and 
simply print the BogoMIPS value for historical reasons.  So they won't 
break if the value goes away but it's still sad to see it go.

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