Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2989731imu; Sun, 9 Dec 2018 14:26:37 -0800 (PST) X-Google-Smtp-Source: AFSGD/VIE6yd0SzK7/YFpPnKohkEceWdAi0lhQxoZj6qLF9t8tDBIVOIPzXGDokjIo7G1iB1OrM7 X-Received: by 2002:a63:2744:: with SMTP id n65mr8799072pgn.65.1544394397628; Sun, 09 Dec 2018 14:26:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544394397; cv=none; d=google.com; s=arc-20160816; b=MlPVFcm5NxG21eRNtcF4/bMgU2RZXnwCTDgLVA8Y4GHRrF1lnMxuEz/GZVrcKQKC1K FPy0g0gPzeobklfB43fMk267IWYUL9i1Ov0YP7imHnAfY9o6dlMB8pgy/XtOPYwgrV8P yfCQFgWTRvd+qUIkkTmS9f0UAm6VeiPUUVogp4p/xm79XRu/OtI4IQF/AU4Q2h4l3hBh TuViwGGzLyznpqSCAaUC/pjHslqpoujue1zHxVP/jyoF+KdlbOjWkn4X8PKMgN8vCgmX 1s0LM3wAmi4pLzfARljECF/C0FxKc1FFNTzwwYOTuoV0jlveORxwckfS4cN8zaPJvNlW ReFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=eElRKa30CJAu2Ybjosy7QOgOFDu9KYUpShsa3csW9HE=; b=wVVgQcjTCIc5VCyCmsXssrBt/J1v49L8M4ePkPoRANoYwp+3HS5h5S5FT2VzOlWtJf NNaaOMS6H+xHp6CrMZT3ujGKx+V9VIjP+dfdDRGxVcqSbcH4tnarrOSJ7wU2j6GOAPPO Xgccn9s94W2Z0V1KGyUh4oRW2egIMtfF8SJUgvNcUH1P92U3Ig3Aaig1+2YpIiJumHIn 0JbsbyOffVoAMV4StSqWJ1IGUJbM9prvUrC6SqgJU9a2vEdISgH8l/8gotKQdreHL4n8 sE0u8zm1sPD/CgZbY5viPMP9wcRhUC2ElI4suKPnpmjqd4sIyz8CTqLSqvd8JwcoiLEJ Rggg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o14si8101382pgi.134.2018.12.09.14.26.22; Sun, 09 Dec 2018 14:26:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727016AbeLIWY6 (ORCPT + 99 others); Sun, 9 Dec 2018 17:24:58 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:34978 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726469AbeLIVzR (ORCPT ); Sun, 9 Dec 2018 16:55:17 -0500 Received: from pub.yeoldevic.com ([81.174.156.145] helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gW72h-0002ii-52; Sun, 09 Dec 2018 21:55:15 +0000 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1gW72e-0003RR-Fc; Sun, 09 Dec 2018 21:55:12 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Andi Kleen" , "Thomas Gleixner" , x86@kernel.org Date: Sun, 09 Dec 2018 21:50:33 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) X-Patchwork-Hint: ignore Subject: [PATCH 3.16 164/328] x86/spectre: Add missing family 6 check to microcode check In-Reply-To: X-SA-Exim-Connect-IP: 81.174.156.145 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.62-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Andi Kleen commit 1ab534e85c93945f7862378d8c8adcf408205b19 upstream. The check for Spectre microcodes does not check for family 6, only the model numbers. Add a family 6 check to avoid ambiguity with other families. Fixes: a5b296636453 ("x86/cpufeature: Blacklist SPEC_CTRL/PRED_CMD on early Spectre v2 microcodes") Signed-off-by: Andi Kleen Signed-off-by: Thomas Gleixner Cc: x86@kernel.org Cc: linux-kernel@vger.kernel.org Link: https://lkml.kernel.org/r/20180824170351.34874-2-andi@firstfloor.org Signed-off-by: Ben Hutchings --- arch/x86/kernel/cpu/intel.c | 3 +++ 1 file changed, 3 insertions(+) --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c @@ -75,6 +75,9 @@ static bool bad_spectre_microcode(struct if (cpu_has(c, X86_FEATURE_HYPERVISOR)) return false; + if (c->x86 != 6) + return false; + for (i = 0; i < ARRAY_SIZE(spectre_bad_microcodes); i++) { if (c->x86_model == spectre_bad_microcodes[i].model && c->x86_mask == spectre_bad_microcodes[i].stepping)