Received: by 10.192.165.148 with SMTP id m20csp4185076imm; Mon, 30 Apr 2018 13:25:17 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoWq2AEcMSQg1jovYwVmv9nLt1b9CFA72m4i0smMnAeTf832N6gSnTuNhGX5ONRoQX+aknB X-Received: by 2002:a63:6a08:: with SMTP id f8-v6mr9183686pgc.363.1525119917031; Mon, 30 Apr 2018 13:25:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525119916; cv=none; d=google.com; s=arc-20160816; b=hUQFNePB8IiqUJ9b19t3zpsjZpvdncfB/sALdm+iLQDZAIP+HWqD0QPvx9UDBV0l0o WC/K8hHdb2tE4KdNQ4WcxjSgizIOdUJ5cxS+KJqlep5kNjLQ+zj9B8ASZjJ5Rw9Ktp70 2nhPkKzVaZCPUhC5HHbHnSgmX+7bB/355yO/PAsJtjB2L5ODRNiYJgmTp/tB+ixBghkE C5qPD2DJNdRhMXiictFdUjpgNZoiT7fjkhUsyn0vJRe8FCZ0BOxoRVka8Dw14aGh4TEf yicRbgxb+X9PYQ7xPK3qevUX0vDPxU5yFwd+bPmYRFRbJ1+6zolu6Q9YS1ctcXz6wc8K Q+pA== 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:dmarc-filter :arc-authentication-results; bh=51eZmsvATuoyjpw0adnjoJEneWguze2HdlEJjo8xvjk=; b=07wSuwypanIlomVZo+SK1G591T9xzen46L5AphIBYCHOyEb9DqwRTiGy12HEngzMhH cE5PmdtZeq9DqAm+Hb6aY0hrXld5sUxCuh6GJIe/Dj/iZAR6J3r3wXZOxV7osDrqtj43 TZg+fT8ODpRToAx4Prc3kqsp2ZzhQALW0ETYAy52sO2n3DP8/7i0vsMHRfReGkePAytn XpytLSmewqliGzHNpMa/aEfXWX29o1xu7rGIPxVKGbbdHPCFykEW6iYcu9YxKUCDV+2b 8GNzEeRufI+smn5p+G2T9Wxm8Mryx0UVY8zMODZi39v6hB8x7Tr3EPvxSV0mO5ikO0ar YISQ== 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 c30-v6si6735040pgn.56.2018.04.30.13.24.32; Mon, 30 Apr 2018 13:25:16 -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 S1755891AbeD3UUE (ORCPT + 99 others); Mon, 30 Apr 2018 16:20:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:60710 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755768AbeD3T0s (ORCPT ); Mon, 30 Apr 2018 15:26:48 -0400 Received: from localhost (unknown [104.132.1.102]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DF79522DCC; Mon, 30 Apr 2018 19:26:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DF79522DCC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=gregkh@linuxfoundation.org From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vitezslav Samel , Borislav Petkov , Thomas Gleixner , Ashok Raj Subject: [PATCH 4.9 60/61] x86/microcode/intel: Save microcode patch unconditionally Date: Mon, 30 Apr 2018 12:25:03 -0700 Message-Id: <20180430183956.327516089@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180430183951.312721450@linuxfoundation.org> References: <20180430183951.312721450@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.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Borislav Petkov commit 84749d83758af6576552046b215b9b7f37f9556b upstream. save_mc_for_early() was a no-op on !CONFIG_HOTPLUG_CPU but the generic_load_microcode() path saves the microcode patches it has found into the cache of patches which is used for late loading too. Regardless of whether CPU hotplug is used or not. Make the saving unconditional so that late loading can find the proper patch. Reported-by: Vitezslav Samel Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Tested-by: Vitezslav Samel Tested-by: Ashok Raj Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20180418081140.GA2439@pc11.op.pod.cz Link: https://lkml.kernel.org/r/20180421081930.15741-1-bp@alien8.de Signed-off-by: Greg Kroah-Hartman --- arch/x86/kernel/cpu/microcode/intel.c | 2 -- 1 file changed, 2 deletions(-) --- a/arch/x86/kernel/cpu/microcode/intel.c +++ b/arch/x86/kernel/cpu/microcode/intel.c @@ -474,7 +474,6 @@ static void show_saved_mc(void) */ static void save_mc_for_early(u8 *mc) { -#ifdef CONFIG_HOTPLUG_CPU /* Synchronization during CPU hotplug. */ static DEFINE_MUTEX(x86_cpu_microcode_mutex); @@ -521,7 +520,6 @@ static void save_mc_for_early(u8 *mc) out: mutex_unlock(&x86_cpu_microcode_mutex); -#endif } static bool __init load_builtin_intel_microcode(struct cpio_data *cp)