glibc/sysdeps/riscv
Szabolcs Nagy 238032ead6 aarch64: enforce >=64K guard size [BZ #26691]
There are several compiler implementations that allow large stack
allocations to jump over the guard page at the end of the stack and
corrupt memory beyond that. See CVE-2017-1000364.

Compilers can emit code to probe the stack such that the guard page
cannot be skipped, but on aarch64 the probe interval is 64K by default
instead of the minimum supported page size (4K).

This patch enforces at least 64K guard on aarch64 unless the guard
is disabled by setting its size to 0.  For backward compatibility
reasons the increased guard is not reported, so it is only observable
by exhausting the address space or parsing /proc/self/maps on linux.

On other targets the patch has no effect. If the stack probe interval
is larger than a page size on a target then ARCH_MIN_GUARD_SIZE can
be defined to get large enough stack guard on libc allocated stacks.

The patch does not affect threads with user allocated stacks.

Fixes bug 26691.
2020-10-02 09:57:44 +01:00
..
bits RISC-V: Support the 32-bit ABI implementation 2020-08-27 08:17:42 -07:00
nofpu math: Remove inline math tests 2020-03-19 11:45:44 -03:00
nptl aarch64: enforce >=64K guard size [BZ #26691] 2020-10-02 09:57:44 +01:00
rv32 RISC-V: Build infrastructure for 32-bit port 2020-08-27 08:17:43 -07:00
rv64 RISC-V: Update lp64d libm-test-ulps according to HiFive Unleashed 2020-08-04 13:00:17 +01:00
rvd riscv: Use sqrt{f} builtin 2020-06-22 11:09:50 -03:00
rvf riscv: Use sqrt{f} builtin 2020-06-22 11:09:50 -03:00
sys RISC-V: Support the 32-bit ABI implementation 2020-08-27 08:17:42 -07:00
__longjmp.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
bsd-_setjmp.c RISC-V: ABI Implementation 2018-01-29 10:25:29 -08:00
bsd-setjmp.c RISC-V: ABI Implementation 2018-01-29 10:25:29 -08:00
configure RISC-V: Build Infastructure 2018-01-29 10:43:15 -08:00
configure.ac RISC-V: Build Infastructure 2018-01-29 10:43:15 -08:00
dl-machine.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
dl-tls.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
dl-trampoline.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
e_sqrtl.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
fpu_control.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
gccframe.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
Implies Introduce <elf-initfini.h> and ELF_INITFINI for all architectures 2020-02-18 15:12:25 +01:00
jmpbuf-offsets.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
jmpbuf-unwind.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
ldsodefs.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
libc-tls.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
linkmap.h RISC-V: ABI Implementation 2018-01-29 10:25:29 -08:00
machine-gmon.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
Makefile RISC-V: Build Infastructure 2018-01-29 10:43:15 -08:00
math-tests-snan-payload.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
math-tests-trap.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
memusage.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
preconfigure RISC-V: Build infrastructure for 32-bit port 2020-08-27 08:17:43 -07:00
setjmp.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
sfp-machine.h RISC-V: Support the 32-bit ABI implementation 2020-08-27 08:17:42 -07:00
sotruss-lib.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
stackinfo.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
start.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
tininess.h RISC-V: Generic <math.h> and soft-fp Routines 2018-01-29 10:26:35 -08:00
tls-macros.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
tst-audit.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00