Reviewed-by: Ray Ni <[email protected]> -----Original Message----- From: Jiang, Guomin <[email protected]> Sent: Monday, February 21, 2022 2:44 PM To: [email protected] Cc: Dong, Guo <[email protected]>; Ni, Ray <[email protected]>; Ma, Maurice <[email protected]>; You, Benjamin <[email protected]> Subject: [PATCH v3 1/1] UefiPayloadPkg/PayloadLoaderPeim: Use INT64 as input parameter
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3818 It will have some potential issue when memory larger than 2G because the high memory address will be fill with 0xFFFFFFFF when do the operation of INTN + INT64 but it is 32 bit normal data in fact. Should use same data type INT64 + INT64. V3: 1. Use INT64 as input parameter because all date type is 64 bit V2: 1. Force the data type to UINTN to avoid high dword be filled with 0xFFFFFFFF 2. Keep INTN because the offset may postive or negative. Cc: Guo Dong <[email protected]> Cc: Ray Ni <[email protected]> Cc: Maurice Ma <[email protected]> Cc: Benjamin You <[email protected]> Signed-off-by: Guomin Jiang <[email protected]> --- UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf64Lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf64Lib.c b/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf64Lib.c index dc47a05c6e4a..c8dbb887340b 100644 --- a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf64Lib.c +++ b/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf64Lib.c @@ -108,7 +108,7 @@ ProcessRelocation64 ( IN UINT64 RelaSize, IN UINT64 RelaEntrySize, IN UINT64 RelaType, - IN INTN Delta, + IN INT64 Delta, IN BOOLEAN DynamicLinking ) { -- 2.35.1.windows.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#86849): https://edk2.groups.io/g/devel/message/86849 Mute This Topic: https://groups.io/mt/89288781/21656 Group Owner: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
