[Bug 3639] New: CPU Stack Guard cannot be enabled


bugzilla-daemon@...
 

https://bugzilla.tianocore.org/show_bug.cgi?id=3639

Bug ID: 3639
Summary: CPU Stack Guard cannot be enabled
Product: EDK2
Version: Current
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Lowest
Component: Code
Assignee: unassigned@tianocore.org
Reporter: vit9696@protonmail.com
CC: edk2+bugs+int+994+563148131503455288@groups.io

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.

Relevant commit:
https://github.com/tianocore/edk2/commit/0ff5aa9cae1ea276668fa4398d047aa9fda3c2c7

The line in question:
https://github.com/tianocore/edk2/commit/0ff5aa9cae1ea276668fa4398d047aa9fda3c2c7#diff-9030c58d3895c7ced6720c907a58843f124595a16adab19caf4700ce8b35566aR30

--
You are receiving this mail because:
You are on the CC list for the bug.

Join bugs@edk2.groups.io to automatically receive all group messages.