glibc/sysdeps/aarch64
Adhemerval Zanella 4352e2cc93 aarch64: Fix _dl_tlsdesc_dynamic unwind for pac-ret (BZ 32612)
When libgcc is built with pac-ret, it requires to autenticate the
unwinding frame based on CFI information.  The _dl_tlsdesc_dynamic
uses a custom calling convention, where it is responsible to save
and restore all registers it might use (even volatile).

The pac-ret support added by 1be3d6eb82
was added only on the slow-path, but the fast path also adds DWARF
Register Rule Instruction (cfi_adjust_cfa_offset) since it requires
to save/restore some auxiliary register.  It seems that this is not
fully supported neither by libgcc nor AArch64 ABI [1].

Instead, move paciasp/autiasp to function prologue/epilogue to be
used on both fast and slow paths.

I also corrected the _dl_tlsdesc_dynamic comment description, it was
copied from i386 implementation without any adjustment.

Checked on aarch64-linux-gnu with a toolchain built with
--enable-standard-branch-protection on a system with pac-ret
support.

[1]  https://github.com/ARM-software/abi-aa/blob/main/aadwarf64/aadwarf64.rst#id1

Reviewed-by: Yury Khrustalev <yury.khrustalev@arm.com>
2025-03-31 10:08:06 -03:00
..
bits AArch64: Remove LP64 and ILP32 ifdefs 2025-02-24 14:20:29 +00:00
fpu AArch64: Optimize algorithm in users of SVE expf helper 2025-03-18 17:15:18 +00:00
multiarch AArch64: Use prefer_sve_ifuncs for SVE memset 2025-02-27 16:51:57 +00:00
nptl AArch64: Remove LP64 and ILP32 ifdefs 2025-02-24 14:20:29 +00:00
sys
Implies
Makefile aarch64: Add GCS user-space allocation logic 2025-01-20 09:36:19 +00:00
Versions
__alloc_gcs.c aarch64: Add GCS user-space allocation logic 2025-01-20 09:36:19 +00:00
__arm_za_disable.S
__longjmp.S AArch64: Cleanup pointer mangling 2025-02-24 14:17:57 +00:00
__mtag_tag_region.S AArch64: Remove PTR_ARG/SIZE_ARG defines 2025-02-24 14:15:15 +00:00
__mtag_tag_zero_region.S AArch64: Remove PTR_ARG/SIZE_ARG defines 2025-02-24 14:15:15 +00:00
aarch64-gcs.h aarch64: Add GCS user-space allocation logic 2025-01-20 09:36:19 +00:00
abort-instr.h
atomic-machine.h
bsd-_setjmp.c
bsd-setjmp.c
configure
configure.ac
cpu-features.h
crti.S AArch64: Remove PTR_REG defines 2025-02-24 14:16:55 +00:00
crtn.S
dl-audit-check.h
dl-bti.c aarch64: Use l_searchlist.r_list for bti 2025-01-20 09:31:47 +00:00
dl-diagnostics-cpu.c
dl-dtprocnum.h
dl-gcs.c aarch64: Ignore GCS property of ld.so 2025-01-20 09:36:19 +00:00
dl-irel.h AArch64: Remove AARCH64_R macro 2025-02-24 14:19:19 +00:00
dl-link.sym
dl-lookupcfg.h
dl-machine.h AArch64: Remove AARCH64_R macro 2025-02-24 14:19:19 +00:00
dl-prop.h aarch64: Handle GCS marking 2025-01-20 09:35:56 +00:00
dl-start.S AArch64: Remove PTR_REG defines 2025-02-24 14:16:55 +00:00
dl-tlsdesc.S aarch64: Fix _dl_tlsdesc_dynamic unwind for pac-ret (BZ 32612) 2025-03-31 10:08:06 -03:00
dl-tlsdesc.h
dl-trampoline.S AArch64: Remove PTR_REG defines 2025-02-24 14:16:55 +00:00
dl-tunables.list aarch64: Add glibc.cpu.aarch64_gcs tunable 2025-01-20 09:31:33 +00:00
e_sqrtl.c
elf-initfini.h
hp-timing.h
jmpbuf-offsets.h aarch64: Define jmp_buf offset for GCS 2025-01-20 09:22:41 +00:00
jmpbuf-unwind.h
ldsodefs.h
libc-mtag.h
libc-start.c
libc-tls.c
linkmap.h aarch64: Handle GCS marking 2025-01-20 09:35:56 +00:00
machine-gmon.h
math-tests-trap.h
math-use-builtins-ffs.h
mcount.c
memchr.S AArch64: Remove PTR_ARG/SIZE_ARG defines 2025-02-24 14:15:15 +00:00
memcmp.S AArch64: Remove PTR_ARG/SIZE_ARG defines 2025-02-24 14:15:15 +00:00
memcpy.S AArch64: Remove PTR_ARG/SIZE_ARG defines 2025-02-24 14:15:15 +00:00
memmove.c
memrchr.S AArch64: Remove PTR_ARG/SIZE_ARG defines 2025-02-24 14:15:15 +00:00
memset.S AArch64: Remove PTR_ARG/SIZE_ARG defines 2025-02-24 14:15:15 +00:00
preconfigure
rawmemchr.S
rtld-global-offsets.sym aarch64: Enable GCS in dynamic linked exe 2025-01-20 09:31:47 +00:00
setjmp.S AArch64: Cleanup pointer mangling 2025-02-24 14:17:57 +00:00
sfp-machine.h aarch64: Use 64-bit variable to access the special registers 2025-01-13 10:17:38 -03:00
sotruss-lib.c
start.S AArch64: Remove PTR_REG defines 2025-02-24 14:16:55 +00:00
stpcpy.S
strchr.S AArch64: Remove PTR_ARG/SIZE_ARG defines 2025-02-24 14:15:15 +00:00
strchrnul.S AArch64: Remove PTR_ARG/SIZE_ARG defines 2025-02-24 14:15:15 +00:00
strcmp.S AArch64: Remove PTR_ARG/SIZE_ARG defines 2025-02-24 14:15:15 +00:00
strcpy.S AArch64: Remove PTR_ARG/SIZE_ARG defines 2025-02-24 14:15:15 +00:00
strlen.S AArch64: Remove PTR_ARG/SIZE_ARG defines 2025-02-24 14:15:15 +00:00
strncmp.S
strnlen.S AArch64: Remove PTR_ARG/SIZE_ARG defines 2025-02-24 14:15:15 +00:00
strrchr.S AArch64: Remove PTR_ARG/SIZE_ARG defines 2025-02-24 14:15:15 +00:00
sysdep.h AArch64: Remove AARCH64_R macro 2025-02-24 14:19:19 +00:00
tlsdesc.c
tlsdesc.sym
tst-audit.h
tst-audit26.c
tst-audit26mod.c
tst-audit26mod.h
tst-audit27.c
tst-audit27mod.c
tst-audit27mod.h
tst-auditmod26.c
tst-auditmod27.c
tst-ifunc-arg-1.c
tst-ifunc-arg-2.c
tst-sme-jmp.c
tst-vpcs-mod.S aarch64: Fix tests not compatible with targets supporting GCS 2025-01-20 09:36:19 +00:00
tst-vpcs.c
wordcopy.c