aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
AgeCommit message (Collapse)AuthorFilesLines
2025-01-04hppa: Update libm-test-ulpsJohn David Anglin1-13/+13
Signed-off-by: John David Anglin <dave.anglin@bell.net>
2025-01-04math: update loongarch64 ulpsAndreas K. Hüttel1-0/+140
Linux matoro-loongdev 6.12.0-gentoo-loongarch64 #1 SMP PREEMPT Fri Nov 22 00:38:46 EST 2024 loongarch64 GNU/Linux Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
2025-01-04loongarch: Provide stpcpy in stpcpy-aligned.S for rtld [BZ #32512]H.J. Lu1-0/+1
When stpcpy-aligned.S is used in rtld, provide stpcpy as a weak alias of __stpcpy. This fixes BZ #32512. Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
2025-01-03AArch64: Improve codegen in SVE expm1f and usersLuna Lamb4-45/+44
Use unpredicated muls, use absolute compare and improve memory access. Expm1f, sinhf and tanhf show 7%, 5% and 1% improvement in throughput microbenchmark on Neoverse V1.
2025-01-03AArch64: Add vector tanpi routinesJoe Ramsay14-1/+349
Vector variant of the new C23 tanpi. New tests pass on AArch64.
2025-01-03AArch64: Add vector cospi routinesJoe Ramsay14-0/+332
Vector variant of the new C23 cospi. New tests pass on AArch64.
2025-01-03AArch64: Add vector sinpi to libmvecJoe Ramsay14-0/+322
Vector variant of the new C23 sinpi. New tests pass on AArch64.
2025-01-03AArch64: Improve codegen for SVE log1pf usersYat Long Poon5-122/+95
Reduce memory access by using lanewise MLA and reduce number of MOVPRFXs. Move log1pf implementation to inline helper function. Speedup on Neoverse V1 for log1pf (10%), acoshf (-1%), atanhf (2%), asinhf (2%).
2025-01-03AArch64: Improve codegen for SVE logsYat Long Poon4-47/+114
Reduce memory access by using lanewise MLA and moving constants to struct and reduce number of MOVPRFXs. Update maximum ULP error for double log_sve from 1 to 2. Speedup on Neoverse V1 for log (3%), log2 (5%), and log10 (4%).
2025-01-03AArch64: Improve codegen in SVE tansLuna Lamb2-41/+68
Improves memory access. Tan: MOVPRFX 7 -> 2, LD1RD 12 -> 5, move MOV away from return. Tanf: MOV 2 -> 1, MOVPRFX 6 -> 3, LD1RW 5 -> 4, move mov away from return.
2025-01-03AArch64: Improve codegen in AdvSIMD asinhLuna Lamb1-55/+119
Improves memory access and removes spills. Load the polynomial evaluation coefficients into 2 vectors and use lanewise MLAs. Reduces MOVs 6->3 , LDR 11->5, STR/STP 2->0, ADRP 3->2.
2025-01-04Rename have-mtls-descriptor to have-test-mtls-descriptorH.J. Lu2-5/+5
Since have-mtls-descriptor is only used for glibc testing, rename it to have-test-mtls-descriptor. Also enable tst-gnu2-tls2-amx only if $(have-test-mtls-descriptor) == gnu2. Tested with GCC 14 and Clang 19/18/17 on x86-64. Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
2025-01-03math: update powerpc ulpsAndreas K. Hüttel1-25/+25
Linux timberdoodle 6.1.60-gentoo-dist-hardened #1 SMP Fri Dec 1 22:10:49 UTC 2023 ppc64 POWER9 (architected), altivec supported CHRP IBM pSeries (emulated by qemu) GNU/Linux Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
2025-01-03math: update sparc ulpsAndreas K. Hüttel1-15/+95
Linux catbus 6.1.112 #1 SMP Sun Oct 13 10:52:08 PDT 2024 sparc64 sun4v UltraSparc T5 (Niagara5) GNU/Linux Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
2025-01-03math: update s390 ulpsAndreas K. Hüttel1-15/+95
Linux lgentoo4 6.8.9-gentoo #1 SMP Tue May 7 09:52:48 EDT 2024 s390x 8561 IBM GNU/Linux Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
2025-01-03not-cancel.h: Support testing fortify build with ClangH.J. Lu1-5/+5
When Clang is used to test fortify glibc build configured with --enable-fortify-source=N clang issues errors like In file included from tst-rfc3484.c:60: In file included from ./getaddrinfo.c:81: ../sysdeps/unix/sysv/linux/not-cancel.h:36:10: error: reference to overloaded function could not be resolved; did you mean to call it? 36 | __typeof (open64) __open64_nocancel; | ^~~~~~~~ ../include/bits/../../io/bits/fcntl2.h:127:1: note: possible target for call 127 | open64 (__fortify_clang_overload_arg (const char *, ,__path), int __oflag, | ^ ../include/bits/../../io/bits/fcntl2.h:118:1: note: possible target for call 118 | open64 (__fortify_clang_overload_arg (const char *, ,__path), int __oflag) | ^ ../include/bits/../../io/bits/fcntl2.h:114:1: note: possible target for call 114 | open64 (const char *__path, int __oflag, mode_t __mode, ...) | ^ ../io/fcntl.h:219:12: note: possible target for call 219 | extern int open64 (const char *__file, int __oflag, ...) __nonnull ((1)); | ^ because clang fortify support for functions with variable arguments relies on function overload. Update not-cancel.h to avoid __typeof on functions with variable arguments. Co-Authored-By: Adhemerval Zanella <adhemerval.zanella@linaro.org> Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
2025-01-02RISC-V: Regenerate ULPsAurelien Jarno1-1/+158
Generated on a VisionFive 2 board running Linux version 6.12.6 and GCC 14.2.0. Needed due to: - commit bbd578b38df4 ("math: Use expm1f from CORE-MATH") - commit 8ae9e513762b ("math: Use log1pf from CORE-MATH") - commit 0ae0af68d8fa ("Implement C23 cospi") - commit 776938e8b8dc ("Implement C23 sinpi") - commit f9e90e4b4ce7 ("Implement C23 tanpi") - commit 28d102d15c6a ("Implement C23 acospi") - commit f962932206ec ("Implement C23 asinpi") - commit ffe79c446ced ("Implement C23 atanpi") - commit 3374de90386f ("Implement C23 atan2pi") - commit a357d6273f79 ("math: Use atanf from CORE-MATH") - commit 6f9bacf36b20 ("math: Use atan2f from CORE-MATH") - commit e5ca265a9c90 ("new inputs with large errors for [a]cospi, [a]sinpi, [a]tanpi, atan2pi") Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2025-01-02mlock, mlock2, munlock: Use __attr_access_none macroSam James1-1/+1
This fixes build failures using GCC 7.5.0 against glibc headers, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118194#c5. Followup to 013106ae677af9836614ace1a01d25b63fa555a7. Reported-by: vvinayag@arm.com
2025-01-02AArch64: Update libm-test-ulpsWilco Dijkstra1-24/+24
Update ulps for (a)cospi, (a)sinpi, (a)tanpi, atan2pi.
2025-01-02new inputs with large errors for [a]cospi, [a]sinpi, [a]tanpi, atan2piPaul Zimmermann1-33/+33
These inputs were generated with the programs from https://gitlab.inria.fr/zimmerma/math_accuracy, with rounding to nearest: * for univariate binary32 functions by exhaustive search * for other functions with the "threshold" parameter up to 10^6
2025-01-02elf: Remove the remaining uses of GET_ADDR_OFFSETFlorian Weimer9-10/+5
Expand the macro where it is used in static definitions of __tls_get_addr. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-01-02s390: Define TLS_DTV_OFFSET instead of GET_ADDR_OFFSETFlorian Weimer1-3/+3
This will be used in __tls_get_addr to adjust the returned pointer value. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-01-02elf: Introduce generic <dl-tls.h>Florian Weimer13-277/+43
On arc, the definition of TLS_DTV_UNALLOCATED now comes from <dl-dtv.h>. For x86-64 x32, a separate version is needed because unsigned long int is 32 bits on this target. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-01-02powerpc: Update acosf ulpsFlorian Weimer1-0/+2
As seen on powerpc64le-linux-gnu with GCC 11 defaulting to POWER9 instructions.
2025-01-02htl: move pthread_mutexattr_setprioceiling, pthread_mutexattr_getprioceiling ↵gfleury7-8/+31
into libc. Message-ID: <20241231134909.1166440-9-gfleury@disroot.org>
2025-01-02htl: move pthread_mutexattr_{setrobust, setrobust_np}, ↵gfleury7-14/+52
pthread_mutexattr_{getrobust, getrobust_np} into libc. Message-ID: <20241231134909.1166440-8-gfleury@disroot.org>
2025-01-02htl: move pthread_mutexattr_setpshared, pthread_mutexattr_getpshared into libc.gfleury7-8/+35
Message-ID: <20241231134909.1166440-7-gfleury@disroot.org>
2025-01-02htl: move pthread_mutexattr_settype, pthread_mutexattr_gettype into libc.gfleury7-7/+29
Message-ID: <20241231134909.1166440-6-gfleury@disroot.org>
2025-01-02htl: move pthread_mutexattr_setprotocol into libc.Samuel Thibault6-4/+17
Message-ID: <20241231134909.1166440-5-gfleury@disroot.org>
2025-01-02htl: move pthread_mutexattr_getprotocol into libc.gfleury6-4/+16
Message-ID: <20241231134909.1166440-4-gfleury@disroot.org>
2025-01-01htl: move pthread_mutexattr_destroy into libc.gfleury6-5/+5
Message-ID: <20241231134909.1166440-3-gfleury@disroot.org>
2025-01-01htl: move pthread_mutexattr_init into libc.gfleury7-7/+4
Message-ID: <20241231134909.1166440-2-gfleury@disroot.org>
2025-01-01bits/socket.h: Update to recent BSD definitionSamuel Thibault1-8/+4
The old BSD 4.4 definition (not used by Linux) was not 64b-proof: the cmsg_data field is supposed to CMSG_ALIGN'ed (as can be also seen in the CMSG_LEN macro). Suggested-by: Diego Nieto Cid <dnietoc@gmail.com>
2025-01-01Update copyright in generated files by running "make"Paul Eggert9-192/+175
2025-01-01Update copyright dates with scripts/update-copyrightsPaul Eggert7415-7415/+7415
2025-01-01mlock, mlock2, munlock: Tell the compiler we don't dereference the pointerXi Ruoyao1-1/+2
Since https://gcc.gnu.org/r11-959, the compiler emits -Wmaybe-uninitialized if a const pointer to an uninitialized buffer is passed. Tell the compiler we don't dereference the pointer to remove the false alarm. Link: https://gcc.gnu.org/PR118194 Signed-off-by: Xi Ruoyao <xry111@xry111.site> Reviewed-by: Sam James <sam@gentoo.org>
2024-12-31elf: Do not change stack permission on dlopen/dlmopenAdhemerval Zanella7-93/+15
If some shared library loaded with dlopen/dlmopen requires an executable stack, either implicitly because of a missing GNU_STACK ELF header (where the ABI default flags implies in the executable bit) or explicitly because of the executable bit from GNU_STACK; the loader will try to set the both the main thread and all thread stacks (from the pthread cache) as executable. Besides the issue where any __nptl_change_stack_perm failure does not undo the previous executable transition (meaning that if the library fails to load, there can be thread stacks with executable stacks), this behavior was used on a CVE [1] as a vector for RCE. This patch changes that if a shared library requires an executable stack, and the current stack is not executable, dlopen fails. The change is done only for dynamically loaded modules, if the program or any dependency requires an executable stack, the loader will still change the main thread before program execution and any thread created with default stack configuration. [1] https://www.qualys.com/2023/07/19/cve-2023-38408/rce-openssh-forwarded-ssh-agent.txt Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: Florian Weimer <fweimer@redhat.com>
2024-12-30x86-64: Reorder dynamic linker list in ldd script (bug 32508)Florian Weimer1-1/+1
Move the x86-64 loader first, before the i386 and x32 loaders. In most cases, it's the loader the script needs. This avoids an error message if the i386 loader does not work. The effect of this change to the generated ldd script looks like this: -RTLDLIST="/lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2 /libx32/ld-linux-x32.so.2" +RTLDLIST="/lib64/ld-linux-x86-64.so.2 /lib/ld-linux.so.2 /libx32/ld-linux-x32.so.2" Reviewed-by: Sam James <sam@gentoo.org>
2024-12-27nptl: hppa: replace __get_cr27 with __thread_pointerMichael Jeanson2-20/+16
The addition of the new thread_pointer.h header on HPPA resulted in duplicated inline asm to get the current thread pointer from the cr27 register. Include thread_pointer.h in tls.h and replace __get/set_cr27() with __set_/thread_pointer() with the appropriate casts. Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
2024-12-27nptl: Add <thread_pointer.h> for hppaMichael Jeanson1-0/+30
This will be required by the rseq extensible ABI implementation on all Linux architectures exposing the '__rseq_size' and '__rseq_offset' symbols to set the initial value of the 'cpu_id' field which can be used by applications to test if rseq is available and registered. As long as the symbols are exposed it is valid for an application to perform this test even if rseq is not yet implemented in libc for this architecture. Compile tested with build-many-glibcs.py but I don't have access to any hardware to run the tests. Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
2024-12-27elf: Remove the GET_ADDR_ARGS and related macros from the TLS codeFlorian Weimer1-4/+4
This was used to manage an IA-64 ABI divergence is no longere needed after the IA-64 removal. (It should be possible to encode all the required information in one machine word, so the pointer indirection is really unnecessary. Technically, none of this is part of the ABI, so perhaps it's possible to do this retroactively. See bug 27404.) Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2024-12-27hurd: Avoid asm statements which returnSamuel Thibault5-67/+96
They are not supposed to change flow control. This fixes miscompilation with gcc 14.2.0 which then drops code, see https://lists.gnu.org/archive/html/bug-hurd/2024-11/msg00145.html
2024-12-22htl: move pthread_cond_timedwait, pthread_cond_clockwait, pthread_cond_wait ↵gfleury9-19/+22
into libc. Message-ID: <20241219203727.669825-9-gfleury@disroot.org>
2024-12-22htl: move __pthread_mutex_checklocked into libc.gfleury8-2/+8
move out __getpid from pt-mutex.h and in pt-mutex-* include <unistd.h> where __getpid was called Signed-off-by: gfleury <gfleury@disroot.org> Message-ID: <20241219203727.669825-8-gfleury@disroot.org>
2024-12-22htl: move __pthread_timedblock, __pthread_timedblock_intr, __pthread_block, ↵gfleury2-0/+2
__pthread_block_intr into libc. Signed-off-by: gfleury <gfleury@disroot.org> Message-ID: <20241219203727.669825-7-gfleury@disroot.org>
2024-12-22htl: move pthread_cond_signal into libc.gfleury6-6/+8
Signed-off-by: gfleury <gfleury@disroot.org> Message-ID: <20241219203727.669825-6-gfleury@disroot.org>
2024-12-22htl: move pthread_cond_broadcast into libc.gfleury7-9/+11
Signed-off-by: gfleury <gfleury@disroot.org> Message-ID: <20241219203727.669825-5-gfleury@disroot.org>
2024-12-22htl: move pthread_cond_destroy into libc.gfleury7-6/+9
Signed-off-by: gfleury <gfleury@disroot.org> Message-ID: <20241219203727.669825-4-gfleury@disroot.org>
2024-12-22htl: move __pthread_wakeup into libc.gfleury1-0/+1
Signed-off-by: gfleury <gfleury@disroot.org> Message-ID: <20241219203727.669825-3-gfleury@disroot.org>
2024-12-22htl: move pthread_cond_init into libc.gfleury7-9/+9
Signed-off-by: gfleury <gfleury@disroot.org> Message-ID: <20241219203727.669825-2-gfleury@disroot.org>