Received: by 10.192.165.148 with SMTP id m20csp89767imm; Fri, 20 Apr 2018 03:35:54 -0700 (PDT) X-Google-Smtp-Source: AIpwx48dk171A1YMQp4tWoDUQf+SGJvd303hHDevSOLQGn2JivP1zzgmjmDvXxG6UyGP08IC2ckw X-Received: by 10.99.181.30 with SMTP id y30mr6374976pge.279.1524220554203; Fri, 20 Apr 2018 03:35:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524220554; cv=none; d=google.com; s=arc-20160816; b=tM1m2MlSWS8C6YrwaAPbrz3M8RiIjMNjI6QKNIJ4kCs5EXWtoc6QRcqTdpO0QXh2BX EU6nE9uny/MaRTyL793HU4xnZ4HkNfLsrW/VSKvPBWi1mi4X5+HV640HJtUaylLe1X1A BPWyrmOYadbOkNe+4sSg2R5wWyHn8jsR6zr8qa6C29cnRVGjjYzKJKEyT4wLpGGO71fx 8qzFJJh9mSxbw2suCGXvQqtY0BRI9Dze+vW8Z8OkUvEfR00RAc8mEQtsCAO/5J6Dt+pX yM5y6NjZmVhhg1z77n132X9Nooc+ajAeOAj116MbWh1aBuUkaj9SqPKNOeQDZs7wn+kU 4MfA== 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:message-id:subject:cc:to:from:date :arc-authentication-results; bh=MQDB3twHUV+r6yKkqCSWfDdOeat5jhgGwYk2XKOS6Gc=; b=ls7+Wj9VQ5kq71+VgiMSjq1KlByimiOHsIqLXZU8Ijf2Jhw81CayuS1DNgUQRAbQnT rSptZBZoQPPhknq7rmtLzVInUUNJB/A/KzFSTtnTMtbFKZja6d2SQNAHRV7SiOMk1RFP rvAplVsJqtYARhpu89R6rCGKZimyGw/nh35Uf46jSXKXYzCDXVLgTdl7+4cQzWebf+oR sPZa0KJBeNtG855ZkqnAlXnJReRPjlUCSScX4fzCqCRQEe1EdlFx5l/sapXOJ20DqYDn WwCAr/cAu9hGtMUptYxsGiVUKk8T2case1KHo3ynutD6TPemP8QpMdnXPDjbOTzMQADu PTMA== 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 f9si4445046pgs.667.2018.04.20.03.35.39; Fri, 20 Apr 2018 03:35:54 -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 S1754576AbeDTKed (ORCPT + 99 others); Fri, 20 Apr 2018 06:34:33 -0400 Received: from mx2.suse.de ([195.135.220.15]:35544 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754427AbeDTKec (ORCPT ); Fri, 20 Apr 2018 06:34:32 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 31F9DABC9; Fri, 20 Apr 2018 10:34:31 +0000 (UTC) Date: Fri, 20 Apr 2018 12:34:28 +0200 From: Borislav Petkov To: Vitezslav Samel , "Raj, Ashok" Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, x86-ml Subject: [PATCH 1/2] x86/microcode/intel: Save microcode patch unconditionally Message-ID: <20180420103428.GD13977@pd.tnic> References: <20180419053531.GA2224@pc11.op.pod.cz> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180420103242.GB13977@pd.tnic> User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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) --