mirror of
git://sourceware.org/git/glibc.git
synced 2024-12-03 04:01:43 +08:00
b118bce87a
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>
(cherry picked from commit
|
||
---|---|---|
.. | ||
bits | ||
fpu | ||
multiarch | ||
nptl | ||
sys | ||
__longjmp.S | ||
__mtag_tag_region.S | ||
__mtag_tag_zero_region.S | ||
abort-instr.h | ||
atomic-machine.h | ||
bsd-_setjmp.c | ||
bsd-setjmp.c | ||
configure | ||
configure.ac | ||
crti.S | ||
crtn.S | ||
dl-audit-check.h | ||
dl-bti.c | ||
dl-dtprocnum.h | ||
dl-irel.h | ||
dl-link.sym | ||
dl-lookupcfg.h | ||
dl-machine.h | ||
dl-prop.h | ||
dl-sysdep.h | ||
dl-tls.h | ||
dl-tlsdesc.h | ||
dl-tlsdesc.S | ||
dl-trampoline.S | ||
dl-tunables.list | ||
e_sqrtl.c | ||
elf-initfini.h | ||
hp-timing.h | ||
Implies | ||
jmpbuf-offsets.h | ||
jmpbuf-unwind.h | ||
ldsodefs.h | ||
libc-mtag.h | ||
libc-tls.c | ||
libm-test-ulps | ||
libm-test-ulps-name | ||
linkmap.h | ||
machine-gmon.h | ||
Makefile | ||
math-tests-trap.h | ||
mcount.c | ||
memchr.S | ||
memcmp.S | ||
memcpy.S | ||
memmove.c | ||
memrchr.S | ||
memset-reg.h | ||
memset.S | ||
memusage.h | ||
preconfigure | ||
rawmemchr.S | ||
setjmp.S | ||
sfp-machine.h | ||
sotruss-lib.c | ||
stackinfo.h | ||
start.S | ||
stpcpy.S | ||
strchr.S | ||
strchrnul.S | ||
strcmp.S | ||
strcpy.S | ||
string_private.h | ||
strlen.S | ||
strncmp.S | ||
strnlen.S | ||
strrchr.S | ||
sysdep.h | ||
tls-macros.h | ||
tlsdesc.c | ||
tlsdesc.sym | ||
tst-audit26.c | ||
tst-audit26mod.c | ||
tst-audit26mod.h | ||
tst-audit27.c | ||
tst-audit27mod.c | ||
tst-audit27mod.h | ||
tst-audit.h | ||
tst-auditmod26.c | ||
tst-auditmod27.c | ||
tst-ifunc-arg-1.c | ||
tst-ifunc-arg-2.c | ||
tst-vpcs-mod.S | ||
tst-vpcs.c | ||
Versions |