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]
Message-ID: <20150521001935.GD11568@us.ibm.com>
Date:	Wed, 20 May 2015 17:19:35 -0700
From:	Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>
To:	Andi Kleen <ak@...ux.intel.com>
Cc:	mingo@...hat.com, Michael Ellerman <mpe@...erman.id.au>,
	Jiri Olsa <jolsa@...hat.com>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Paul Mackerras <paulus@...ba.org>, namhyung@...nel.org,
	linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/4] perf: Use pmu_events_map table to create event
 aliases

Andi Kleen [ak@...ux.intel.com] wrote:
| > +/*
| > + * Return TRUE if the CPU identified by @vfm, @version, and @type
| > + * matches the current CPU.  vfm refers to [Vendor, Family, Model],
| > + *
| > + * Return FALSE otherwise.
| > + *
| > + * For Powerpc, we only compare @version to the processor PVR.
| > + */
| > +bool arch_pmu_events_match_cpu(const char *vfm __maybe_unused,
| > +				const char *version,
| > +				const char *type __maybe_unused)
| > +{
| > +	char *cpustr;
| > +	bool rc;
| > +
| > +	cpustr = get_cpu_str();
| > +	rc = !strcmp(version, cpustr);
| 
| 
| Surely against vfm not version
| I think your mapfile is wrong if that works?

Like I say in the comment, and elsewhere, each archictecture
could use a subset of [vfm, version, type] to match the CPU.

On Power, we use the PVR, which is a string like "004d0100",
to uniquely identify the CPU.

Obviously, that does not fit into the VFM field. We could either
add a new PVR field to the mapfile:

	[vfm, version, type, pvr]

or, as the patch currently does, let architectures intepret the
"version" field as they see fit?

IOW, leave it to architectures to keep arch_pmu_events_match_cpu()
consistent with _their_ mapfile?

| 
| That's the Intel format:
| 
| .vfm = "GenuineIntel-6-3E",
|         .version = "V16",
|         .type = "core",
|         .table = pme_IvyTown_core
| 
| 
| -Andi

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