linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Borislav Petkov <bp@alien8.de>
Cc: LKML <linux-kernel@vger.kernel.org>, Jann Horn <jannh@google.com>,
	X86 ML <x86@kernel.org>
Subject: Re: [PATCH 2/3] x86/microcode: Fix the ancient deprecated microcode loading method
Date: Fri, 5 Apr 2019 23:55:26 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.21.1904052353470.1802@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20190405133010.24249-3-bp@alien8.de>

On Fri, 5 Apr 2019, Borislav Petkov wrote:

> From: Borislav Petkov <bp@suse.de>
> 
> The commit in Fixes: added the new define UCODE_NEW to denote that an

That reads odd. What's wrong with:

Commit 2613f36ed965 added ....

or

A recent commit added

mm?

> update should happen only when newer microcode (than installed on the
> system) has been found.
> 
> But it missed adjusting that for the old /dev/cpu/microcode loading
> interface. Fix it.
> 
> Fixes: 2613f36ed965 ("x86/microcode: Attempt late loading only when new microcode is present")
> Signed-off-by: Borislav Petkov <bp@suse.de>
> Cc: Jann Horn <jannh@google.com>

Other than that:

Reviewed-by: Thomas Gleixner <tglx@linutronix.de>

> ---
>  arch/x86/kernel/cpu/microcode/core.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c
> index 5260185cbf7b..8a4a7823451a 100644
> --- a/arch/x86/kernel/cpu/microcode/core.c
> +++ b/arch/x86/kernel/cpu/microcode/core.c
> @@ -418,8 +418,9 @@ static int do_microcode_update(const void __user *buf, size_t size)
>  		if (ustate == UCODE_ERROR) {
>  			error = -1;
>  			break;
> -		} else if (ustate == UCODE_OK)
> +		} else if (ustate == UCODE_NEW) {
>  			apply_microcode_on_target(cpu);
> +		}
>  	}
>  
>  	return error;
> -- 
> 2.21.0
> 
> 

  reply	other threads:[~2019-04-05 21:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-05 13:30 [PATCH 0/3] x86/microcode: Some fixes Borislav Petkov
2019-04-05 13:30 ` [PATCH 1/3] x86/microcode/intel: Refactor Intel microcode blob loading Borislav Petkov
2019-04-05 21:59   ` Thomas Gleixner
2019-04-05 13:30 ` [PATCH 2/3] x86/microcode: Fix the ancient deprecated microcode loading method Borislav Petkov
2019-04-05 21:55   ` Thomas Gleixner [this message]
2019-04-10 20:49   ` [tip:x86/microcode] " tip-bot for Borislav Petkov
2019-04-05 13:30 ` [PATCH 3/3] x86/microcode: Deprecate MICROCODE_OLD_INTERFACE Borislav Petkov
2019-04-05 21:53   ` Thomas Gleixner
2019-04-10 20:50   ` [tip:x86/microcode] " tip-bot for Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.21.1904052353470.1802@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=bp@alien8.de \
    --cc=jannh@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).