Re: [PATCH] UefiCpuPkg: Fix CPU stack guard support by aligning GDT buffer
Vitaly Cheptsov
Hi Leif,
toggle quoted message
Show quoted text
I assume you mean the commit description, because the commit message is in the topic. I believe something like that would do: CpuExceptionHandlerLib supplies misaligned GDT to the outer world (e.g. ArchSetupExceptionStack) when PcdCpuStackGuard is enabled. This happens because it uses an array of UINT8 for the mNewGdt variable, which alignment is 1 byte versus required 8 bytes. As a result ArchSetupExceptionStack always returns EFI_INVALID_PARAMETER in OVMF Ia32 with XCODE5 and CLANGPDB at least. Fix this by allocating extra space in mNewGdt and then aligning the pointer upwards. Best wishes, Vitaly On 5 Nov 2021, at 22:28, Leif Lindholm <leif@...> wrote: |
|