glibc/sysdeps/aarch64
Wilco Dijkstra a4c897e4c7 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>
(cherry picked from commit 2e94e2f5d2)
2024-04-09 18:02:26 +01:00
..
bits elf: Fix runtime linker auditing on aarch64 (BZ #26643) 2022-04-12 13:33:10 -04:00
fpu Update math: redirect roundeven function 2021-06-27 07:56:57 -07:00
multiarch AArch64: Check kernel version for SVE ifuncs 2024-04-09 18:02:26 +01:00
nptl Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sys Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
__longjmp.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
__mtag_tag_region.S aarch64: Optimize __libc_mtag_tag_region 2021-03-26 11:03:06 +00:00
__mtag_tag_zero_region.S aarch64: Optimize __libc_mtag_tag_zero_region 2021-03-26 11:03:06 +00:00
abort-instr.h
atomic-machine.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -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-04-09 17:59:22 +01:00
configure.ac aarch64: fix check for SVE support in assembler 2024-04-09 17:59:22 +01:00
crti.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
crtn.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-audit-check.h elf: Fix runtime linker auditing on aarch64 (BZ #26643) 2022-04-12 13:33:10 -04:00
dl-bti.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-dtprocnum.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-irel.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-link.sym elf: Fix runtime linker auditing on aarch64 (BZ #26643) 2022-04-12 13:33:10 -04:00
dl-lookupcfg.h aarch64: free tlsdesc data on dlclose [BZ #27403] 2021-04-06 14:35:05 +01:00
dl-machine.h elf: Fix dynamic-link.h usage on rtld.c 2022-04-08 14:18:11 -04:00
dl-prop.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-sysdep.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-tls.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-tlsdesc.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-tlsdesc.S aarch64: push the set of rules before falling into slow path 2021-01-05 09:25:19 +00:00
dl-trampoline.S elf: Fix rtld-audit trampoline for aarch64 2022-11-22 10:34:14 -03:00
dl-tunables.list Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
e_sqrtl.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
elf-initfini.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
hp-timing.h AArch64: Add hp-timing.h 2021-07-01 15:42:05 +01: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 2021-01-02 12:17:34 -08:00
jmpbuf-unwind.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ldsodefs.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
libc-mtag.h aarch64: inline __libc_mtag_new_tag 2021-03-26 11:03:06 +00:00
libc-tls.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
libm-test-ulps aarch64: update libm test ulps 2021-04-08 08:24:30 +01:00
libm-test-ulps-name
linkmap.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
machine-gmon.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Makefile elf: Fix runtime linker auditing on aarch64 (BZ #26643) 2022-04-12 13:33:10 -04:00
math-tests-trap.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
mcount.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memchr.S AArch64: Optimize memchr 2024-04-09 17:36:35 +01:00
memcmp.S AArch64: Optimize memcmp 2024-04-09 17:32:53 +01:00
memcpy.S aarch64: Use memcpy_simd as the default memcpy 2024-04-09 17:36:09 +01:00
memmove.c aarch64: Rename place holder .S files to .c 2020-07-08 15:02:37 +01:00
memrchr.S AArch64: Optimize memrchr 2024-04-09 17:36:45 +01:00
memset-reg.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memset.S AArch64: Add memset_zva64 2024-04-09 17:58:28 +01:00
memusage.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
preconfigure
rawmemchr.S aarch64: correct CFI in rawmemchr (bug 31113) 2024-04-09 17:59:11 +01:00
setjmp.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -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 2021-01-02 12:17:34 -08:00
stackinfo.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
start.S Reduce the statically linked startup code [BZ #23323] 2021-02-25 12:13:02 +01:00
stpcpy.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strchr.S AArch64: Optimize strchr 2024-04-09 17:37:05 +01:00
strchrnul.S AArch64: Improve strchrnul 2024-04-09 17:37:15 +01:00
strcmp.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strcpy.S AArch64: Optimize strcpy 2024-04-09 17:37:24 +01:00
string_private.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strlen.S AArch64: Optimize strlen 2024-04-09 17:37:38 +01:00
strncmp.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strnlen.S AArch64: Optimize strnlen 2024-04-09 17:37:47 +01:00
strrchr.S AArch64: Improve strrchr 2024-04-09 17:37:56 +01:00
sysdep.h aarch64: define BTI_C and BTI_J macros as NOP unless HAVE_AARCH64_BTI 2021-05-26 12:01:06 +01:00
tls-macros.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tlsdesc.c elf: Remove lazy tlsdesc relocation related code 2021-04-21 14:35:53 +01:00
tlsdesc.sym
tst-audit26.c elf: Fix runtime linker auditing on aarch64 (BZ #26643) 2022-04-12 13:33:10 -04:00
tst-audit26mod.c elf: Fix runtime linker auditing on aarch64 (BZ #26643) 2022-04-12 13:33:10 -04:00
tst-audit26mod.h elf: Fix runtime linker auditing on aarch64 (BZ #26643) 2022-04-12 13:33:10 -04:00
tst-audit27.c elf: Fix runtime linker auditing on aarch64 (BZ #26643) 2022-04-12 13:33:10 -04:00
tst-audit27mod.c elf: Fix runtime linker auditing on aarch64 (BZ #26643) 2022-04-12 13:33:10 -04:00
tst-audit27mod.h elf: Fix runtime linker auditing on aarch64 (BZ #26643) 2022-04-12 13:33:10 -04:00
tst-audit.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-auditmod26.c elf: Fix runtime linker auditing on aarch64 (BZ #26643) 2022-04-12 13:33:10 -04:00
tst-auditmod27.c elf: Fix runtime linker auditing on aarch64 (BZ #26643) 2022-04-12 13:33:10 -04:00
tst-ifunc-arg-1.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-ifunc-arg-2.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-vpcs-mod.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-vpcs.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Versions