Go to file
H.J. Lu 354cabcb26 x86-64: Allocate state buffer space for RDI, RSI and RBX
_dl_tlsdesc_dynamic preserves RDI, RSI and RBX before realigning stack.
After realigning stack, it saves RCX, RDX, R8, R9, R10 and R11.  Define
TLSDESC_CALL_REGISTER_SAVE_AREA to allocate space for RDI, RSI and RBX
to avoid clobbering saved RDI, RSI and RBX values on stack by xsave to
STATE_SAVE_OFFSET(%rsp).

   +==================+<- stack frame start aligned at 8 or 16 bytes
   |                  |<- RDI saved in the red zone
   |                  |<- RSI saved in the red zone
   |                  |<- RBX saved in the red zone
   |                  |<- paddings for stack realignment of 64 bytes
   |------------------|<- xsave buffer end aligned at 64 bytes
   |                  |<-
   |                  |<-
   |                  |<-
   |------------------|<- xsave buffer start at STATE_SAVE_OFFSET(%rsp)
   |                  |<- 8-byte padding for 64-byte alignment
   |                  |<- 8-byte padding for 64-byte alignment
   |                  |<- R11
   |                  |<- R10
   |                  |<- R9
   |                  |<- R8
   |                  |<- RDX
   |                  |<- RCX
   +==================+<- RSP aligned at 64 bytes

Define TLSDESC_CALL_REGISTER_SAVE_AREA, the total register save area size
for all integer registers by adding 24 to STATE_SAVE_OFFSET since RDI, RSI
and RBX are saved onto stack without adjusting stack pointer first, using
the red-zone.  This fixes BZ #31501.
Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com>

(cherry picked from commit 717ebfa85c)
2024-04-01 11:16:14 -07:00
argp
assert
benchtests Benchtests: Increase benchmark iterations 2024-01-12 16:00:28 +00:00
bits Implement C23 <stdbit.h> 2024-01-03 12:07:14 +00:00
catgets Update copyright dates not handled by scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ChangeLog.old Create ChangeLog.old/ChangeLog.28 2024-01-31 01:34:58 +01:00
conform Remove ia64-linux-gnu 2024-01-08 17:09:36 -03:00
csu
ctype
debug debug/getwd_chk.c: warning should be emitted for the __getwd_chk symbol. 2024-01-12 15:21:26 +01:00
dirent
dlfcn
elf x86: Update _dl_tlsdesc_dynamic to preserve caller-saved registers 2024-04-01 10:42:25 -07:00
gmon Remove ia64-linux-gnu 2024-01-08 17:09:36 -03:00
gnulib
hesiod
htl
hurd hurd: Declare _hurd_intr_rpc_msg* with protected visibility 2024-01-03 21:59:54 +01:00
iconv Update copyright dates not handled by scripts/update-copyrights 2024-01-01 10:53:40 -08:00
iconvdata
include version.h, include/features.h: Bump version to 2.39 2024-01-31 01:29:11 +01:00
inet
intl
io
libio libio: Check remaining buffer size in _IO_wdo_write (bug 31183) 2024-01-02 14:36:17 +01:00
locale Define ISO 639-3 "ssy" (Saho) 2024-01-18 11:01:10 +01:00
localedata localedata: Use consistent values for grouping and mon_grouping 2024-01-25 11:41:02 +01:00
login Update copyright dates not handled by scripts/update-copyrights 2024-01-01 10:53:40 -08:00
mach mach: Drop some unnecessary vm_param.h includes 2024-01-03 21:59:54 +01:00
malloc Make __getrandom_nocancel set errno and add a _nostatus version 2024-01-12 14:23:11 +01:00
manual Use gcc __builtin_stdc_* builtins in stdbit.h if possible 2024-03-04 12:56:27 +01:00
math math: remove exp10 wrappers 2024-01-12 16:02:12 +00:00
mathvec
misc syslog: Fix integer overflow in __vsyslog_internal (CVE-2023-6780) 2024-01-30 15:53:37 +01:00
nis
nptl Remove ia64-linux-gnu 2024-01-08 17:09:36 -03:00
nptl_db
nscd Update copyright dates not handled by scripts/update-copyrights 2024-01-01 10:53:40 -08:00
nss getaddrinfo: translate ENOMEM to EAI_MEMORY (bug 31163) 2024-01-02 11:10:42 +01:00
po po: Update translations 2024-01-31 01:10:02 +01:00
posix Omit regex.c pragmas no longer needed 2024-01-01 10:53:40 -08:00
resolv Relicense IBM portions of resolv/base64.c resolv/res_debug.c. 2024-01-26 13:33:36 -05:00
resource
rt
scripts Update advisory format and introduce some automation 2024-01-30 13:58:57 -05:00
setjmp
signal
socket
soft-fp
stdio-common localedata: Use consistent values for grouping and mon_grouping 2024-01-25 11:41:02 +01:00
stdlib Use gcc __builtin_stdc_* builtins in stdbit.h if possible 2024-03-04 12:56:27 +01:00
string string: Disable stack protector for memset in early static initialization 2024-01-23 10:22:59 -03:00
sunrpc
support Remove ia64-linux-gnu 2024-01-08 17:09:36 -03:00
sysdeps x86-64: Allocate state buffer space for RDI, RSI and RBX 2024-04-01 11:16:14 -07:00
sysvipc
termios
time
timezone
wcsmbs
wctype
.clang-format
.gitattributes
.gitignore
abi-tags
aclocal.m4
ADVISORIES Replace advisories directory 2024-01-31 02:12:43 +01:00
config.h.in
config.make.in
configure
configure.ac
CONTRIBUTED-BY
COPYING
COPYING.LIB
extra-lib.mk
gen-locales.mk
INSTALL INSTALL, install.texi: minor updates, regenerate 2024-01-31 00:13:43 +01:00
libc-abis
libof-iterator.mk
LICENSES Relicense IBM portions of resolv/base64.c resolv/res_debug.c. 2024-01-26 13:33:36 -05:00
MAINTAINERS
Makeconfig
Makefile
Makefile.help
Makefile.in
Makerules Remove installed header rule on $(..)include/%.h 2024-01-09 10:35:37 -08:00
NEWS NEWS: insert advisories and fixed bugs for 2.39 2024-01-30 22:40:34 +01:00
o-iterator.mk
README Remove ia64-linux-gnu 2024-01-08 17:09:36 -03:00
Rules
SECURITY.md
SHARED-FILES
shlib-versions
test-skeleton.c
version.h version.h, include/features.h: Bump version to 2.39 2024-01-31 01:29:11 +01:00

This directory contains the sources of the GNU C Library.
See the file "version.h" for what release version you have.

The GNU C Library is the standard system C library for all GNU systems,
and is an important part of what makes up a GNU system.  It provides the
system API for all programs written in C and C-compatible languages such
as C++ and Objective C; the runtime facilities of other programming
languages use the C library to access the underlying operating system.

In GNU/Linux systems, the C library works with the Linux kernel to
implement the operating system behavior seen by user applications.
In GNU/Hurd systems, it works with a microkernel and Hurd servers.

The GNU C Library implements much of the POSIX.1 functionality in the
GNU/Hurd system, using configurations i[4567]86-*-gnu and x86_64-gnu.

When working with Linux kernels, this version of the GNU C Library
requires Linux kernel version 3.2 or later.

Also note that the shared version of the libgcc_s library must be
installed for the pthread library to work correctly.

The GNU C Library supports these configurations for using Linux kernels:

	aarch64*-*-linux-gnu
	alpha*-*-linux-gnu
	arc*-*-linux-gnu
	arm-*-linux-gnueabi
	csky-*-linux-gnuabiv2
	hppa-*-linux-gnu
	i[4567]86-*-linux-gnu
	x86_64-*-linux-gnu	Can build either x86_64 or x32
	loongarch64-*-linux-gnu Hardware floating point, LE only.
	m68k-*-linux-gnu
	microblaze*-*-linux-gnu
	mips-*-linux-gnu
	mips64-*-linux-gnu
	or1k-*-linux-gnu
	powerpc-*-linux-gnu	Hardware or software floating point, BE only.
	powerpc64*-*-linux-gnu	Big-endian and little-endian.
	s390-*-linux-gnu
	s390x-*-linux-gnu
	riscv32-*-linux-gnu
	riscv64-*-linux-gnu
	sh[34]-*-linux-gnu
	sparc*-*-linux-gnu
	sparc64*-*-linux-gnu

If you are interested in doing a port, please contact the glibc
maintainers; see https://www.gnu.org/software/libc/ for more
information.

See the file INSTALL to find out how to configure, build, and install
the GNU C Library.  You might also consider reading the WWW pages for
the C library at https://www.gnu.org/software/libc/.

The GNU C Library is (almost) completely documented by the Texinfo manual
found in the `manual/' subdirectory.  The manual is still being updated
and contains some known errors and omissions; we regret that we do not
have the resources to work on the manual as much as we would like.  For
corrections to the manual, please file a bug in the `manual' component,
following the bug-reporting instructions below.  Please be sure to check
the manual in the current development sources to see if your problem has
already been corrected.

Please see https://www.gnu.org/software/libc/bugs.html for bug reporting
information.  We are now using the Bugzilla system to track all bug reports.
This web page gives detailed information on how to report bugs properly.

The GNU C Library is free software.  See the file COPYING.LIB for copying
conditions, and LICENSES for notices about a few contributions that require
these additional notices to be distributed.  License copyright years may be
listed using range notation, e.g., 1996-2015, indicating that every year in
the range, inclusive, is a copyrightable year that would otherwise be listed
individually.