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: <tip-14cddfd5308b0880abd6e58b6660f5cc8e8020f9@git.kernel.org>
Date:	Thu, 12 May 2016 03:28:20 -0700
From:	tip-bot for Yazen Ghannam <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	bp@...en8.de, dvlasenk@...hat.com, tony.luck@...el.com,
	Yazen.Ghannam@....com, luto@...capital.net, hpa@...or.com,
	bp@...e.de, brgerst@...il.com, peterz@...radead.org,
	mingo@...nel.org, linux-kernel@...r.kernel.org, tglx@...utronix.de,
	torvalds@...ux-foundation.org, linux-edac@...r.kernel.org
Subject: [tip:ras/core] x86/mce: Update AMD mcheck init to use cpu_has()
 facilities

Commit-ID:  14cddfd5308b0880abd6e58b6660f5cc8e8020f9
Gitweb:     http://git.kernel.org/tip/14cddfd5308b0880abd6e58b6660f5cc8e8020f9
Author:     Yazen Ghannam <Yazen.Ghannam@....com>
AuthorDate: Wed, 11 May 2016 14:58:27 +0200
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Thu, 12 May 2016 09:08:22 +0200

x86/mce: Update AMD mcheck init to use cpu_has() facilities

Use cpu_has() facilities to find available RAS features rather than
directly reading CPUID 0x80000007_EBX.

Signed-off-by: Yazen Ghannam <Yazen.Ghannam@....com>
[ Use the struct cpuinfo_x86 ptr instead. ]
Signed-off-by: Borislav Petkov <bp@...e.de>
Cc: Andy Lutomirski <luto@...capital.net>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Brian Gerst <brgerst@...il.com>
Cc: Denys Vlasenko <dvlasenk@...hat.com>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Tony Luck <tony.luck@...el.com>
Cc: linux-edac <linux-edac@...r.kernel.org>
Link: http://lkml.kernel.org/r/1462971509-3856-6-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 arch/x86/kernel/cpu/mcheck/mce.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index aeda446..92e5e37 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -1683,11 +1683,9 @@ static void __mcheck_cpu_init_vendor(struct cpuinfo_x86 *c)
 		break;
 
 	case X86_VENDOR_AMD: {
-		u32 ebx = cpuid_ebx(0x80000007);
-
-		mce_flags.overflow_recov = !!(ebx & BIT(0));
-		mce_flags.succor	 = !!(ebx & BIT(1));
-		mce_flags.smca		 = !!(ebx & BIT(3));
+		mce_flags.overflow_recov = !!cpu_has(c, X86_FEATURE_OVERFLOW_RECOV);
+		mce_flags.succor	 = !!cpu_has(c, X86_FEATURE_SUCCOR);
+		mce_flags.smca		 = !!cpu_has(c, X86_FEATURE_SMCA);
 
 		/*
 		 * Install proper ops for Scalable MCA enabled processors

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ