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: <alpine.DEB.2.11.1604201458290.3941@nanos>
Date:	Wed, 20 Apr 2016 15:28:43 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Kan Liang <kan.liang@...el.com>
cc:	peterz@...radead.org, linux-kernel@...r.kernel.org,
	ak@...ux.intel.com, eranian@...gle.com
Subject: Re: [PATCH 1/1] perf/x86/intel/uncore: Add support for Intel SKL
 client uncore

On Fri, 15 Apr 2016, kan.liang@...el.com wrote:
> +static void skl_uncore_msr_init_box(struct intel_uncore_box *box)
> +{
> +	if (box->pmu->pmu_idx == 0) {
> +		wrmsrl(SKL_UNC_PERF_GLOBAL_CTL,
> +			SNB_UNC_GLOBAL_CTL_EN | SKL_UNC_GLOBAL_CTL_CORE_ALL);
> +	}
> +}
> +
> +static void skl_uncore_msr_enable_box(struct intel_uncore_box *box)
> +{
> +	wrmsrl(SKL_UNC_PERF_GLOBAL_CTL,
> +		SNB_UNC_GLOBAL_CTL_EN | SKL_UNC_GLOBAL_CTL_CORE_ALL);
> +}
> +
> +static void skl_uncore_msr_disable_box(struct intel_uncore_box *box)
> +{
> +	wrmsrl(SKL_UNC_PERF_GLOBAL_CTL, 0);
> +}
> +
> +static void skl_uncore_msr_exit_box(struct intel_uncore_box *box)
> +{
> +	if (box->pmu->pmu_idx == 0)
> +		wrmsrl(SKL_UNC_PERF_GLOBAL_CTL, 0);
> +}

The above looks broken.

init() enables the uncore machinery on the node it is running on.

start() enables the uncore machinery on the node it is running on.

stop() disables the uncore machinery on the node it is running on.

So what happens in the following case:

   start(event(box0), node0)

   start(event(box1), node0)

   stop(event(box1), node0)

The stop of the box1 events disables the whole machinery on that node and
therefor the box0 event is wreckaged as well. Hmm?

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ