[syslinux] [PATCH 0/2] Do not use the "red zone" on EFI

Geert Stappers stappers at stappers.nl
Fri Nov 27 22:42:00 PST 2015

On Fri, Nov 27, 2015 at 11:41:47PM +0100, celelibi--- via Syslinux wrote:
> From: Sylvain Gault <sylvain.gault op gmail.com>
> The System V ABI for x86-64 specify that a "red zone" is an area of 128 bytes
> above the current stack frame. This area can be used by a called function in
> order to avoid the overhead of modifying the stack pointer. The direct effect
> is that interrupt/event/signal handlers must not write to this area. In the
> UEFI calling convention, there is no such thing and the event handlers do write
> their data just above the current stack frame.
> However, gcc generate by default code that uses the red zone. This has to be
> disabled explicitely with the option -mno-red-zone. Not doing so lead to some
> functions behaving randomly once in a while.
> Fixing this revealed that some Makefiles out of the efi/ directory have some
> specific options when building for BIOS or for EFI. These Makefiles do this by
> testing the EFI_BUILD variable. However, this variable wasn't passed down the
> Makefiles making these specific options never used.

YEE, that is some _serious_ research work.


> Best regards,
> Sylvain Gault

Geert Stappers
Leven en laten leven
------------- volgend deel ------------
Een niet-tekst bijlage is gescrubt...
Naam: signature.asc
Type: application/pgp-signature
Grootte: 836 bytes
Omschrijving: Digital signature
URL : <http://www.zytor.com/pipermail/syslinux/attachments/20151128/4a5ca303/attachment.sig>

More information about the Syslinux mailing list