Received: by 10.192.165.148 with SMTP id m20csp105367imm; Fri, 20 Apr 2018 03:55:57 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+1/zXlozbRW8PBTr8NTt66zXU7jPxXAL2f7WX9xqdWIIzzgK/q5IuICPKwdMvOHn/OoESk X-Received: by 10.98.89.209 with SMTP id k78mr9290400pfj.54.1524221757099; Fri, 20 Apr 2018 03:55:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524221757; cv=none; d=google.com; s=arc-20160816; b=sMQIHnd6m1QHOFF80UPXekpHBnPV7h8L6azGeygB4lE8PMt9fvastPHXJMuV73fjJ0 OM4UooawetMhboTC+D2cnA0mO2bSRVsaCer5jd/d0Qc2XLxF9cyAD+M9LEhmlzDk+GEU ggDktcqZ5wSLAxt2H+KwjcyMsDj6Aiia2Ohnut4Z4b4w/3yiycCBhdGEhv6aObNvtOOz Pg2uarLXMgTGA8jAg8Re+c4EEazsj+XwQ0fOld5gBGHcEJLnXZukLexEsK3usuFSzqSA NAhxP9QqS/yNLdLvwVFQ5SlEOeqZYtV989e3fGcIwDXak+nbtw6YBAAv31AfaxB0EV05 VAMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=NCRVa90kwT2ZrikMR8ciGhuHr4WWzLYxA5WUOFxYXz4=; b=OJqACoIvKTb9C4fK7FtRpSSTclMh4Kp0By7OpJSc5tju8DEG7/+/E/8n5S2S9F2kHK wf1J0gwOAZda0RmpBrb0lHRmmJTZ45k0XdoZlICT5C98YpSAmXqd/6e0AuTXIjz/8IHN YBjawmf5Y0TDrrKnkDgQfbZ9x4MR4qwJrx2uM2TQugGnOu3NGaf7cyJN1YXvbpAWklRM xIyTv5tUoeVwxZNmDN3zKUXOMx6weAaVXZUrL9gYgUP6EaYq5VpQCaTOcLb2fb2Q7JS5 IJXOgw1mtPv+N75+lRyrlOKow51vRM/PToI4zWpDXclxchf7dKm8l3nJDhK5z6oxgaDC vUAg== 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 t134si4718756pgc.519.2018.04.20.03.55.43; Fri, 20 Apr 2018 03:55:57 -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 S1754670AbeDTKyK (ORCPT + 99 others); Fri, 20 Apr 2018 06:54:10 -0400 Received: from mail.pod.cz ([213.155.227.146]:57050 "EHLO mail.pod.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754541AbeDTKyJ (ORCPT ); Fri, 20 Apr 2018 06:54:09 -0400 Received: by pc11.op.pod.cz (Postfix, from userid 475) id 40SCQm44YPz70Qb; Fri, 20 Apr 2018 12:54:08 +0200 (CEST) Date: Fri, 20 Apr 2018 12:54:08 +0200 From: Vitezslav Samel To: Borislav Petkov Cc: "Raj, Ashok" , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, x86-ml Subject: Re: [PATCH 1/2] x86/microcode/intel: Save microcode patch unconditionally Message-ID: <20180420105408.GA2257@pc11.op.pod.cz> Mail-Followup-To: Borislav Petkov , "Raj, Ashok" , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, x86-ml References: <20180419104829.GE3896@pd.tnic> <20180419120239.GA2377@pc11.op.pod.cz> <20180419121840.GF3896@pd.tnic> <20180419134627.GA2387@pc11.op.pod.cz> <20180419163734.GB3905@pd.tnic> <20180420062021.GA2253@pc11.op.pod.cz> <20180420095220.GA13977@pd.tnic> <20180420100131.GA14217@pc11.op.pod.cz> <20180420103242.GB13977@pd.tnic> <20180420103428.GD13977@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180420103428.GD13977@pd.tnic> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 20, 2018 at 12:34:28PM +0200, Borislav Petkov wrote: > 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 our cache of patches which is used for late loading too. Regardless > of whether we do CPU hotplug or not. > > So make the saving unconditional so that late loading can find the > proper patch. > > Reported-by: Vitezslav Samel Tested-by: Vitezslav Samel > Signed-off-by: Borislav Petkov > Cc: Ashok Raj > Cc: # if it has backported d8c3b52c00a05036e0a6b315b4b17921a7b67997 > Link: http://lkml.kernel.org/r/20180418081140.GA2439@pc11.op.pod.cz > --- > arch/x86/kernel/cpu/microcode/intel.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c > index 32b8e5724f96..1c2cfa0644aa 100644 > --- a/arch/x86/kernel/cpu/microcode/intel.c > +++ b/arch/x86/kernel/cpu/microcode/intel.c > @@ -485,7 +485,6 @@ static void show_saved_mc(void) > */ > static void save_mc_for_early(u8 *mc, unsigned int size) > { > -#ifdef CONFIG_HOTPLUG_CPU > /* Synchronization during CPU hotplug. */ > static DEFINE_MUTEX(x86_cpu_microcode_mutex); > > @@ -495,7 +494,6 @@ static void save_mc_for_early(u8 *mc, unsigned int size) > show_saved_mc(); > > mutex_unlock(&x86_cpu_microcode_mutex); > -#endif > } > > static bool load_builtin_intel_microcode(struct cpio_data *cp) > -- > 2.13.0 > > SUSE Linux GmbH, GF: Felix Imend?rffer, Jane Smithard, Graham Norton, HRB 21284 (AG N?rnberg) > --