From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Alexander Monakov <amonakov@ispras.ru>, Borislav Petkov <bp@alien8.de>
Cc: Tavis Ormandy <taviso@gmail.com>,
linux-kernel@vger.kernel.org, x86@kernel.org
Subject: Re: x86: AMD Zen2 ymm registers rolling back
Date: Tue, 28 Feb 2023 19:38:53 +0000 [thread overview]
Message-ID: <8eff0a18-7faa-1135-a558-40150f4443e5@citrix.com> (raw)
In-Reply-To: <4d21fe93-7b77-bf5a-9ba8-645256ab0983@ispras.ru>
On 28/02/2023 7:29 pm, Alexander Monakov wrote:
> On Tue, 28 Feb 2023, Borislav Petkov wrote:
>
>> On Tue, Feb 28, 2023 at 10:24:40PM +0300, Alexander Monakov wrote:
>>> No, on the contrary, if there were no updates I would not be able to
>>> see microcode version increase after updating.
>> So what are you saying then?
> That I can reproduce the bug even with the latest BIOS, i.e. the microcode
> in the latest BIOS update does not have the fix, and the linux-firmware.git
> microcode does not have a patch for this CPU family at all.
>
> Hence the question how to get fixed microcode for this CPU family.
I shouldn't be recommending this, but I've begged AMD many times to be
better at publishing microcode...
https://github.com/platomav/CPUMicrocodes
and you'll need
---8<---
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
import sys
from pathlib import Path
from struct import pack
fout = sys.stdout
def stream_write(_):
"""Write to the output"""
return fout.buffer.write(_)
blobs = []
for ucode in sorted(sys.argv[1:]):
# cpu00xx0Fxx_
fm = int(ucode[3:11], 16)
eq = int("".join([ucode[5], ucode[6], ucode[9], ucode[10]]), 16)
sz = Path(ucode).stat().st_size
print("%08x, %s => %04x" % (fm, ucode[3:11], eq), file=sys.stderr)
blobs.append((fm, eq, sz, open(ucode, "rb").read()))
equiv = []
for x in blobs:
equiv.append(pack(b"=IIIHH", x[0], 0, 0, x[1], 0))
equiv.append(pack("=IIIHH", 0, 0, 0, 0, 0))
stream_write(pack("I", 0x00414d44)) # Magic
equiv_bin = b"".join(equiv)
stream_write(pack("II", 0, len(equiv_bin))) # Equiv table
stream_write(equiv_bin)
for blob in blobs:
stream_write(pack("II", 1, len(blob[3])))
stream_write(blob[3])
---8<---
to wrap the blob(s) from that git repo into the container format that
Linux and others know how to parse.
~Andrew
next prev parent reply other threads:[~2023-02-28 19:39 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-22 6:40 Tavis Ormandy
2023-02-22 8:33 ` Borislav Petkov
2023-02-22 9:14 ` Borislav Petkov
2023-02-22 9:38 ` Andrew Cooper
2023-02-22 10:09 ` Borislav Petkov
2023-02-22 21:26 ` Tavis Ormandy
2023-02-22 22:17 ` Andrew Cooper
2023-02-22 22:26 ` Borislav Petkov
2023-02-22 22:25 ` Borislav Petkov
2023-02-28 18:47 ` Alexander Monakov
2023-02-28 19:20 ` Borislav Petkov
2023-02-28 19:24 ` Alexander Monakov
2023-02-28 19:25 ` Borislav Petkov
2023-02-28 19:29 ` Alexander Monakov
2023-02-28 19:38 ` Andrew Cooper [this message]
2023-02-28 21:45 ` Alexander Monakov
2023-02-28 20:56 ` Borislav Petkov
2023-02-28 21:16 ` Alexander Monakov
2023-03-01 0:23 ` Andrew Cooper
2023-03-01 8:54 ` Borislav Petkov
2023-03-07 16:45 ` Tavis Ormandy
2023-03-07 17:46 ` [PATCH] x86/amd: Work around Erratum 1386 - XSAVES malfunction on context switch Andrew Cooper
2023-03-07 17:50 ` Borislav Petkov
2023-03-07 18:22 ` Andrew Cooper
2023-03-07 18:56 ` Borislav Petkov
2023-03-07 20:01 ` Andrew Cooper
2023-03-07 20:09 ` Borislav Petkov
2023-03-14 16:01 ` Dave Hansen
2023-03-08 16:23 ` [tip: x86/urgent] x86/CPU/AMD: Disable XSAVES on AMD family 0x17 tip-bot2 for Andrew Cooper
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=8eff0a18-7faa-1135-a558-40150f4443e5@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=amonakov@ispras.ru \
--cc=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--cc=taviso@gmail.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
all inboxes | Powered by JetHome®