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>] [day] [month] [year] [list]
Date:	Wed, 5 Feb 2014 11:28:15 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	junk@...af.co.uk
Cc:	fweisbec@...il.com, Ingo Molnar <mingo@...nel.org>,
	linux-kernel@...r.kernel.org
Subject: [PATCH] perf,x86: Fix Userspace RDPMC switch

Subject: perf,x86: Fix Userspace RDPMC switch
From: Peter Zijlstra <peterz@...radead.org>
Date: Wed Feb  5 11:19:56 CET 2014

The current code forgets to change the CR4 state on the current CPU.
User on_each_cpu() instead of smp_call_function().

Cc: fweisbec@...il.com
Reported-by: Mark Davies <junk@...af.co.uk>
Suggested-by: Mark Davies <junk@...af.co.uk>
Signed-off-by: Peter Zijlstra <peterz@...radead.org>
---
 arch/x86/kernel/cpu/perf_event.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -1826,7 +1826,7 @@ static ssize_t set_attr_rdpmc(struct dev
 
 	if (!!val != !!x86_pmu.attr_rdpmc) {
 		x86_pmu.attr_rdpmc = !!val;
-		smp_call_function(change_rdpmc, (void *)val, 1);
+		on_each_cpu(change_rdpmc, (void *)val, 1);
 	}
 
 	return 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