freebsd-skq/lib/libstand
John Baldwin ad06e987b1 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 Move the 64-bit _setjmp to lib/libstand. 2012-12-21 15:15:35 +00:00
i386
mips Merge @228176 from Perforce to fix a bug introduced in r249553: 2013-04-28 14:40:29 +00:00
powerpc Fix loader on PowerPC following r279784. It turns out that, due to .PATH 2015-03-09 02:19:44 +00:00
sparc64
__main.c
arp.c
assert.c
bcd.c
bootp.c Replace index() and rindex() calls with strchr() and strrchr(). 2012-01-03 18:51:58 +00:00
bootp.h
bootparam.c
bootparam.h
bswap.c Consitently use "__LP64__". 2012-05-24 21:44:46 +00:00
bzipfs.c
cd9660.c Fix loader's ability to read the 10.1 release PowerPC ISOs. There appears to 2014-12-30 16:55:53 +00:00
close.c Clear f_rabuf after freeing the memory it points to. This prevents a 2013-12-18 04:52:30 +00:00
closeall.c
dev.c
dosfs.c Spin the twiddle in dosfs to give visual feedback for disk I/O on 2015-03-12 17:10:04 +00:00
dosfs.h Fix readdir for the root directory on a FAT32 file system. The root 2013-12-19 05:23:10 +00:00
environment.c Fix an inappropriate free of a non-dynamic value. While here, make the 2013-12-18 17:03:43 +00:00
ether.c
ext2fs.c Add a divisor parameter to twiddle() so that callers can request that output 2014-12-22 20:42:36 +00:00
fstat.c
getopt.c
gets.c
globals.c
gzipfs.c
in_cksum.c
inet_ntoa.c
ioctl.c
iodesc.h
libstand.3 Fix usage example in kvprintf(9) and its copy in libstand(3): trailing '\n' 2015-01-23 07:30:57 +00:00
lseek.c
Makefile The System V ABI for amd64 allows functions to use space in a 128 byte 2015-03-13 09:38:16 +00:00
nandfs.c Add a divisor parameter to twiddle() so that callers can request that output 2014-12-22 20:42:36 +00:00
net.c
net.h
netif.c
netif.h
nfs.c Add a divisor parameter to twiddle() so that callers can request that output 2014-12-22 20:42:36 +00:00
nfsv2.h
nullfs.c
open.c Provide a means for loaders to control which file system to use. This 2014-07-30 16:08:16 +00:00
pager.c
pkgfs.c Add pkgfs, a file system implementation for reading files out of a 2014-07-31 23:25:13 +00:00
printf.c Fix usage example in kvprintf(9) and its copy in libstand(3): trailing '\n' 2015-01-23 07:30:57 +00:00
qdivrem.c libstand's qdivrem.c assumes that sizeof(int) == sizeof(long), this is not 2014-07-24 19:06:15 +00:00
quad.h libstand's qdivrem.c assumes that sizeof(int) == sizeof(long), this is not 2014-07-24 19:06:15 +00:00
random.c
rarp.c
read.c Add a divisor parameter to twiddle() so that callers can request that output 2014-12-22 20:42:36 +00:00
readdir.c
rpc.c
rpc.h
rpcv2.h
saioctl.h
sbrk.c Set the malloc alignment to 64 bytes on platforms that use the U-Boot API 2014-02-05 22:53:58 +00:00
splitfs.c
stand.h Add a divisor parameter to twiddle() so that callers can request that output 2014-12-22 20:42:36 +00:00
stat.c
strcasecmp.c
strdup.c
strerror.c
strtol.c
strtoul.c Fix includes for use in libstand. 2013-02-19 17:09:23 +00:00
tftp.c Add a divisor parameter to twiddle() so that callers can request that output 2014-12-22 20:42:36 +00:00
tftp.h
twiddle.c Add a divisor parameter to twiddle() so that callers can request that output 2014-12-22 20:42:36 +00:00
udp.c
ufs.c Add a divisor parameter to twiddle() so that callers can request that output 2014-12-22 20:42:36 +00:00
write.c Add a divisor parameter to twiddle() so that callers can request that output 2014-12-22 20:42:36 +00:00
zalloc_defs.h Set the malloc alignment to 64 bytes on platforms that use the U-Boot API 2014-02-05 22:53:58 +00:00
zalloc_malloc.c - Removing some unneeded definitions of NULL(cruft related to 1970's C). 2011-07-10 07:25:34 +00:00
zalloc_mem.h Set the malloc alignment to 64 bytes on platforms that use the U-Boot API 2014-02-05 22:53:58 +00:00
zalloc_protos.h - Removing some unneeded definitions of NULL(cruft related to 1970's C). 2011-07-10 07:25:34 +00:00
zalloc.c Set the malloc alignment to 64 bytes on platforms that use the U-Boot API 2014-02-05 22:53:58 +00:00