On 06/18/15 16:52, Zeng, Star wrote:
> Fix typo below: "register" in last sentence should be "unregister".
> 
> -----Original Message-----
> From: Zeng, Star [mailto:star.z...@intel.com] 
> Sent: Thursday, June 18, 2015 10:45 PM
> To: Laszlo Ersek
> Cc: edk2-devel@lists.sourceforge.net
> Subject: Re: [edk2] [PATCH 2/2] MdeModulePkg PiSmmCore: Unregister end of dxe 
> notification in SmmReadyToLock.
> 
> Thanks for your reminder.
> 
> To avoid potential malicious code to trigger end of dxe SMI handler many 
> times, then install SmmEndOfDxe protocol many times to exhaust SMRAM space.
> The SMI handler needs to be unregistered at proper point.
> PI spec says SmmReadyToLock protocol should be installed immediately after  
> EFI_END_OF_DXE_EVENT_GROUP_GUID with no intervening modules dispatched.
> So we can register the end of dxe notification in SmmReadyToLock safely.

This makes perfect sense, thank you!

Laszlo

> 
> Thanks,
> Star
> -----Original Message-----
> From: Laszlo Ersek [mailto:ler...@redhat.com]
> Sent: Thursday, June 18, 2015 10:04 PM
> To: Zeng, Star
> Cc: edk2-devel@lists.sourceforge.net
> Subject: Re: [edk2] [PATCH 2/2] MdeModulePkg PiSmmCore: Unregister end of dxe 
> notification in SmmReadyToLock.
> 
> On 06/18/15 07:40, Star Zeng wrote:
>> Cc: Jiewen Yao <jiewen....@intel.com>
>> Contributed-under: TianoCore Contribution Agreement 1.0
>> Signed-off-by: Star Zeng <star.z...@intel.com>
>> ---
>>  MdeModulePkg/Core/PiSmmCore/PiSmmCore.c | 2 +- 
>> MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c  | 2 +-
>>  2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
>> b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
>> index 852f8b9..c91f149 100644
>> --- a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
>> +++ b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
>> @@ -80,7 +80,7 @@ SMM_CORE_SMI_HANDLERS  mSmmCoreSmiHandlers[] = {
>>    { SmmLegacyBootHandler,       &gEfiEventLegacyBootGuid,           NULL, 
>> FALSE },
>>    { SmmExitBootServicesHandler, &gEfiEventExitBootServicesGuid,     NULL, 
>> FALSE },
>>    { SmmReadyToBootHandler,      &gEfiEventReadyToBootGuid,          NULL, 
>> FALSE },
>> -  { SmmEndOfDxeHandler,         &gEfiEndOfDxeEventGroupGuid,        NULL, 
>> FALSE },
>> +  { SmmEndOfDxeHandler,         &gEfiEndOfDxeEventGroupGuid,        NULL, 
>> TRUE },
>>    { NULL,                       NULL,                               NULL, 
>> FALSE }
>>  };
>>  
>> diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
>> b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
>> index 4dd1352..ebef741 100644
>> --- a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
>> +++ b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
>> @@ -267,7 +267,7 @@ SMM_IPL_EVENT_NOTIFICATION  mSmmIplEvents[] = {
>>    // the associated event is immediately signalled, so the notification 
>> function will be executed and the 
>>    // SMM End Of Dxe Protocol will be found if it is already in the handle 
>> database.
>>    //
>> -  { FALSE, FALSE,  &gEfiEndOfDxeEventGroupGuid,        
>> SmmIplGuidedEventNotify,           &gEfiEndOfDxeEventGroupGuid,        
>> TPL_CALLBACK, NULL },
>> +  { FALSE, TRUE,  &gEfiEndOfDxeEventGroupGuid,        
>> SmmIplGuidedEventNotify,           &gEfiEndOfDxeEventGroupGuid,        
>> TPL_CALLBACK, NULL },
>>    //
>>    // Declare event notification on the DXE Dispatch Event Group.  This 
>> event is signaled by the DXE Core
>>    // each time the DXE Core dispatcher has completed its work.  When 
>> this event is signalled, the SMM Core
>>
> 
> Please provide a detailed description in the commit message about the bug 
> that this patch fixes.
> 
> Thanks
> Laszlo
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
> 


------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to