[edk2-devel] [PATCH v2 2/6] OvmfPkg/AmdSev: add Grub Firmware Volume Package

James Bottomley jejb at linux.ibm.com
Wed Nov 25 20:11:00 UTC 2020


On Wed, 2020-11-25 at 20:20 +0100, Laszlo Ersek wrote:
> On 11/25/20 19:17, James Bottomley wrote:
[...]
> > diff --git
> > a/MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.c
> > b/MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.c
> > index 5029ddb96adb..12944ac7ea81 100644
> > --- a/MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.c
> > +++ b/MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.c
> > @@ -411,7 +411,7 @@ RegisterVariablePolicy (
> >      }
> >  
> >      // Reallocate and copy the table.
> > -    NewTable = AllocatePool( NewSize );
> > +    NewTable = AllocateRuntimePool( NewSize );
> >      if (NewTable == NULL) {
> >        return EFI_OUT_OF_RESOURCES;
> >      }
> > 
> 
> ... yes. :)
> 
> Since you got to writing this up and testing it first, can you please
> file a new TianoCore BZ about the issue (kernel crash log welcome),
> and post this patch to edk2-devel stand-alone?

OK, done:

https://bugzilla.tianocore.org/show_bug.cgi?id=3092

And about to press send.

> One request for the commit message: right after "Fix this by making
> it AllocateRuntimePool", please add:
> 
> "For SMM drivers, the platform DSC is responsible for resolving the
> MemoryAllocationLib class to the SmmMemoryAllocationLib instance. In
> the SmmMemoryAllocationLib instance, AllocatePool() and
> AllocateRuntimePool() are implemented identically. Therefore this
> change is a no-op when the RegisterVariablePolicy() function is built
> into an SMM driver. The fix affects runtime DXE drivers only."

Added.

James




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#68002): https://edk2.groups.io/g/devel/message/68002
Mute This Topic: https://groups.io/mt/78455898/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list