From: Alexandre Chartre <alexandre.chartre@oracle.com>
To: Ken Moffat <zarniwhoop@ntlworld.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Retbleed, Zen2 and STIBP
Date: Mon, 18 Jul 2022 16:58:49 +0200 [thread overview]
Message-ID: <YtV1KT5l8KpoJWGT@localhost.localdomain> (raw)
In-Reply-To: <YtUXda9ymAI0ED7n@llamedos.localdomain>
On Mon, Jul 18, 2022 at 09:19:01AM +0100, Ken Moffat wrote:
> Probably like most people, I find the detail of the available
> retbleed mitigations obscure. In particular, for zen2 the options
> *might* include ibpb or unret.
>
> But I have failed to find what 'unret' actually means. Any
> pointers, please ?
>
> While ibpb might be available (and slow), on my Renoir with
> microcode level (0860106h) there were no newer microcode versions
> available when I last looked (a few weeks ago) but note 7 at the
> bottom of
> https://www.amd.com/system/files/documents/technical-guidance-for-mitigating-branch-type-confusion_v
> 7_20220712.pdf
> implies that the relevant bit is only set on Renoir in 0860109h and
> later.
>
> Some of the text in that pdf implies that at least one of the
> options could be set if not already set from the microcode, but the
> amount of detail leaves me totally lost.
>
> Assuming, for the moment, that I might want to try this full
> mitigation, is there any way to set this in the absence of newer
> microcode ?
>
> Or should I just accept that the best I can get is 'unret', whatever
> that means ?
>
> ĸen
'unret' = AMD JMP2RET i.e. replace all 'ret' instructions with
'jmp __x86_return_thunk', and safe training the thunk code upon
kernel/hypervisor entry. This is a purely software mitigation,
it doesn't require any microcode.
AMD JMP2RET is described in this document:
https://www.amd.com/system/files/documents/technical-guidance-for-mitigating-branch-type-confusion_v7_20220712.pdf
alex.
next prev parent reply other threads:[~2022-07-18 14:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-18 8:19 Ken Moffat
2022-07-18 14:58 ` Alexandre Chartre [this message]
2022-07-18 15:35 ` Ken Moffat
2022-07-18 21:47 ` Andrew Cooper
2022-07-18 23:10 ` Ken Moffat
2022-07-18 22:17 ` Ken Moffat
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=YtV1KT5l8KpoJWGT@localhost.localdomain \
--to=alexandre.chartre@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=zarniwhoop@ntlworld.com \
/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®