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.11.1409251340440.22503@gentwo.org>
Date:	Thu, 25 Sep 2014 13:45:12 -0500 (CDT)
From:	Christoph Lameter <cl@...ux.com>
To:	Fengguang Wu <fengguang.wu@...el.com>
cc:	Dave Hansen <dave.hansen@...el.com>, Tejun Heo <tj@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>, lkp@...org
Subject: Re: [x86/rapl] BUG: unable to handle kernel paging request at
 000000000000d968

On Thu, 25 Sep 2014, Fengguang Wu wrote:

> [   36.889742] BUG: unable to handle kernel paging request at 000000000000d968
> [   36.897739] IP: [<ffffffff81038282>] rapl_event_update+0x82/0xb0

Does this fix it?


Subject: Fix this_cpu_read() in rapl_scale

rapl_pmu is a percpu variable containing a pointer not a percpu struct
from which we would like to fetch the value of a field.

Thus the read must get the pointer and not the target field.

Signed-off-by: Christoph Lameter <cl@...ux.com>

Index: linux/arch/x86/kernel/cpu/perf_event_intel_rapl.c
===================================================================
--- linux.orig/arch/x86/kernel/cpu/perf_event_intel_rapl.c	2014-09-25 08:53:33.262406130 -0500
+++ linux/arch/x86/kernel/cpu/perf_event_intel_rapl.c	2014-09-25 13:42:33.636661521 -0500
@@ -135,7 +135,7 @@ static inline u64 rapl_scale(u64 v)
 	 * or use ldexp(count, -32).
 	 * Watts = Joules/Time delta
 	 */
-	return v << (32 - __this_cpu_read(rapl_pmu->hw_unit));
+	return v << (32 - __this_cpu_read(rapl_pmu)->hw_unit);
 }

 static u64 rapl_event_update(struct perf_event *event)
Download attachment ".dmesg" of type "APPLICATION/OCTET-STREAM" (212998 bytes)

_______________________________________________
LKP mailing list
LKP@...ux.intel.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ