freebsd-skq/sys/boot/ficl
jhb 463cde4030 The System V ABI for amd64 allows functions to use space in a 128 byte
redzone below the stack pointer for scratch space and requires
interrupt and signal frames to avoid overwriting it. However, EFI uses
the Windows ABI which does not support this. As a result, interrupt
handlers in EFI push their interrupt frames directly on top of the
stack pointer. If the compiler used the red zone in a function in the
EFI loader, then a device interrupt that occurred while that function
was running could trash its local variables.  In practice this happens
fairly reliable when using gzipfs as an interrupt during decompression
can trash the local variables in the inflate_table() function
resulting in corrupted output or hangs.

Fix this by disabling the redzone for amd64 EFI binaries. This
requires building not only the loader but any libraries used by the
loader without redzone support.

Thanks to Jilles for pointing me at the redzone once I found the stack
corruption.

Differential Revision:	https://reviews.freebsd.org/D2054
Reviewed by:	imp
MFC after:	2 weeks
Sponsored by:	Cisco Systems, Inc.
2015-03-13 09:38:16 +00:00
..
amd64 Cleanup trailing newlines noticed while looking for other issues. 2014-11-14 21:08:51 +00:00
arm Cleanup trailing newlines noticed while looking for other issues. 2014-11-14 21:08:51 +00:00
i386 Cleanup trailing newlines noticed while looking for other issues. 2014-11-14 21:08:51 +00:00
mips Cleanup trailing newlines noticed while looking for other issues. 2014-11-14 21:08:51 +00:00
mips64 Cleanup trailing newlines noticed while looking for other issues. 2014-11-14 21:08:51 +00:00
powerpc Cleanup trailing newlines noticed while looking for other issues. 2014-11-14 21:08:51 +00:00
softwords
sparc64 Cleanup trailing newlines noticed while looking for other issues. 2014-11-14 21:08:51 +00:00
dict.c
ficl.c
ficl.h
fileaccess.c
float.c
loader.c Add support for calling pcibios routines from the 2014-09-10 21:07:00 +00:00
Makefile The System V ABI for amd64 allows functions to use space in a 128 byte 2015-03-13 09:38:16 +00:00
math64.c
math64.h
prefix.c
search.c
stack.c
testmain.c
tools.c Fix printf args for 64-bit archs 2014-04-08 18:02:32 +00:00
unix.c
vm.c
words.c Correct a variable's type for 64-bit Ficl 2014-04-08 17:50:27 +00:00