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]
Message-ID: <7d20be40-4c15-4e15-a4d0-cd2efda6d701@default>
Date:   Mon, 4 Jun 2018 08:16:51 +0000 (UTC)
From:   Zhenzhong Duan <zhenzhong.duan@...cle.com>
To:     Linux-Kernel <linux-kernel@...r.kernel.org>
Cc:     <mingo@...hat.com>, <tglx@...utronix.de>,
        Srinivas REDDY Eeda <srinivas.eeda@...cle.com>,
        <bp@...en8.de>, <hpa@...or.com>
Subject: [PATCH] x86/microcode/intel: Ensure new microcode processor flags
 match with cpu's pf

Intel spec says: 'The processor flags in the 48-byte header and the
processor flags field associated with the extended processor signature
structures may have multiple bits set.'

Make sure processor flags of the new microcode intersect with current
cpu's. Comparing with old microcode's pf can't guarantee this.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@...cle.com>
---
 arch/x86/kernel/cpu/microcode/intel.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
index 461e315..54f4014 100644
--- a/arch/x86/kernel/cpu/microcode/intel.c
+++ b/arch/x86/kernel/cpu/microcode/intel.c
@@ -371,12 +371,10 @@ static int microcode_sanity_check(void *mc, int print_err)
 				goto next;
 
 		} else {
-			struct microcode_header_intel *phdr = &patch->hdr;
-
 			if (!has_newer_microcode(data,
-						 phdr->sig,
-						 phdr->pf,
-						 phdr->rev))
+						 uci->cpu_sig.sig,
+						 uci->cpu_sig.pf,
+						 patch->hdr.rev))
 				goto next;
 		}
 
-- 
1.7.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ