glibc/sysdeps/aarch64
Ben Woodard ce9a68c57c elf: Fix runtime linker auditing on aarch64 (BZ #26643)
The rtld audit support show two problems on aarch64:

  1. _dl_runtime_resolve does not preserve x8, the indirect result
      location register, which might generate wrong result calls
      depending of the function signature.

  2. The NEON Q registers pushed onto the stack by _dl_runtime_resolve
     were twice the size of D registers extracted from the stack frame by
     _dl_runtime_profile.

While 2. might result in wrong information passed on the PLT tracing,
1. generates wrong runtime behaviour.

The aarch64 rtld audit support is changed to:

  * Both La_aarch64_regs and La_aarch64_retval are expanded to include
    both x8 and the full sized NEON V registers, as defined by the
    ABI.

  * dl_runtime_profile needed to extract registers saved by
    _dl_runtime_resolve and put them into the new correctly sized
    La_aarch64_regs structure.

  * The LAV_CURRENT check is change to only accept new audit modules
    to avoid the undefined behavior of not save/restore x8.

  * Different than other architectures, audit modules older than
    LAV_CURRENT are rejected (both La_aarch64_regs and La_aarch64_retval
    changed their layout and there are no requirements to support multiple
    audit interface with the inherent aarch64 issues).

  * A new field is also reserved on both La_aarch64_regs and
    La_aarch64_retval to support variant pcs symbols.

Similar to x86, a new La_aarch64_vector type to represent the NEON
register is added on the La_aarch64_regs (so each type can be accessed
directly).

Since LAV_CURRENT was already bumped to support bind-now, there is
no need to increase it again.

Checked on aarch64-linux-gnu.

Co-authored-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2022-02-01 14:49:46 -03:00
..
bits elf: Fix runtime linker auditing on aarch64 (BZ #26643) 2022-02-01 14:49:46 -03:00
fpu Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
multiarch AArch64: Check for SVE in ifuncs [BZ #28744] 2022-01-06 14:36:28 +00:00
nptl Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
sys Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
__longjmp.S Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
__mtag_tag_region.S Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
__mtag_tag_zero_region.S Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
abort-instr.h
atomic-machine.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
bsd-_setjmp.c aarch64: Rename place holder .S files to .c 2020-07-08 15:02:37 +01:00
bsd-setjmp.c aarch64: Rename place holder .S files to .c 2020-07-08 15:02:37 +01:00
configure config: Added HAVE_AARCH64_SVE_ASM for aarch64 2021-05-26 12:01:06 +01:00
configure.ac config: Added HAVE_AARCH64_SVE_ASM for aarch64 2021-05-26 12:01:06 +01:00
crti.S Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
crtn.S Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
dl-audit-check.h elf: Fix runtime linker auditing on aarch64 (BZ #26643) 2022-02-01 14:49:46 -03:00
dl-bti.c Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
dl-dtprocnum.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
dl-irel.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
dl-link.sym elf: Fix runtime linker auditing on aarch64 (BZ #26643) 2022-02-01 14:49:46 -03:00
dl-lookupcfg.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
dl-machine.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
dl-prop.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
dl-sysdep.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
dl-tls.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
dl-tlsdesc.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
dl-tlsdesc.S Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
dl-trampoline.S elf: Fix runtime linker auditing on aarch64 (BZ #26643) 2022-02-01 14:49:46 -03:00
dl-tunables.list Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
e_sqrtl.c Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
elf-initfini.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
hp-timing.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
Implies Remove dbl-64/wordsize-64 (part 2) 2021-01-07 15:26:26 +00:00
jmpbuf-offsets.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
jmpbuf-unwind.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
ldsodefs.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
libc-mtag.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
libc-tls.c Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
libm-test-ulps aarch64: update libm test ulps 2021-10-05 13:44:27 +01:00
libm-test-ulps-name Do not hardcode platform names in manual/libm-err-tab.pl (bug 14139). 2016-11-04 16:49:06 +00:00
linkmap.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
machine-gmon.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
Makefile elf: Fix runtime linker auditing on aarch64 (BZ #26643) 2022-02-01 14:49:46 -03:00
math-tests-trap.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
mcount.c Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
memchr.S Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
memcmp.S Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
memcpy.S Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
memmove.c aarch64: Rename place holder .S files to .c 2020-07-08 15:02:37 +01:00
memrchr.S Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
memset-reg.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
memset.S Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
preconfigure Remove relro configure test. 2014-06-27 16:51:22 +00:00
rawmemchr.S Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
setjmp.S Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
sfp-machine.h Break more lines before not after operators. 2019-02-25 13:19:19 +00:00
sotruss-lib.c Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
stackinfo.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
start.S Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
stpcpy.S Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
strchr.S Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
strchrnul.S Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
strcmp.S Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
strcpy.S Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
string_private.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
strlen.S Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
strncmp.S Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
strnlen.S Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
strrchr.S Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
sysdep.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
tlsdesc.c Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
tlsdesc.sym aarch64: Use explicit offsets in _dl_tlsdesc_dynamic 2016-12-02 16:52:57 +01:00
tst-audit.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
tst-audit26.c elf: Fix runtime linker auditing on aarch64 (BZ #26643) 2022-02-01 14:49:46 -03:00
tst-audit26mod.c elf: Fix runtime linker auditing on aarch64 (BZ #26643) 2022-02-01 14:49:46 -03:00
tst-audit26mod.h elf: Fix runtime linker auditing on aarch64 (BZ #26643) 2022-02-01 14:49:46 -03:00
tst-audit27.c elf: Fix runtime linker auditing on aarch64 (BZ #26643) 2022-02-01 14:49:46 -03:00
tst-audit27mod.c elf: Fix runtime linker auditing on aarch64 (BZ #26643) 2022-02-01 14:49:46 -03:00
tst-audit27mod.h elf: Fix runtime linker auditing on aarch64 (BZ #26643) 2022-02-01 14:49:46 -03:00
tst-auditmod26.c elf: Fix runtime linker auditing on aarch64 (BZ #26643) 2022-02-01 14:49:46 -03:00
tst-auditmod27.c elf: Fix runtime linker auditing on aarch64 (BZ #26643) 2022-02-01 14:49:46 -03:00
tst-ifunc-arg-1.c Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
tst-ifunc-arg-2.c Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
tst-vpcs-mod.S Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
tst-vpcs.c Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
Versions