Re: [edk2-devel] [PATCH V4] MdeModulePkg: Memory Corruption Error in CapsuleRuntimeDxe

2022-11-09 Thread Nate DeSimone
Hi Mike, All I did was copy the existing error handling in the scenario where we are unable to set up the buffer for any reason: https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Universal/CapsuleRuntimeDxe/X64/SaveLongModeContext.c#L191 I agree that seems a little odd, but I haven’t

Re: [edk2-devel] [PATCH V4] MdeModulePkg: Memory Corruption Error in CapsuleRuntimeDxe

2022-11-03 Thread Michael D Kinney
Also...would it be a simpler policy to fail the capsule update all together if any of the 3 allocations fail? That way, there is no case where is "may fail". Mike > -Original Message- > From: Kinney, Michael D > Sent: Thursday, November 3, 2022 2:21 PM > To: Desimone, Nathaniel L ; >

Re: [edk2-devel] [PATCH V4] MdeModulePkg: Memory Corruption Error in CapsuleRuntimeDxe

2022-11-03 Thread Michael D Kinney
Hi Nate, The "may fail" messages look a bit odd. Is this due to the fact that CapsuleRuntimeDxe is in X64 mode, but this module does not know if PEI Phase will process the capsule in IA32 or X64 execution mode? We have a PCD that is set if the DXE IPL needs to switch modes. Can we use that

[edk2-devel] [PATCH V4] MdeModulePkg: Memory Corruption Error in CapsuleRuntimeDxe

2022-10-25 Thread Nate DeSimone
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4112 In AllocateReservedMemoryBelow4G(), if gBS->AllocatePages() returns an error, and ASSERTs are disabled, then the function will overwrite memory from 0x -> (0x + Size). Cc: Liming Gao Cc: Guomin Jiang Cc: Jian J Wang Cc: