glibc/sysdeps/aarch64
Wilco Dijkstra 2e94e2f5d2 AArch64: Check kernel version for SVE ifuncs
Old Linux kernels disable SVE after every system call.  Calling the
SVE-optimized memcpy afterwards will then cause a trap to reenable SVE.
As a result, applications with a high use of syscalls may run slower with
the SVE memcpy.  This is true for kernels between 4.15.0 and before 6.2.0,
except for 5.14.0 which was patched.  Avoid this by checking the kernel
version and selecting the SVE ifunc on modern kernels.

Parse the kernel version reported by uname() into a 24-bit kernel.major.minor
value without calling any library functions.  If uname() is not supported or
if the version format is not recognized, assume the kernel is modern.

Tested-by: Florian Weimer <fweimer@redhat.com>
Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
2024-03-21 16:50:51 +00:00
..
bits Refer to C23 in place of C2X in glibc 2024-02-01 11:02:01 +00:00
fpu aarch64/fpu: Sync libmvec routines from 2.39 and before with AOR 2024-02-26 09:45:50 -03:00
multiarch AArch64: Check kernel version for SVE ifuncs 2024-03-21 16:50:51 +00:00
nptl Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
sys Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
__arm_za_disable.S aarch64: Add SME runtime support 2024-01-02 15:43:30 +00:00
__longjmp.S aarch64: Add longjmp support for SME 2024-01-02 15:43:30 +00:00
__mtag_tag_region.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
__mtag_tag_zero_region.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
abort-instr.h
atomic-machine.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -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 aarch64: fix check for SVE support in assembler 2024-03-14 14:27:56 +00:00
configure.ac aarch64: fix check for SVE support in assembler 2024-03-14 14:27:56 +00:00
cpu-features.h AArch64: Check kernel version for SVE ifuncs 2024-03-21 16:50:51 +00:00
crti.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
crtn.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-audit-check.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-bti.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-dtprocnum.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-irel.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -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 2024-01-01 10:53:40 -08:00
dl-machine.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-prop.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-start.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-tls.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-tlsdesc.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-tlsdesc.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-trampoline.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-tunables.list Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
e_sqrtl.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
elf-initfini.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hp-timing.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -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 2024-01-01 10:53:40 -08:00
jmpbuf-unwind.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ldsodefs.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
libc-mtag.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
libc-start.c aarch64: Make cpu-features definitions not Linux-specific 2024-01-04 23:48:54 +01:00
libc-tls.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
libm-test-ulps aarch64: Add vector implementations of expm1 routines 2023-11-20 17:53:14 +00: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 2024-01-01 10:53:40 -08:00
machine-gmon.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
Makefile aarch64: Add longjmp test for SME 2024-01-02 16:54:21 +00:00
math-tests-trap.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
math-use-builtins-ffs.h string: Use builtins for ffs and ffsll 2024-02-01 09:31:33 -03:00
mcount.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memchr.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memcmp.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memcpy.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -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 2024-01-01 10:53:40 -08:00
memset-reg.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memset.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
preconfigure elf: Enable TLS descriptor tests on aarch64 2024-03-19 14:53:30 -03:00
rawmemchr.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
rtld-global-offsets.sym aarch64: Add SME runtime support 2024-01-02 15:43:30 +00:00
setjmp.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -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 2024-01-01 10:53:40 -08:00
stackinfo.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
start.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
stpcpy.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strchr.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strchrnul.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strcmp.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strcpy.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strlen.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strncmp.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strnlen.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strrchr.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
sysdep.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tlsdesc.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tlsdesc.sym aarch64: Use explicit offsets in _dl_tlsdesc_dynamic 2016-12-02 16:52:57 +01:00
tst-audit26.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-audit26mod.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-audit26mod.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-audit27.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-audit27mod.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-audit27mod.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-audit.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-auditmod26.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-auditmod27.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-ifunc-arg-1.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-ifunc-arg-2.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-sme-jmp.c aarch64: Add longjmp test for SME 2024-01-02 16:54:21 +00:00
tst-vpcs-mod.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-vpcs.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
Versions
wordcopy.c aarch64: Don't build wordcopy 2022-10-28 11:14:54 +01:00