[syslinux] [PATCH] Fix for crash with certain EFIs

H. Peter Anvin
Wed, 19 Oct 2016 18:38:08 -0000

On 10/19/16 01:37, Chris Dragan via Syslinux wrote:
> Hi Ady,
>
> Would it work if we removed "ifdef EFI_BUILD" condition and just
add
> -mno-red-zone for all x86_64 builds? If not, do you have any ideas how
> to pass this flag?
>
> This could work, because the patch is adding the -mno-red-zone flag
> only for x86_64 builds, which are only used in the form of the efi64
> target. The efi32 and bios targets are both 32-bit.
>
> BTW. I also tried 6.04-pre1 and top of tree on the systems where the
> problem occurs and syslinux would crash, unless it was rebuilt with
> the -mno-red-zone flag.
>

I think this makes sense.  Even if we end up with non-EFI x86-64
targets, they almost certainly need the redzone disabled, too; any ring
0 code on x86-64 has to be compiled without red zone due to the way the
kernel stack is used by the hardware.

	-hpa