public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Brijesh Singh <brijesh.singh@amd.com>,
	edk2-devel-01 <edk2-devel@lists.01.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>,
	Tom Lendacky <thomas.lendacky@amd.com>
Subject: Re: [PATCH 1/1] OvmfPkg/QemuFwCfgDxeLib: SEV: zero FW_CFG_DMA_ACCESS before decrypting it
Date: Tue, 29 Aug 2017 22:47:01 +0200	[thread overview]
Message-ID: <23215854-3274-bb55-b80b-2d557577813b@redhat.com> (raw)
In-Reply-To: <0d02d683-d124-0e55-ea29-073708dc2ca9@amd.com>

On 08/29/17 16:02, Brijesh Singh wrote:
> 
> 
> On 08/28/2017 07:39 AM, Laszlo Ersek wrote:
>> There's a small window between
>>
>> - AllocFwCfgDmaAccessBuffer() mapping the new FW_CFG_DMA_ACCESS object
>> for
>>    common buffer operation (i.e., decrypting it), and
>>
>> - InternalQemuFwCfgDmaBytes() setting the fields of the object.
>>
>> In this window, earlier garbage in the object is "leaked" to the
>> hypervisor. So zero the object before we decrypt it.
>>
>> (This commit message references AMD SEV directly, because QemuFwCfgDxeLib
>> is not *generally* enabled for IOMMU operation just yet, unlike our goal
>> for the virtio infrastructure. Instead, QemuFwCfgDxeLib uses
>> MemEncryptSevLib explicitly to detect SEV, and then relies on IOMMU
>> protocol behavior that is specific to SEV. At this point, this is by
>> design.)
>>
>> Cc: Brijesh Singh <brijesh.singh@amd.com>
>> Cc: Jordan Justen <jordan.l.justen@intel.com>
>> Cc: Tom Lendacky <thomas.lendacky@amd.com>
>> Contributed-under: TianoCore Contribution Agreement 1.1
>> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> 
> 
> Reviewed-by: Brijesh Singh <brijesh.singh@amd.com>

Thank you guys for the reviews, pushed as commit d431d8339e8b.

Laszlo


      reply	other threads:[~2017-08-29 20:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-28 12:39 [PATCH 0/1] OvmfPkg/QemuFwCfgDxeLib: SEV: zero FW_CFG_DMA_ACCESS before decrypting it Laszlo Ersek
2017-08-28 12:39 ` [PATCH 1/1] " Laszlo Ersek
2017-08-29  5:11   ` Jordan Justen
2017-08-29 14:02   ` Brijesh Singh
2017-08-29 20:47     ` Laszlo Ersek [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=23215854-3274-bb55-b80b-2d557577813b@redhat.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