Re: [PATCH] UefiCpuPkg: Fix CPU stack guard support by aligning GDT buffer

Vitaly Cheptsov

Just to make it clear, this is an immediate solution that is good enough to fix the bug. However, a more proper solution would be to introduce the _Alignas concept to EDK II. I would suggest the following macro in Base.h:

  Enforce custom alignment for a variable definition.
  Similar to C11 alignas macro from stdalign.h, except it must be functional to support MSVC.

  @param  Alignment  Numeric alignment to require.
  #define ALIGNAS(Alignment) __declspec(align(Alignment))
  #define ALIGNAS(Alignment) _Alignas(Alignment)

If there is no disagreement on this, I can imagine submitting an update after this patch is merged.

Join to automatically receive all group messages.