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-next>] [day] [month] [year] [list]
Date:	Thu, 23 Apr 2015 07:47:38 +0200
From:	Stephane Eranian <eranian@...gle.com>
To:	linux-kernel@...r.kernel.org
Cc:	peterz@...radead.org, ak@...ux.intel.com, kan.liang@...el.com,
	mingo@...e.hu, sonnyrao@...omium.org
Subject: [PATCH] perf/x86/intel/uncore: fix IMC missing box initialization


This patch fixes a bug introduced by:

commit c05199e5a57a579fea1e8fa65e2b511ceb524ffc
Author: Kan Liang <kan.liang@...el.com>
Date:   Tue Jan 20 04:54:25 2015 +0000

    perf/x86/intel/uncore: Move uncore_box_init() out of driver initialization

It moves uncore_box_init() out of place but this meant that for desktop memory
controller (IMC) PCI-based PMU, the intialization was now missing causing a
crash at first access. This patch fixes the issue by adding the call to the
uncore_enable_box() in snb_uncore_imc_read_counter() to ensure the box
is initialized and the PCI BAR is io-remapped.

Signed-off-by: Stephane Eranian <eranian@...gle.com>
--

diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore_snb.c b/arch/x86/kernel/cpu/perf_event_intel_uncore_snb.c
index 4562e9e..755ec05 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore_snb.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore_snb.c
@@ -329,6 +329,9 @@ static void snb_uncore_imc_event_start(struct perf_event *event, int flags)
 
 	list_add_tail(&event->active_entry, &box->active_list);
 
+	if (box->n_active == 1)
+		uncore_enable_box(box);
+
 	count = snb_uncore_imc_read_counter(box, event);
 	local64_set(&event->hw.prev_count, count);
 
--
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