From: Ashok Raj <ashok.raj@intel.com>
To: Dave Hansen <dave.hansen@intel.com>
Cc: Borislav Petkov <bp@alien8.de>,
Thomas Gleixner <tglx@linutronix.de>,
LKML Mailing List <linux-kernel@vger.kernel.org>,
X86-kernel <x86@kernel.org>,
Andy Lutomirski <luto@amacapital.net>,
Ingo Molnar <mingo@kernel.org>,
Tom Lendacky <thomas.lendacky@amd.com>,
Tony Luck <tony.luck@intel.com>, Ashok Raj <ashok.raj@intel.com>
Subject: Re: [PATCH] x86/microcode/intel: Allow late loading only if a min rev is specified
Date: Mon, 29 Aug 2022 18:52:49 +0000 [thread overview]
Message-ID: <Yw0LAbFITDDFGek3@araj-dh-work> (raw)
In-Reply-To: <e46c20a5-9f43-6ec4-6c2e-ea6891a8ce0d@intel.com>
On Mon, Aug 29, 2022 at 11:36:12AM -0700, Dave Hansen wrote:
> On 8/29/22 11:04, Ashok Raj wrote:
> > Any microcode that modifies the interface to an OS-visible feature
> > will set the min_version to itself. This will enforce this microcode is
> > not suitable for late loading unless the currently loaded revision is greater
> > or equal to the new microcode affecting the change.
>
> I know this hasn't quite made it into the normal Intel documentation
> channels. But, it would be nice to make sure that we have a _really_
> solid description here of the architecture of min_rev which is *very*
> close to what the Intel folks building microcode images agreed to.
>
> This whole thing is useless if the architecture contract isn't ironclad
> and agreed to by both sides.
>
> One other thing on that note... The CPU itself authenticates the
> microcode. The OS trusts that the CPU will verify the integrity of the
> image.
>
> But, this min_rev is not part of the image that the CPU verifies, right?
> If you get your microcode images out of the back of a van in the shady
> part of town, nobody can promise that min_rev in the header follows the
> rules.
>
> I don't think we need to defend against that. I'm not sure we really
> even *can* defend against it. It's probably good to note, though.
If someone also recomputes checksums in the main-header and also for
extended signature tables when one is present.. just a binary edit will be
caught by the microcode_sanity_check() today.
The commit log already has the following text. It doesn't say this is not
in the encrypted header, but just says HW doesn't check for min-rev.
If you think we should change the description below, I can update it.
------
The enforcement is not in hardware and limited to kernel loader enforcing
the requirement. It is not required for early loading of microcode to
enforce this requirement, since the new features are only
evaluated after early loading in the boot process.
next prev parent reply other threads:[~2022-08-29 18:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-29 18:04 [PATCH] x86/microcode/intel: Allow late loading only if a min rev is specified Ashok Raj
2022-08-29 18:36 ` Dave Hansen
2022-08-29 18:52 ` Ashok Raj [this message]
2022-08-29 20:24 ` Dave Hansen
2022-08-29 20:31 ` Borislav Petkov
2022-08-29 22:41 ` Ashok Raj
2022-09-01 2:53 ` 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=Yw0LAbFITDDFGek3@araj-dh-work \
--to=ashok.raj@intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=thomas.lendacky@amd.com \
--cc=tony.luck@intel.com \
--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