public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Borislav Petkov <bp@amd64.org>
Cc: X86-ML <x86@kernel.org>, "H. Peter Anvin" <hpa@zytor.com>,
	Ingo Molnar <mingo@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	LKML <linux-kernel@vger.kernel.org>,
	Andreas Herrmann <andreas.herrmann3@amd.com>,
	Borislav Petkov <borislav.petkov@amd.com>,
	Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Subject: Re: [PATCH -v2 1/2] x86, microcode: Sanitize per-cpu microcode reloading interface
Date: Thu, 21 Jun 2012 14:12:22 +0200	[thread overview]
Message-ID: <1340280742.18025.5.camel@twins> (raw)
In-Reply-To: <1340280437-7718-2-git-send-email-bp@amd64.org>

On Thu, 2012-06-21 at 14:07 +0200, Borislav Petkov wrote:
> From: Borislav Petkov <borislav.petkov@amd.com>
> 
> Microcode reloading in a per-core manner is a very bad idea for both
> major x86 vendors. And the thing is, we have such interface with which
> we can end up with different microcode versions applied on different
> cores of an otherwise homogeneous wrt (family,model,stepping) system.
> 
> So turn off the possibility of doing that per core and allow it only
> system-wide.
> 
> This is a minimal fix which we'd like to see in stable too thus the
> more-or-less arbitrary decision to allow system-wide reloading only on
> the BSP:
> 
> $ echo 1 > /sys/devices/system/cpu/cpu0/microcode/reload
> ...
> 
> and disable the interface on the other cores:
> 
> $ echo 1 > /sys/devices/system/cpu/cpu23/microcode/reload
> -bash: echo: write error: Invalid argument
> 
> Also, allowing the reload only from one CPU (the BSP in
> that case) doesn't allow the reload procedure to degenerate
> into an O(n^2) deal when triggering reloads from all
> /sys/devices/system/cpu/cpuX/microcode/reload sysfs nodes
> simultaneously.
> 
> A more generic fix will follow.
> 
> Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Acked-by: Peter Zijlstra <peterz@infradead.org> 

  reply	other threads:[~2012-06-21 12:12 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-21 12:07 [PATCH -v2 0/2] x86, microcode: Reload ucode only per-system Borislav Petkov
2012-06-21 12:07 ` [PATCH -v2 1/2] x86, microcode: Sanitize per-cpu microcode reloading interface Borislav Petkov
2012-06-21 12:12   ` Peter Zijlstra [this message]
2012-06-22 15:46   ` Peter Zijlstra
2012-06-26 19:40     ` Borislav Petkov
2012-06-26 19:51       ` Borislav Petkov
2012-06-26 21:46       ` Peter Zijlstra
2012-06-27  5:20         ` Borislav Petkov
2012-07-03  4:37         ` Borislav Petkov
2012-07-03  9:26           ` Peter Zijlstra
2012-07-03 10:41             ` Borislav Petkov
2012-07-01 19:35   ` [tip:x86/microcode] " tip-bot for Borislav Petkov
2012-06-21 12:07 ` [PATCH -v2 2/2] x86, microcode: Make reload interface per system Borislav Petkov
2012-06-21 12:12   ` Peter Zijlstra
2012-07-01 19:35   ` [tip:x86/microcode] " tip-bot for Borislav Petkov
2012-06-30 17:45 ` [PATCH -v2 0/2] x86, microcode: Reload ucode only per-system Borislav Petkov
2012-07-02  9:53   ` Peter Zijlstra
2012-07-02 13:05     ` H. Peter Anvin
2012-07-03 10:52       ` 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=1340280742.18025.5.camel@twins \
    --to=peterz@infradead.org \
    --cc=andreas.herrmann3@amd.com \
    --cc=borislav.petkov@amd.com \
    --cc=bp@amd64.org \
    --cc=hmh@hmh.eng.br \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    --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