Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1455375ybe; Thu, 5 Sep 2019 16:02:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqwcXLXaiASkBZx4SvHha9urbjzWDg+WKZKZgDTS+Al4qXOp+5d1AkIq/lqb0dJ868H0mpL7 X-Received: by 2002:aa7:8b09:: with SMTP id f9mr1882493pfd.23.1567724572846; Thu, 05 Sep 2019 16:02:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567724572; cv=none; d=google.com; s=arc-20160816; b=XHCRw19CJwqnB8/RfH85kjxvIwbPthxq0ZAEhgcNr0fhRpvQBfTocV2gA2Wb2oi0Ka ZXZ++jShLHJ/NOslF2Me8/tP8xOqZJbcD3pbchx0rtDF/c0mENx4hji6wnoFRFUgsGBo AePTavV0fMSyQmJDkE5CD19OA+H0z6g7FpGQ+00cd8+DLZpvAEU9KUzsW44nv5ZFVzM4 6xvAHTCKQ+yrJBTc9Ohy3tRv8ruPVmLH/ALDzEZGlVmwcVqCgEiT5KdUywGIh2Dqvfiz EHiZLehTizvk0tAo//zoPOENdSC14jxkjy/pvVCgkyHO1jGYAJ6QgDXHYshr2pvjKRW9 F6gw== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=gs3aTt1Oc6MN+eXZXzSD+sC8AZuqmu3qh18dMab/x74=; b=c4WZbC7FAvsq+BDhCdaLkUsB4rAQm9QfFGSwd8UPl9ssjxg+/zW+Ui7pPzwnfXgLu3 cbP9bm/+ds8K5VwHVO6tJRTE+UfkF5De7/plFtc6p8WNQnWubmV8GJ2l59QTaRBjPViD TEB1Syg1tVOt+gp0iUMbyXjIm2Xat6A/FoOuRpqLAOAQytgaWYnyXtIAPWmMq9unOy7q R5Yp5/7lbKw2L9EfyI5RYaRMXMDsmY2QlbhOTnZrCCfik/45ovwzBH8YtO7OA0gwqRED XY1t1Pf0xC/anZ0M2t/A8cRVx6GdlloUW9LKFU5WbojSLVVqr++z+yIa89LFbnJrY/EE WSAA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 69si3445823plb.10.2019.09.05.16.02.30; Thu, 05 Sep 2019 16:02:52 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391324AbfIETkp (ORCPT + 99 others); Thu, 5 Sep 2019 15:40:45 -0400 Received: from mga12.intel.com ([192.55.52.136]:38710 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731576AbfIETkp (ORCPT ); Thu, 5 Sep 2019 15:40:45 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Sep 2019 12:40:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,471,1559545200"; d="scan'208";a="177410757" Received: from otc-nc-03.jf.intel.com (HELO otc-nc-03) ([10.54.39.145]) by orsmga008.jf.intel.com with ESMTP; 05 Sep 2019 12:40:43 -0700 Date: Thu, 5 Sep 2019 12:40:44 -0700 From: "Raj, Ashok" To: Borislav Petkov Cc: Boris Ostrovsky , Mihai Carabas , "H. Peter Anvin" , Ingo Molnar , Jon Grimm , kanth.ghatraju@oracle.com, konrad.wilk@oracle.com, patrick.colp@oracle.com, Thomas Gleixner , Tom Lendacky , x86-ml , linux-kernel@vger.kernel.org, Ashok Raj Subject: Re: [PATCH] x86/microcode: Add an option to reload microcode even if revision is unchanged Message-ID: <20190905194044.GA3663@otc-nc-03> References: <1567056803-6640-1-git-send-email-ashok.raj@intel.com> <20190829060942.GA1312@zn.tnic> <20190829130213.GA23510@araj-mobl1.jf.intel.com> <20190903164630.GF11641@zn.tnic> <41cee473-321c-2758-032a-ccf0f01359dc@oracle.com> <20190905002132.GA26568@otc-nc-03> <20190905072029.GB19246@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190905072029.GB19246@zn.tnic> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Boris On Thu, Sep 05, 2019 at 09:20:29AM +0200, Borislav Petkov wrote: > On Wed, Sep 04, 2019 at 05:21:32PM -0700, Raj, Ashok wrote: > > But echo 2 > reload would allow reading a microcode file from > > /lib/firmware/intel-ucode/ even if the revision hasn't changed right? > > > > #echo 1 > reload wouldn't load if the revision on disk is same as what's loaded, > > and we want to permit that with the echo 2 option. > > Then before we continue with this, please specify what the exact > requirements are. Talk to your microcoders or whoever is going to use > this and give the exact use cases which should be supported and describe > them in detail. https://lore.kernel.org/lkml/1567056803-6640-1-git-send-email-ashok.raj@intel.com/ The original description said to load a new microcode file, the content could have changed, but revision in the header hasn't increased. The other rules are same, i.e we can't go backwards. There is another SVN (Security version number) embedded in the microcode which won't allow going backwards anyway. I'll get back to you if there are additional uses, but allowing the facility to actually read the file achieves the same purpose as using the in-kernel copy. I have used it multiple times during development :-)