* [PATCH] UefiPayloadPkg: Fix RelaAddress type always mismatch in if condition @ 2022-07-11 5:05 Lu, James 2022-07-20 6:57 ` Lu, James 0 siblings, 1 reply; 3+ messages in thread From: Lu, James @ 2022-07-11 5:05 UTC (permalink / raw) To: devel; +Cc: James Lu, Ray Ni, Guo Dong, Gua Guo From: James Lu <james.lu@intel.com> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3984 Under function RolocateElfDynamic() in Elf32Lib.c if (RelaAddress == MAX_UINT64) is always FALSE while RelaAddress is UINT32 Fix is to modify if condition check to "if (RelaAddress == MAX_UINT32)" Cc: Ray Ni <ray.ni@intel.com> Cc: Guo Dong <guo.dong@intel.com> Cc: Gua Guo <gua.guo@intel.com> Signed-off-by: James Lu <james.lu@intel.com> --- UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c b/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c index b002c4b9cf..cb915e7142 100644 --- a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c +++ b/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c @@ -292,7 +292,7 @@ RelocateElf32Dynamic ( } } - if (RelaAddress == MAX_UINT64) { + if (RelaAddress == MAX_UINT32) { ASSERT (RelaCount == 0); ASSERT (RelaEntrySize == 0); ASSERT (RelaSize == 0); -- 2.26.2.windows.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] UefiPayloadPkg: Fix RelaAddress type always mismatch in if condition 2022-07-11 5:05 [PATCH] UefiPayloadPkg: Fix RelaAddress type always mismatch in if condition Lu, James @ 2022-07-20 6:57 ` Lu, James 2022-07-21 0:00 ` Guo Dong 0 siblings, 1 reply; 3+ messages in thread From: Lu, James @ 2022-07-20 6:57 UTC (permalink / raw) To: devel@edk2.groups.io; +Cc: Ni, Ray, Dong, Guo, Guo, Gua Hi Ray, Any comment on this patch? Thanks, James -----Original Message----- From: Lu, James <james.lu@intel.com> Sent: Monday, July 11, 2022 1:06 PM To: devel@edk2.groups.io Cc: Lu, James <james.lu@intel.com>; Ni, Ray <ray.ni@intel.com>; Dong, Guo <guo.dong@intel.com>; Guo, Gua <gua.guo@intel.com> Subject: [PATCH] UefiPayloadPkg: Fix RelaAddress type always mismatch in if condition From: James Lu <james.lu@intel.com> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3984 Under function RolocateElfDynamic() in Elf32Lib.c if (RelaAddress == MAX_UINT64) is always FALSE while RelaAddress is UINT32 Fix is to modify if condition check to "if (RelaAddress == MAX_UINT32)" Cc: Ray Ni <ray.ni@intel.com> Cc: Guo Dong <guo.dong@intel.com> Cc: Gua Guo <gua.guo@intel.com> Signed-off-by: James Lu <james.lu@intel.com> --- UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c b/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c index b002c4b9cf..cb915e7142 100644 --- a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c +++ b/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c @@ -292,7 +292,7 @@ RelocateElf32Dynamic ( } } - if (RelaAddress == MAX_UINT64) {+ if (RelaAddress == MAX_UINT32) { ASSERT (RelaCount == 0); ASSERT (RelaEntrySize == 0); ASSERT (RelaSize == 0);-- 2.26.2.windows.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] UefiPayloadPkg: Fix RelaAddress type always mismatch in if condition 2022-07-20 6:57 ` Lu, James @ 2022-07-21 0:00 ` Guo Dong 0 siblings, 0 replies; 3+ messages in thread From: Guo Dong @ 2022-07-21 0:00 UTC (permalink / raw) To: Lu, James, devel@edk2.groups.io; +Cc: Ni, Ray, Guo, Gua Reviewed-by: Guo Dong <guo.dong@intel.com> -----Original Message----- From: Lu, James <james.lu@intel.com> Sent: Tuesday, July 19, 2022 11:58 PM To: devel@edk2.groups.io Cc: Ni, Ray <ray.ni@intel.com>; Dong, Guo <guo.dong@intel.com>; Guo, Gua <gua.guo@intel.com> Subject: RE: [PATCH] UefiPayloadPkg: Fix RelaAddress type always mismatch in if condition Hi Ray, Any comment on this patch? Thanks, James -----Original Message----- From: Lu, James <james.lu@intel.com> Sent: Monday, July 11, 2022 1:06 PM To: devel@edk2.groups.io Cc: Lu, James <james.lu@intel.com>; Ni, Ray <ray.ni@intel.com>; Dong, Guo <guo.dong@intel.com>; Guo, Gua <gua.guo@intel.com> Subject: [PATCH] UefiPayloadPkg: Fix RelaAddress type always mismatch in if condition From: James Lu <james.lu@intel.com> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3984 Under function RolocateElfDynamic() in Elf32Lib.c if (RelaAddress == MAX_UINT64) is always FALSE while RelaAddress is UINT32 Fix is to modify if condition check to "if (RelaAddress == MAX_UINT32)" Cc: Ray Ni <ray.ni@intel.com> Cc: Guo Dong <guo.dong@intel.com> Cc: Gua Guo <gua.guo@intel.com> Signed-off-by: James Lu <james.lu@intel.com> --- UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c b/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c index b002c4b9cf..cb915e7142 100644 --- a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c +++ b/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c @@ -292,7 +292,7 @@ RelocateElf32Dynamic ( } } - if (RelaAddress == MAX_UINT64) {+ if (RelaAddress == MAX_UINT32) { ASSERT (RelaCount == 0); ASSERT (RelaEntrySize == 0); ASSERT (RelaSize == 0);-- 2.26.2.windows.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-07-21 0:00 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-07-11 5:05 [PATCH] UefiPayloadPkg: Fix RelaAddress type always mismatch in if condition Lu, James 2022-07-20 6:57 ` Lu, James 2022-07-21 0:00 ` Guo Dong
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox