Received: by 10.192.165.148 with SMTP id m20csp4143472imm; Mon, 30 Apr 2018 12:33:59 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp0+vX9IFjLdVAgYsMIsKpb4ZpZ6gtn8I9PK94hB2IhTOAqzZ7IWpjsrnrNR+H3KYEV2leI X-Received: by 2002:a63:6842:: with SMTP id d63-v6mr11002073pgc.304.1525116838956; Mon, 30 Apr 2018 12:33:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525116838; cv=none; d=google.com; s=arc-20160816; b=NTqhX+2cW1wFfNgNyZEpfKiFSe4JXACkh0Td/osn554eDQ2tP7G93t3dXH4EUujaMj fMQiYzlcYltmhnutpMykVJPj5gYTeATirEXxMhspKW3sClnnXEZcMiwJ8e5Mm9IN2Ssd Z39PyCurUEcujTC3gUc5CZ56zjVizHnxE2jY0NuFdGlBw6M4JXfuqTKrGLkqkrTi9Gac s16vGJ9e6fZsT5Yfgzy6y5M8zYy8vh9SyO9aXWi0EyWzlLqKJeTUPh3YAVuXX4f3RCes 1qdpnV2CPrkVPstvhrEcROgZB8ZGOabxnQtKnjES8e+dZIiWY9vwY/B/O+zZxas+Pt10 qOUA== 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=8J5+ALNfF4SnvjZuxJQj5R/mZsXZRyAb9MX5/POP59M=; b=fzEV5zkUrUEatzsFlRSofX97MD4vUPzGO9bpx3w4l+Bqt0mCp0hwe6yIbO5k6VmjzI vWKr08vSX169dkVSY/sKlbnGP8R7HvqjkEK9s4k0zj3ZkPG8UR2r4ohXfPhmt3c3e/b4 WQUGzz0eXUu4b6Ne6zKQxL7LXdRmrp1htkrvUq60mKQyby/8TKYonMer8/ZFti0dE0TV 3VQkWYVAhU2Pnyr3r6l0BNi3rE7LhEk7Nx7ova7J2WzSaN0TQRsV/NdfuGQ+IevLZhzO tJyWAjuRMnoNwAWWKp2rmHDfb4YLTwsGN8fZ/8POueuFcvtstFL7B/XT0RAoKndKZbLl VeWQ== 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 g1-v6si187489pgq.597.2018.04.30.12.33.44; Mon, 30 Apr 2018 12:33:58 -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 S1755534AbeD3T26 (ORCPT + 99 others); Mon, 30 Apr 2018 15:28:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:37268 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755258AbeD3T24 (ORCPT ); Mon, 30 Apr 2018 15:28:56 -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 8293323448; Mon, 30 Apr 2018 19:28:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8293323448 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.16 109/113] x86/microcode/intel: Save microcode patch unconditionally Date: Mon, 30 Apr 2018 12:25:20 -0700 Message-Id: <20180430184019.802044613@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180430184015.043892819@linuxfoundation.org> References: <20180430184015.043892819@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.16-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 @@ -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, un show_saved_mc(); mutex_unlock(&x86_cpu_microcode_mutex); -#endif } static bool load_builtin_intel_microcode(struct cpio_data *cp)