mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Tavis Ormandy <taviso@gmail.com>, Borislav Petkov <bp@alien8.de>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org
Subject: Re: x86: AMD Zen2 ymm registers rolling back
Date: Wed, 22 Feb 2023 22:17:35 +0000	[thread overview]
Message-ID: <f074e03d-a991-23cd-80d7-162067143034@citrix.com> (raw)
In-Reply-To: <Y/aIjUr78yd9U+wl@thinkstation.cmpxchg8b.net>

On 22/02/2023 9:26 pm, Tavis Ormandy wrote:
> On Wed, Feb 22, 2023 at 11:09:51AM +0100, Borislav Petkov wrote:
>> On Wed, Feb 22, 2023 at 09:38:09AM +0000, Andrew Cooper wrote:
>>> This sounds suspiciously like an errata which was fixed with a ucode
>>> update last year.
>> Yes, it looks like it.
>>
>> Alternatively, you can try booting with "clearcpuid=xsaves" - that
>> should take care of your observation too but yeah, you should rather
>> update your microcode.
>>
> Thanks - confirmed, it *doesn't* repro with 0x8301055, but does repro
> with 0x830104d.

For completeness, this is erratum 1386, details of which can be found in
https://www.amd.com/system/files/TechDocs/56323-PUB_1.00.pdf amongst others.

That said, looking at the list of preconditions to tickle this erratum,
I don't see anything in your code which would cause a change in MXCSR. 
Which most likely means there's a path in the kernel modifying MXCSR and
that doesn't sound like a thing that ought to be happening by default.

> Annoyingly, I thought I was using the most recent microcode, but it seems
> like there is some bug and debian wasn't applying it at boot.
>
> That seems like a scary errata :-/

Honestly, this is tame compared to some of the things which get fixed in
ucode...

~Andrew

  reply	other threads:[~2023-02-22 22:18 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 [this message]
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
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=f074e03d-a991-23cd-80d7-162067143034@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --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®