Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1829162imm; Mon, 3 Sep 2018 10:30:17 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZiEM5WEINT8s01g/d8PQgxwtuy0ZGaN1ymeS4k87VxMTyuReZ57ZQ9l9+f6S6kc7W/0VNL X-Received: by 2002:a62:6a01:: with SMTP id f1-v6mr30456439pfc.156.1535995817450; Mon, 03 Sep 2018 10:30:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535995817; cv=none; d=google.com; s=arc-20160816; b=NvsO/dSWEcuE7Oxk1KYQENZHfCIsUk9zOofPQVZ+SRzLqjgGcVJ+WuV1c5HWZwBQLa TKEVe0C0HW0iZIoaDeF6wZ0puoHJkVtF+JKEqyldIwJAN1RgbbKXKCAO7Y+uFJ9DU3Mw JLJhc2B8gqDoVx1F2HIRVfDfPy1qQtvXaoIbuUOL7WVqN9TRm2IhmdwXXUj+/0T4Iaic alWfP28K/6efm5qdsmDEgBUEAElvxSTvNCMCtvDg9kYiUglwKWNYIZUI5fV+/7Tbfq68 lic4SOhIvu4b47QPV5WKfSaIb2FcPcxM3q08fjybRIRUtDJVBegpB/AKeFLHABm7Tyri 98yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=T8OM7ovdweyO0w340H+VhAJYknf8qrO6x3WBc9prfTk=; b=Fh+BPdgT3iWjvkk91a1ve5QZONJqK/OHb7+XWt+JVFywpufjTqtinNc2UewFGeO0ft 3uhWUPxKzfVHZsUcX9km3+m+DNVR3i9BCp5zF4FGVeCrAAHAWbqfcSKOMFco20bGsIIx Du4LyfXRzrDJxaQr/dTHie+nwZ7L0pYJylKiBQeWrufs18sibWzWx6MQempdf4VTdnKo IJMQkdeEXwm3BG+QmkxYiUmtx9yC3Sr3x1rFFj3837WQkq04OJMijpMlEAjORl/Igrze KL6B9Og/asfycQgTsmn6U7+WJhy5FOSzHN0UNufcfAxcOlILto3PsY3io+XiZgNVG7Cl f02g== 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 f35-v6si18138515plh.291.2018.09.03.10.30.02; Mon, 03 Sep 2018 10:30:17 -0700 (PDT) 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 S1731222AbeICVuF (ORCPT + 99 others); Mon, 3 Sep 2018 17:50:05 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:46498 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729098AbeICVuE (ORCPT ); Mon, 3 Sep 2018 17:50:04 -0400 Received: from localhost (ip-213-127-74-90.ip.prioritytelecom.net [213.127.74.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 5951FD09; Mon, 3 Sep 2018 17:28:56 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andi Kleen , Thomas Gleixner , x86@kernel.org Subject: [PATCH 4.14 138/165] x86/spectre: Add missing family 6 check to microcode check Date: Mon, 3 Sep 2018 18:57:04 +0200 Message-Id: <20180903165702.465074726@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180903165655.003605184@linuxfoundation.org> References: <20180903165655.003605184@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable 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 Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20180824170351.34874-2-andi@firstfloor.org Signed-off-by: Greg Kroah-Hartman --- 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 @@ -150,6 +150,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_stepping == spectre_bad_microcodes[i].stepping)