public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] OvmfPkg: Close mAcceptAllMemoryEvent
@ 2023-02-14 23:07 Dionna Glaze
  2023-02-14 23:13 ` Ard Biesheuvel
  2023-02-15  1:33 ` [edk2-devel] " Gupta, Pankaj
  0 siblings, 2 replies; 3+ messages in thread
From: Dionna Glaze @ 2023-02-14 23:07 UTC (permalink / raw)
  To: devel
  Cc: Dionna Glaze, Ard Biesheuvel, Thomas Lendacky, Erdem Aktas,
	James Bottomley, Jiewen Yao, Min Xu, Michael Roth

This event should only trigger once. It should be idempotent, but the
allocation of the memory map itself is observable and can cause
ExitBootServices to fail with a modified map key.

Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Thomas Lendacky <Thomas.Lendacky@amd.com>
Cc: Erdem Aktas <erdemaktas@google.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Michael Roth <michael.roth@amd.com>

Signed-off-by: Dionna Glaze <dionnaglaze@google.com>
---
 OvmfPkg/AmdSevDxe/AmdSevDxe.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/OvmfPkg/AmdSevDxe/AmdSevDxe.c b/OvmfPkg/AmdSevDxe/AmdSevDxe.c
index 6391d1f775..f9baca90bd 100644
--- a/OvmfPkg/AmdSevDxe/AmdSevDxe.c
+++ b/OvmfPkg/AmdSevDxe/AmdSevDxe.c
@@ -124,6 +124,7 @@ AcceptAllMemory (
   }
 
   gBS->FreePool (AllDescMap);
+  gBS->CloseEvent (mAcceptAllMemoryEvent);
   return Status;
 }
 
-- 
2.39.1.637.g21b0678d19-goog


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] OvmfPkg: Close mAcceptAllMemoryEvent
  2023-02-14 23:07 [PATCH] OvmfPkg: Close mAcceptAllMemoryEvent Dionna Glaze
@ 2023-02-14 23:13 ` Ard Biesheuvel
  2023-02-15  1:33 ` [edk2-devel] " Gupta, Pankaj
  1 sibling, 0 replies; 3+ messages in thread
From: Ard Biesheuvel @ 2023-02-14 23:13 UTC (permalink / raw)
  To: Dionna Glaze
  Cc: devel, Thomas Lendacky, Erdem Aktas, James Bottomley, Jiewen Yao,
	Min Xu, Michael Roth

On Wed, 15 Feb 2023 at 00:07, Dionna Glaze <dionnaglaze@google.com> wrote:
>
> This event should only trigger once. It should be idempotent, but the
> allocation of the memory map itself is observable and can cause
> ExitBootServices to fail with a modified map key.
>
> Cc: Ard Biesheuvel <ardb@kernel.org>
> Cc: Thomas Lendacky <Thomas.Lendacky@amd.com>
> Cc: Erdem Aktas <erdemaktas@google.com>
> Cc: James Bottomley <jejb@linux.ibm.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Min Xu <min.m.xu@intel.com>
> Cc: Michael Roth <michael.roth@amd.com>
>
> Signed-off-by: Dionna Glaze <dionnaglaze@google.com>
> ---
>  OvmfPkg/AmdSevDxe/AmdSevDxe.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/OvmfPkg/AmdSevDxe/AmdSevDxe.c b/OvmfPkg/AmdSevDxe/AmdSevDxe.c
> index 6391d1f775..f9baca90bd 100644
> --- a/OvmfPkg/AmdSevDxe/AmdSevDxe.c
> +++ b/OvmfPkg/AmdSevDxe/AmdSevDxe.c
> @@ -124,6 +124,7 @@ AcceptAllMemory (
>    }
>
>    gBS->FreePool (AllDescMap);
> +  gBS->CloseEvent (mAcceptAllMemoryEvent);
>    return Status;
>  }
>
> --
> 2.39.1.637.g21b0678d19-goog
>

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>

Queued as #4041

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [edk2-devel] [PATCH] OvmfPkg: Close mAcceptAllMemoryEvent
  2023-02-14 23:07 [PATCH] OvmfPkg: Close mAcceptAllMemoryEvent Dionna Glaze
  2023-02-14 23:13 ` Ard Biesheuvel
@ 2023-02-15  1:33 ` Gupta, Pankaj
  1 sibling, 0 replies; 3+ messages in thread
From: Gupta, Pankaj @ 2023-02-15  1:33 UTC (permalink / raw)
  To: devel, dionnaglaze
  Cc: Ard Biesheuvel, Thomas Lendacky, Erdem Aktas, James Bottomley,
	Jiewen Yao, Min Xu, Michael Roth

On 2/15/2023 12:07 AM, Dionna Glaze via groups.io wrote:
> This event should only trigger once. It should be idempotent, but the
> allocation of the memory map itself is observable and can cause
> ExitBootServices to fail with a modified map key.
> 
> Cc: Ard Biesheuvel <ardb@kernel.org>
> Cc: Thomas Lendacky <Thomas.Lendacky@amd.com>
> Cc: Erdem Aktas <erdemaktas@google.com>
> Cc: James Bottomley <jejb@linux.ibm.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Min Xu <min.m.xu@intel.com>
> Cc: Michael Roth <michael.roth@amd.com>
> 
> Signed-off-by: Dionna Glaze <dionnaglaze@google.com>
> ---
>   OvmfPkg/AmdSevDxe/AmdSevDxe.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/OvmfPkg/AmdSevDxe/AmdSevDxe.c b/OvmfPkg/AmdSevDxe/AmdSevDxe.c
> index 6391d1f775..f9baca90bd 100644
> --- a/OvmfPkg/AmdSevDxe/AmdSevDxe.c
> +++ b/OvmfPkg/AmdSevDxe/AmdSevDxe.c
> @@ -124,6 +124,7 @@ AcceptAllMemory (
>     }
>   
>     gBS->FreePool (AllDescMap);
> +  gBS->CloseEvent (mAcceptAllMemoryEvent);
>     return Status;
>   }

Reviewed-by: Pankaj Gupta <pankaj.gupta@amd.com>
Tested-by: Pankaj Gupta <pankaj.gupta@amd.com>
Fixes: a00e2e5513 ("OvmfPkg: Add memory acceptance event in AmdSevDxe")



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-15  1:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-14 23:07 [PATCH] OvmfPkg: Close mAcceptAllMemoryEvent Dionna Glaze
2023-02-14 23:13 ` Ard Biesheuvel
2023-02-15  1:33 ` [edk2-devel] " Gupta, Pankaj

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox