[edk2-devel] [PATCH V1 1/1] MdeModulePkg: EfiUnacceptedMemoryType is not allowed in AllocatePool

Yao, Jiewen jiewen.yao at intel.com
Wed Jan 18 10:03:54 UTC 2023


Reviewed-by: Jiewen Yao <Jiewen.yao at intel.com>

> -----Original Message-----
> From: Xu, Min M <min.m.xu at intel.com>
> Sent: Wednesday, January 18, 2023 4:42 PM
> To: devel at edk2.groups.io
> Cc: Xu, Min M <min.m.xu at intel.com>; Gao, Liming
> <gaoliming at byosoft.com.cn>; Bi, Dandan <dandan.bi at intel.com>; Aktas,
> Erdem <erdemaktas at google.com>; James Bottomley <jejb at linux.ibm.com>;
> Yao, Jiewen <jiewen.yao at intel.com>; Gerd Hoffmann <kraxel at redhat.com>;
> Tom Lendacky <thomas.lendacky at amd.com>; Michael Roth
> <michael.roth at amd.com>
> Subject: [PATCH V1 1/1] MdeModulePkg: EfiUnacceptedMemoryType is not
> allowed in AllocatePool
> 
> From: Min M Xu <min.m.xu at intel.com>
> 
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4315
> 
> MemoryType of EfiUnacceptedMemoryType should not be allocated in
> AllocatePool. Instead it should return EFI_INVALID_PARAMETER.
> 
> Cc: Liming Gao <gaoliming at byosoft.com.cn>
> Cc: Dandan Bi <dandan.bi at intel.com>
> Cc: Erdem Aktas <erdemaktas at google.com>
> Cc: James Bottomley <jejb at linux.ibm.com>
> Cc: Jiewen Yao <jiewen.yao at intel.com>
> Cc: Gerd Hoffmann <kraxel at redhat.com>
> Cc: Tom Lendacky <thomas.lendacky at amd.com>
> Cc: Michael Roth <michael.roth at amd.com>
> Reported-by: Liming Gao <gaoliming at byosoft.com.cn>
> Signed-off-by: Min Xu <min.m.xu at intel.com>
> ---
>  MdeModulePkg/Core/Dxe/Mem/Pool.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/MdeModulePkg/Core/Dxe/Mem/Pool.c
> b/MdeModulePkg/Core/Dxe/Mem/Pool.c
> index 7aaf501600cf..b20cbfdedbab 100644
> --- a/MdeModulePkg/Core/Dxe/Mem/Pool.c
> +++ b/MdeModulePkg/Core/Dxe/Mem/Pool.c
> @@ -213,7 +213,7 @@ CoreInternalAllocatePool (
>    // If it's not a valid type, fail it
>    //
>    if (((PoolType >= EfiMaxMemoryType) && (PoolType <
> MEMORY_TYPE_OEM_RESERVED_MIN)) ||
> -      (PoolType == EfiConventionalMemory) || (PoolType ==
> EfiPersistentMemory))
> +      (PoolType == EfiConventionalMemory) || (PoolType ==
> EfiPersistentMemory) || (PoolType == EfiUnacceptedMemoryType))
>    {
>      return EFI_INVALID_PARAMETER;
>    }
> --
> 2.29.2.windows.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#98793): https://edk2.groups.io/g/devel/message/98793
Mute This Topic: https://groups.io/mt/96350145/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