about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* malloc: add multi-threaded tests for aligned_alloc/calloc/mallocMiguel Martín2024-07-223-0/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve aligned_alloc/calloc/malloc test coverage by adding multi-threaded tests with random memory allocations and with/without cross-thread memory deallocations. Perform a number of memory allocation calls with random sizes limited to 0xffff. Use the existing DSO ('malloc/tst-aligned_alloc-lib.c') to randomize allocator selection. The multi-threaded allocation/deallocation is staged as described below: - Stage 1: Half of the threads will be allocating memory and the other half will be waiting for them to finish the allocation. - Stage 2: Half of the threads will be allocating memory and the other half will be deallocating memory. - Stage 3: Half of the threads will be deallocating memory and the second half waiting on them to finish. Add 'malloc/tst-aligned-alloc-random-thread.c' where each thread will deallocate only the memory that was previously allocated by itself. Add 'malloc/tst-aligned-alloc-random-thread-cross.c' where each thread will deallocate memory that was previously allocated by another thread. The intention is to be able to utilize existing malloc testing to ensure that similar allocation APIs are also exposed to the same rigors. Reviewed-by: Arjun Shankar <arjun@redhat.com>
* malloc: avoid global locks in tst-aligned_alloc-lib.cMiguel Martín2024-07-221-19/+20
| | | | | | Make sure the DSO used by aligned_alloc/calloc/malloc tests does not get a global lock on multithreaded tests. Reviewed-by: Arjun Shankar <arjun@redhat.com>
* This patch adds larger ulp errors for the log2p1 function.Paul Zimmermann2024-07-223-5/+350
| | | | | | | | Changes in v2: - added larger error for long double on AMD reported by Adhemerval (https://sourceware.org/pipermail/libc-alpha/2024-June/157755.html) Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* NEWS: Add new sectionAndreas K. Hüttel2024-07-211-0/+27
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* Increase version number to 2.40.9000 glibc-2.40.9000Andreas K. Hüttel2024-07-211-2/+2
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* Add ChangeLog file glibc-2.40Andreas K. Hüttel2024-07-211-0/+10379
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* Increase version number to 2.40Andreas K. Hüttel2024-07-212-3/+3
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* po/*: regenerate (only line number changes)Andreas K. Hüttel2024-07-2138-1797/+1797
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* contrib.texi: Fix format of MIPS and RISC-VAndreas K. Hüttel2024-07-211-3/+3
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* libc.pot: regenerate (only line number changes)Andreas K. Hüttel2024-07-211-57/+57
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* install.texi: bump "latest verified" versionsAndreas K. Hüttel2024-07-212-18/+18
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* NEWS: drop 2.40 section "Changes to build and runtime requirements"Andreas K. Hüttel2024-07-201-4/+0
| | | | | | Can't find anything that should go here. Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* contrib.texi: updateAndreas K. Hüttel2024-07-201-5/+29
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* NEWS: add fixed security advisories listAndreas K. Hüttel2024-07-201-2/+17
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* NEWS: add resolved bugs listAndreas K. Hüttel2024-07-201-2/+135
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* NEWS: add more major improvements for 2.40Andreas K. Hüttel2024-07-201-3/+13
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* linux: Trivial test output fix in tst-pkeyAndreas K. Hüttel2024-07-191-1/+1
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* elf: Fix localplt.awk for DT_RELR-enabled builds (BZ 31978)Adhemerval Zanella2024-07-191-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | For each input readelf output, localplt.awk parses each 'Relocation section' entry, checks its offset against the dynamic section entry, and saves each DT_JMPREL, DT_RELA, and DT_REL offset value it finds. After all lines are read, the script checks if any segment offset differed from 0, meaning at least one 'Relocation section' was matched. However, if the shared object was built with RELR support and the static linker could place all the relocation on DT_RELR, there would be no DT_JMPREL, DT_RELA, and DT_REL entries; only a DT_RELR. For the current three ABIs that support (aarch64, x86, and powerpc64), the powerpc64 ld.so shows the behavior above. Both x86_64 and aarch64 show extra relocations on '.rela.dyn', which makes the script check to succeed. This patch fixes by handling DT_RELR, where the offset is checked against the dynamic section entries and if the shared object contains an entry it means that there are no extra PLT entries (since all relocations are relative). It fixes the elf/check-localplt failure on powerpc. Checked with a build/check for aarch64-linux-gnu, x86_64-linux-gnu, i686-linux-gnu, arm-linux-gnueabihf, s390x-linux-gnu, powerpc-linux-gnu, powerpc64-linux-gnu, and powerpc64le-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* linux: Also check pkey_get for ENOSYS on tst-pkey (BZ 31996)Adhemerval Zanella2024-07-191-1/+7
| | | | | | | | | | | The powerpc pkey_get/pkey_set support was only added for 64-bit [1], and tst-pkey only checks if the support was present with pkey_alloc (which does not fail on powerpc32, at least running a 64-bit kernel). Checked on powerpc-linux-gnu. [1] https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a803367bab167f5ec4fde1f0d0ec447707c29520 Reviewed-By: Andreas K. Huettel <dilfridge@gentoo.org>
* powerpc: Update soft-fp ulpsAdhemerval Zanella2024-07-191-0/+103
| | | | Results based on regen-ulps using gcc 11.2.1 on a POWER8 machine.
* Fix usage of _STACK_GROWS_DOWN and _STACK_GROWS_UP defines [BZ 31989]John David Anglin2024-07-193-4/+4
| | | | | Signed-off-by: John David Anglin <dave.anglin@bell.net> Reviewed-By: Andreas K. Hüttel <dilfridge@gentoo.org>
* Adjust check-local-headers test for libaudit 4.0Florian Weimer2024-07-191-1/+1
| | | | | The new version introduces /usr/include/audit_logging.h and /usr/include/audit-records.h.
* elf: Parse the auxv values as unsigned on tst-tunables-enable_secure-env.c ↵Adhemerval Zanella2024-07-191-1/+1
| | | | | | | | | (BZ 31890) AT_HWCAP on some architecture can indeed use all bits. Checked on x86_64-linux-gnu and powerpc-linux-gnu. Reviewed-By: Andreas K. Hüttel <dilfridge@gentoo.org>
* x32: xfail elf/tst-platform-1 [BZ #22363]H.J. Lu2024-07-191-0/+6
| | | | | | | | Xfail elf/tst-platform-1 on x32 since kernel passes i686 in AT_PLATFORM. See https://sourceware.org/bugzilla/show_bug.cgi?id=22363 Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
* elf/tst-rtld-does-not-exist: Pass --inhibit-cache to rtldXi Ruoyao2024-07-191-1/+3
| | | | | | | | | This avoids a test failure when the system has no /etc/ld.so.cache. Tested on x86_64-linux-gnu. Signed-off-by: Xi Ruoyao <xry111@xry111.site> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Revert "LoongArch: Add cfi instructions for _dl_tlsdesc_dynamic"Andreas K. Hüttel2024-07-175-258/+373
| | | | | | | | We're in freeze for the 2.40 release. This reverts commit 43224b1379d60b1ad98d29ef3d7905d55f828a9f. Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* htl: Fix __pthread_init_thread declaration and definitionSamuel Thibault2024-07-172-2/+3
| | | | | | 0e75c4a4634f ("hurd: Fix pthread_self() without libpthread") added a declaration for ___pthread_init_thread instead of __pthread_init_thread, and missed defining the external hidden symbol.
* hurd: Fix pthread_self() without libpthreadSamuel Thibault2024-07-174-11/+13
| | | | | | | | | | | | | 5476f8cd2e68 ("htl: move pthread_self info libc.") moved the htl pthread_self() function from libpthread to libc, replacing the previous libc stub that just returns 0. And 53da64d1cf36 ("htl: Initialize ___pthread_self early") added initialization code which is needed before being able to call pthread_self. It is currently in libpthread, and thus never called before programs can call pthread_self from libc, which then segfaults when accessing _pthread_self()->thread. This moves the initialization to libc itself, as initialized variables, so pthread_self can always be called fine.
* LoongArch: Add cfi instructions for _dl_tlsdesc_dynamicmengqinggang2024-07-175-373/+258
| | | | | | | | | | | | | | In _dl_tlsdesc_dynamic, there are three 'addi.d sp, sp, -size' instructions to allocate stack size for Float/LSX/LASX registers. Every 'addi.d sp, sp, -size' needs a cfi_adjust_cfa_offset because of sp is used to compute CFA. But only one 'addi.d sp, sp, -size' will be run according to HWCAP value. And all cfi_adjust_cfa_offset will be executed in stack unwinding, it result in incorrect CFA. Change _dl_tlsdesc_dynamic to _dl_tlsdesc_dynamic, _dl_tlsdesc_dynamic_lsx and _dl_tlsdesc_dynamic_lasx. Conflicting cfi instructions can be distributed to the three functions. And cfi instructions can correspond to stack down instructions.
* x86: Disable non-temporal memset on Skylake ServerNoah Goldstein2024-07-165-12/+26
| | | | | | | | | | | | | | | | | The original commit enabling non-temporal memset on Skylake Server had erroneous benchmarks (actually done on ICX). Further benchmarks indicate non-temporal stores may in fact by a regression on Skylake Server. This commit may be over-cautious in some cases, but should avoid any regressions for 2.40. Tested using qemu on all x86_64 cpu arch supported by both qemu + GLIBC. Reviewed-by: DJ Delorie <dj@redhat.com> Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* Add pthread_getname_np and pthread_setname_np for HurdFlavio Cruz2024-07-1610-13/+239
| | | | | | | | | | | We use thread_get_name and thread_set_name to get and set the thread name, so nothing is stored in the thread structure since these functions are supposed to be called sparingly. One notable difference with Linux is that the thread name is up to 32 chars, whereas Linux's is 16. Also added a mach_RPC_CHECK to check for the existing of gnumach RPCs.
* math: Update alpha ulpsAndreas K. Hüttel2024-07-141-0/+48
| | | | | | | | Linux alphadev 6.9.8-gentoo-alpha #1 Sun Jul 7 00:45:49 EDT 2024 alpha EV68CB Titan GNU/Linux gcc (Gentoo 14.1.1_p20240622 p2) 14.1.1 20240622 GNU ld (Gentoo 2.42 p6) 2.42.0 Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* hurd: Fix restoring message to be retriedSamuel Thibault2024-07-131-1/+4
| | | | | | | | | save_data stores the start of the original message to be retried, overwritten by the EINTR reply. In 64b builds the overwrite is however rounded up to the 64b pointer size, so we have to save more than just the 32b err. Thanks a lot to Luca Dariz for the investigation!
* nptl: Convert tst-sem11 and tst-sem12 tests to use the test driverMaciej W. Rozycki2024-07-122-4/+6
| | | | | | | | | | | Fix an issue with commit 2af4e3e5668f ("Test of semaphores.") by making the tst-sem11 and tst-sem12 tests use the test driver, preventing them from ever causing testing to hang forever and never complete, such as currently happening with the 'mips-linux-gnu' (o32 ABI) target. Adjust the name of the PREPARE macro, which clashes with the interpretation of its presence by the test driver, by using a TF_ prefix in reference to the name of the 'tf' function. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Add copyright notice tst-sem11 and tst-sem12 testsMaciej W. Rozycki2024-07-122-0/+36
| | | | | | | Add a copyright notice to the tst-sem11 and tst-sem12 tests, observing that they have been originally contributed back in 2007, with commit 2af4e3e5668f ("Test of semaphores."). Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* tests: XFAIL audit tests failing on all mips configurations, bug 29404Andreas K. Hüttel2024-07-121-0/+9
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* time/Makefile: Split and sort testsSamuel Dobron2024-07-121-10/+43
| | | | Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* s390x: Fix segfault in wcsncmp [BZ #31934]Stefan Liebler2024-07-111-9/+1
| | | | | | | | | | | | | | | | | | | The z13/vector-optimized wcsncmp implementation segfaults if n=1 and there is only one character (equal on both strings) before the page end. Then it loads and compares one character and misses to check n again. The following load fails. This patch removes the extra load and compare of the first character and just start with the loop which uses vector-load-to-block-boundary. This code-path also checks n. With this patch both tests are passing: - the simplified one mentioned in the bugzilla 31934 - the full one in Florian Weimer's patch: "manual: Document a GNU extension for strncmp/wcsncmp" (https://patchwork.sourceware.org/project/glibc/patch/874j9eml6y.fsf@oldenburg.str.redhat.com/): On s390x-linux-gnu (z16), the new wcsncmp test fails due to bug 31934. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Linux: Make __rseq_size useful for feature detection (bug 31965)Florian Weimer2024-07-095-12/+40
| | | | | | | | | | | The __rseq_size value is now the active area of struct rseq (so 20 initially), not the full struct size including padding at the end (32 initially). Update misc/tst-rseq to print some additional diagnostics. Reviewed-by: Michael Jeanson <mjeanson@efficios.com> Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
* po: incorporate translations (bg)Andreas K. Hüttel2024-07-091-3/+144
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* manual: add syscallsDJ Delorie2024-07-099-41/+127
| | | | | | | | | | | | | | The purpose of this patch is to add some system calls that (1) aren't otherwise documented, and (2) are merely redirected to the kernel, so can refer to their documentation; and define a standard way of doing so in the future. A more detailed explaination of how system calls are wrapped is added along with reference to the Linux Man-Pages project. Default version of man-pages is in configure.ac but can be overridden by --with-man-pages=X.Y Reviewed-by: Alejandro Colomar <alx@kernel.org>
* libio: handle opening a file when all files are closed (bug 31963)Andreas Schwab2024-07-093-1/+37
| | | | | _IO_list_all becomes NULL when all files (including standard files) are closed.
* ldconfig: Ignore all GDB extension filesAdam Sampson2024-07-081-4/+6
| | | | | | | | | | | | ldconfig already ignores files with the -gdb.py suffix, but GDB also looks for -gdb.gdb and -gdb.scm files. These aren't as widely used, but libguile at least comes with a -gdb.scm file. Rename is_gdb_python_file to is_gdb_extension_file, and make it recognise all three types of GDB extension. Signed-off-by: Adam Sampson <ats@offog.org> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* ldconfig: Move endswithn into a new header fileAdam Sampson2024-07-083-12/+36
| | | | | | | | is_gdb_python_file is doing a similar test, so it can use this helper function as well. Signed-off-by: Adam Sampson <ats@offog.org> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* math: Update m68k ULPsAndreas K. Hüttel2024-07-081-90/+361
| | | | | | | | | | | | | | | | This hasn't been looked at for a loong time (already guessing from the number of missing entries), and it ain't pretty. There are some 9-ulps results for float. - ZaZaZebra (qemu-system-m68k clone of PowerBook 190 system) - GCC 13.3.1 20240614 (Gentoo 13.3.1_p20240614 p17) - ld GNU ld (Gentoo 2.42 p6) 2.42.0 - Linux ZaZaZebra 4.19.0-5-m68k #1 Gentoo 4.19.37-5 (2019-06-19) m68k 68040 68040 GNU/Linux - manual build - ../glibc/configure --enable-fortify-source --prefix=/usr - Tested by Immolo (via Andreas K. Hüttel) Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* stdlib: fix arc4random fallback to /dev/urandom (BZ 31612)Adhemerval Zanella2024-07-081-1/+1
| | | | | | | | | | | | | | The __getrandom_nocancel used by __arc4random_buf uses INLINE_SYSCALL_CALL (which returns -1/errno) and the loop checks for the return value instead of errno to fallback to /dev/urandom. The malloc code now uses __getrandom_nocancel_nostatus, which uses INTERNAL_SYSCALL_CALL, so there is no need to use the variant that does not set errno (BZ#29624). Checked on x86_64-linux-gnu. Reviewed-by: Xi Ruoyao <xry111@xry111.site>
* elf: Make dl-rseq-symbols Linux onlyAdhemerval Zanella2024-07-043-1/+4
| | | | | | And avoid a Hurd build failures. Checked on x86_64-linux-gnu.
* nptl: fix potential merge of __rseq_* relro symbolsMichael Jeanson2024-07-033-8/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | While working on a patch to add support for the extensible rseq ABI, we came across an issue where a new 'const' variable would be merged with the existing '__rseq_size' variable. We tracked this to the use of '-fmerge-all-constants' which allows the compiler to merge identical constant variables. This means that all 'const' variables in a compile unit that are of the same size and are initialized to the same value can be merged. In this specific case, on 32 bit systems 'unsigned int' and 'ptrdiff_t' are both 4 bytes and initialized to 0 which should trigger the merge. However for reasons we haven't delved into when the attribute 'section (".data.rel.ro")' is added to the mix, only variables of the same exact types are merged. As far as we know this behavior is not specified anywhere and could change with a new compiler version, hence this patch. Move the definitions of these variables into an assembler file and add hidden writable aliases for internal use. This has the added bonus of removing the asm workaround to set the values on rseq registration. Tested on Debian 12 with GCC 12.2. Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Reviewed-by: Florian Weimer <fweimer@redhat.com>
* riscv: Update nofpu libm test ulpsDarius Rad2024-07-031-0/+20
| | | | Fixes 32 test failures.
* manual: Recommendations for dynamic linker hardeningFlorian Weimer2024-07-031-0/+558
| | | | | | | | | This new section in the manual provides recommendations for use of glibc in environments with higher integrity requirements. It's reflecting both current implementation shortcomings, and challenges we inherit from ELF and psABI requirements. Reviewed-by: Jonathan Wakely <jwakely@redhat.com>