public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Borislav Petkov <bp@alien8.de>
Cc: X86 ML <x86@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [RFC PATCH 2/3] x86/microcode: Default-disable late loading
Date: Fri, 27 May 2022 12:37:24 +0200	[thread overview]
Message-ID: <YpCp5B7noKAt+91A@gmail.com> (raw)
In-Reply-To: <20220524185324.28395-3-bp@alien8.de>


* Borislav Petkov <bp@alien8.de> wrote:

> From: Borislav Petkov <bp@suse.de>
> 
> It is dangerous and it should not be used anyway - there's a nice early
> loading already.
> 
> Requested-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> Signed-off-by: Borislav Petkov <bp@suse.de>
> ---
>  arch/x86/Kconfig                     | 11 +++++++++++
>  arch/x86/kernel/cpu/common.c         |  2 ++
>  arch/x86/kernel/cpu/microcode/core.c |  7 ++++++-
>  3 files changed, 19 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 1c0da2dbfb26..33891b82fb65 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -1345,6 +1345,17 @@ config MICROCODE_AMD
>  	  If you select this option, microcode patch loading support for AMD
>  	  processors will be enabled.
>  
> +config MICROCODE_LATE_LOADING
> +	bool "Late microcode loading (DANGEROUS)"
> +	default n
> +	depends on MICROCODE
> +	help

( Small nit: 'default n' is the default, there's no need to list it 
  explicitly - and that's the convention as well. )

> +	  Loading microcode late, when the system is up and executing instructions
> +	  is a tricky business and should be avoided if possible. Just the sequence
> +	  of synchronizing all cores and SMT threads is one fragile dance which does
> +	  not guarantee that cores might not softlock after the loading. Therefore,
> +	  use this at your own risk. Late loading taints the kernel too.

Might make sense to outline here valid circumstances under which late 
loading is used? Such as some weird kernel package that doesn't have the 
latest firmware included in the initrd?

Because it's hard (for me) to see any valid circumstance under which late 
loading should be supported at all TBH: new kernels where this patch is 
active would come with a modern package.

Ie. we should consider removing late loading altogether.

Thanks,

	Ingo

  reply	other threads:[~2022-05-27 10:37 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-24 18:53 [RFC PATCH 0/3] x86/microcode: Drop old interface and default-disable late loading Borislav Petkov
2022-05-24 18:53 ` [RFC PATCH 1/3] x86/microcode: Rip out the OLD_INTERFACE Borislav Petkov
2022-05-24 18:53 ` [RFC PATCH 2/3] x86/microcode: Default-disable late loading Borislav Petkov
2022-05-27 10:37   ` Ingo Molnar [this message]
2022-05-27 10:58     ` Borislav Petkov
2022-05-24 18:53 ` [RFC PATCH 3/3] x86/microcode: Taint and warn on " Borislav Petkov
2022-05-25  1:03   ` Luck, Tony
2022-05-25  6:59     ` Peter Zijlstra
2022-05-25  7:37       ` Borislav Petkov
2022-05-25 14:50         ` Luck, Tony
2022-05-25 15:28           ` Borislav Petkov
2022-05-25 15:40             ` Luck, Tony
2022-05-25 16:00               ` Borislav Petkov
2022-05-26 12:11                 ` Taint addresses Borislav Petkov
2022-05-26 16:41                   ` Luck, Tony
2022-05-27  9:45                     ` Borislav Petkov
2022-05-25 10:03   ` [RFC PATCH 3/3] x86/microcode: Taint and warn on late loading Peter Zijlstra
2022-05-25 12:52     ` [RFC PATCH -v2] " Borislav Petkov
2022-05-25 13:55 ` [PATCH 4/3] x86/microcode: Remove unnecessary perf callback default-disable " 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=YpCp5B7noKAt+91A@gmail.com \
    --to=mingo@kernel.org \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.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