public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Lendacky, Thomas via groups.io" <thomas.lendacky=amd.com@groups.io>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: devel@edk2.groups.io, Ard Biesheuvel <ardb+tianocore@kernel.org>,
	Jiewen Yao <jiewen.yao@intel.com>,
	Jordan Justen <jordan.l.justen@intel.com>,
	Erdem Aktas <erdemaktas@google.com>,
	James Bottomley <jejb@linux.ibm.com>, Min Xu <min.m.xu@intel.com>,
	Michael Roth <michael.roth@amd.com>
Subject: Re: [edk2-devel] [PATCH] OvmfPkg/ResetVector: Fix assembler bit test flag check
Date: Tue, 19 Sep 2023 08:19:20 -0500	[thread overview]
Message-ID: <eebed44e-c54e-bbaa-8e45-2299a2c7a9da@amd.com> (raw)
In-Reply-To: <hu4g52ctgcbyvuol6y27tvcxr5xzs34pmysd5xapzcdaudurkz@srd6ornzqg2a>

On 9/19/23 02:59, Gerd Hoffmann wrote:
> On Fri, Jul 14, 2023 at 03:28:26PM -0500, Tom Lendacky wrote:
>> Commit 63c50d3ff2854a76432b752af4f2a76f33ff1974 changed the check that is
>> used to determine if SEV-ES is active. Originally, a CMP instruction with
>> a supporting JZ instruction was used for the check. It was changed to use
>> the BT instruction but not JZ instruction. The result of a BT instruction
>> changes the the carry flag (CF) and not the zero flag (ZF). As a result,
>> the wrong condition is being checked. Update the JZ to a JNC to properly
>> detect if SEV-ES is active.
> 
> What is the effect of this bug?  Is it just the encryption sanity check
> being skipped?

Yes, it is just causing the mitigation check to be skipped. Because of the 
previous xor instruction, the JZ instruction will always be taken.

Thanks,
Tom

> 
> take care,
>    Gerd
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108830): https://edk2.groups.io/g/devel/message/108830
Mute This Topic: https://groups.io/mt/100149226/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



      reply	other threads:[~2023-09-19 13:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-14 20:28 [PATCH] OvmfPkg/ResetVector: Fix assembler bit test flag check Lendacky, Thomas
2023-07-15  0:26 ` Ard Biesheuvel
2023-09-19  7:59 ` [edk2-devel] " Gerd Hoffmann
2023-09-19 13:19   ` Lendacky, Thomas via groups.io [this message]

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-list 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=eebed44e-c54e-bbaa-8e45-2299a2c7a9da@amd.com \
    --to=devel@edk2.groups.io \
    /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