glibc/sysdeps/unix/sysv/linux/ia64
H.J. Lu 6c57d32048 sysconf: Add _SC_MINSIGSTKSZ/_SC_SIGSTKSZ [BZ #20305]
Add _SC_MINSIGSTKSZ for the minimum signal stack size derived from
AT_MINSIGSTKSZ, which is the minimum number of bytes of free stack
space required in order to gurantee successful, non-nested handling
of a single signal whose handler is an empty function, and _SC_SIGSTKSZ
which is the suggested minimum number of bytes of stack space required
for a signal stack.

If AT_MINSIGSTKSZ isn't available, sysconf (_SC_MINSIGSTKSZ) returns
MINSIGSTKSZ.  On Linux/x86 with XSAVE, the signal frame used by kernel
is composed of the following areas and laid out as:

 ------------------------------
 | alignment padding          |
 ------------------------------
 | xsave buffer               |
 ------------------------------
 | fsave header (32-bit only) |
 ------------------------------
 | siginfo + ucontext         |
 ------------------------------

Compute AT_MINSIGSTKSZ value as size of xsave buffer + size of fsave
header (32-bit only) + size of siginfo and ucontext + alignment padding.

If _SC_SIGSTKSZ_SOURCE or _GNU_SOURCE are defined, MINSIGSTKSZ and SIGSTKSZ
are redefined as

/* Default stack size for a signal handler: sysconf (SC_SIGSTKSZ).  */
 # undef SIGSTKSZ
 # define SIGSTKSZ sysconf (_SC_SIGSTKSZ)

/* Minimum stack size for a signal handler: SIGSTKSZ.  */
 # undef MINSIGSTKSZ
 # define MINSIGSTKSZ SIGSTKSZ

Compilation will fail if the source assumes constant MINSIGSTKSZ or
SIGSTKSZ.

The reason for not simply increasing the kernel's MINSIGSTKSZ #define
(apart from the fact that it is rarely used, due to glibc's shadowing
definitions) was that userspace binaries will have baked in the old
value of the constant and may be making assumptions about it.

For example, the type (char [MINSIGSTKSZ]) changes if this #define
changes.  This could be a problem if an newly built library tries to
memcpy() or dump such an object defined by and old binary.
Bounds-checking and the stack sizes passed to things like sigaltstack()
and makecontext() could similarly go wrong.
2021-02-01 11:00:52 -08:00
..
bits Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sys Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
____longjmp_chk.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
__ia64_longjmp.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
__longjmp.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
__sigstack_longjmp.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
__start_context.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
arch-syscall.h Update syscall lists for Linux 5.10. 2020-12-16 02:08:52 +00:00
brk.c ia64: Fix brk call on statup 2021-01-28 14:05:14 -03:00
bsd-_setjmp.S
bsd-setjmp.S
c++-types.data
clone2.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
clone.S
configure
configure.ac
dl-cache.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-static.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-sysdep.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
getclktck.c
getcontext.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Implies
ioperm.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
jmp_buf-macros.h
kernel_stat.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
kernel-features.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ld.abilist ld.so: Do not export free/calloc/malloc/realloc functions [BZ #25486] 2020-02-15 11:01:23 +01:00
ldconfig.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ldd-rewrite.sed
ldsodefs.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
libanl.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
libBrokenLocale.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
libc.abilist Remove mknod wrapper functions, move them to symbols 2020-10-09 17:02:06 -03:00
libcrypt.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
libdl.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
libm.abilist New exp10f version without SVID compat wrapper 2020-06-19 12:08:47 -03:00
libnsl.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
libpthread.abilist nptl: Move pthread_gettattr_np into libc 2020-05-20 20:27:49 +02:00
libresolv.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
librt.abilist Finish move of clock_* functions to libc. [BZ #24959] 2019-09-04 14:39:38 +02:00
libthread_db.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
libutil.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
localplt.data ld.so: Do not export free/calloc/malloc/realloc functions [BZ #25486] 2020-02-15 11:01:23 +01:00
makecontext.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Makefile
mmap_internal.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pipe.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
readelflib.c ldconfig/x86: Store ISA level in cache and aux cache 2021-01-13 05:51:17 -08:00
register-dump.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
rt-sysdep.S
setcontext.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
setjmp.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
shlib-versions
sigaltstack-offsets.sym
sigcontext-offsets.sym
sigcontextinfo.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
swapcontext.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
syscall.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
syscalls.list linux: Remove assembly umount2 implementation 2020-05-08 17:19:13 -03:00
sysconf-sigstksz.h sysconf: Add _SC_MINSIGSTKSZ/_SC_SIGSTKSZ [BZ #20305] 2021-02-01 11:00:52 -08:00
sysdep.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sysdep.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
timer_create.c
timer_delete.c
timer_getoverr.c
timer_gettime.c
timer_settime.c
tst-setcontext2.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-setcontext4.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ucontext_i.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
unwind_longjmp.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
unwind-dw2-fde.c
unwind-forcedunwind.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Versions
vfork.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
wordexp.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
xstatver.h Remove mknod wrapper functions, move them to symbols 2020-10-09 17:02:06 -03:00