about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
...
* x86: Fix Zen3/Zen4 ERMS selection (BZ 30994)Adhemerval Zanella2024-02-131-20/+18
| | | | | | | | | | | | | | | | The REP MOVSB usage on memcpy/memmove does not show much performance improvement on Zen3/Zen4 cores compared to the vectorized loops. Also, as from BZ 30994, if the source is aligned and the destination is not the performance can be 20x slower. The performance difference is noticeable with small buffer sizes, closer to the lower bounds limits when memcpy/memmove starts to use ERMS. The performance of REP MOVSB is similar to vectorized instruction on the size limit (the L2 cache). Also, there is no drawback to multiple cores sharing the cache. Checked on x86_64-linux-gnu on Zen3. Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* x86/cet: fix shadow stack test scriptsMichael Jeanson2024-02-123-3/+3
| | | | | | | | | | | | | Some shadow stack test scripts use the '==' operator with the 'test' command to validate exit codes resulting in the following error: sysdeps/x86_64/tst-shstk-legacy-1e.sh: 31: test: 139: unexpected operator The '==' operator is invalid for the 'test' command, use '-eq' like the previous call to 'test'. Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* test_printers_common.py: Remove invalid escape sequenceH.J. Lu2024-02-121-1/+1
| | | | | | | | Change "\(" and "\)" to "\\(" and "\\)" in test_printers_common.py. This fixes the test warning: .../scripts/test_printers_common.py:101: SyntaxWarning: invalid escape sequence '\(' Reviewed-by: Florian Weimer <fweimer@redhat.com>
* elf: Remove attempt at env handling in elf/tst-rtld-list-diagnostics.pyFlorian Weimer2024-02-091-3/+2
| | | | | Instead, let the system shell parse the whole thing and invoke the env command.
* Add SOL_VSOCK from Linux 6.7 to bits/socket.hJoseph Myers2024-02-081-0/+1
| | | | | | | | | Linux 6.7 adds a constant SOL_VSOCK (recall that various constants in include/linux/socket.h are in fact part of the kernel-userspace API despite that not being a uapi header). Add it to glibc's bits/socket.h. Tested for x86_64.
* localedata: ssy_ER: Fix syntax errorMike FABIAN2024-02-081-1/+1
|
* localedata: hr_HR: change currency to EUR/€Dragan Stanojević (Nevidljivi)2024-02-082-8/+8
| | | | Resolves: BZ # 29845
* Change lv_LV collation to agree with the recent change in CLDRMike FABIAN2024-02-082-36/+122
| | | | | | | Resolves: https://sourceware.org/bugzilla/show_bug.cgi?id=23774 See this change in CLDR committed on 2024-01-29: https://github.com/unicode-org/cldr/commit/635e2d3d0566563e12c8ea58c219d35183fcec12
* Add new AArch64 HWCAP2 definitions from Linux 6.7 to bits/hwcap.hJoseph Myers2024-02-081-0/+3
| | | | | Linux 6.7 adds three new HWCAP2_* values for AArch64; add them to bits/hwcap.h in glibc.
* string: Add hidden builtin definition for __strcpy_chk.Stefan Liebler2024-02-062-0/+2
| | | | | | | | | | | | Otherwise on at least x86_64 and s390x there is an unwanted PLT entry in libc.so when configured with --enable-fortify-source=3 and build with -Os. This is observed in elf/check-localplt Extra PLT reference: libc.so: __strcpy_chk The call to PLT entry is in inet/ruserpass.c. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* arm: Remove wrong ldr from _dl_start_user (BZ 31339)Adhemerval Zanella2024-02-051-1/+0
| | | | | | | | | | | | | | | | | | The commit 49d877a80b29d3002887b084eec6676d9f5fec18 (arm: Remove _dl_skip_args usage) removed the _SKIP_ARGS literal, which was previously loader to r4 on loader _start. However, the cleanup did not remove the following 'ldr r4, [sl, r4]' on _dl_start_user, used to check to skip the arguments after ld self-relocations. In my testing, the kernel initially set r4 to 0, which makes the ldr instruction just read the _GLOBAL_OFFSET_TABLE_. However, since r4 is a callee-saved register; a different runtime might not zero initialize it and thus trigger an invalid memory access. Checked on arm-linux-gnu. Reported-by: Adrian Ratiu <adrian.ratiu@collabora.com> Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
* LoongArch: Use builtins for ffs and ffsllXi Ruoyao2024-02-051-0/+2
| | | | | | | | | | | | On LoongArch GCC compiles __builtin_ffs{,ll} to basically `(x ? __builtin_ctz (x) : -1) + 1`. Since a hardware ctz instruction is available, this is much better than the table-driven generic implementation. Tested on loongarch64. Signed-off-by: Xi Ruoyao <xry111@xry111.site> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Remove sysdeps/ia64/math-use-builtins-ffs.hXi Ruoyao2024-02-051-2/+0
| | | | | | IA64 is gone. Signed-off-by: Xi Ruoyao <xry111@xry111.site>
* Fix stringop-overflow warning in tst-strlcat2.Stefan Liebler2024-02-051-0/+1
| | | | | | | | | | | | | | | | On s390x, I get warnings like this when do_one_test is inlined with SIZE_MAX: In function ‘do_one_test’, inlined from ‘do_overflow_tests’ at tst-strlcat2.c:184:2: tst-strlcat2.c:49:18: error: ‘strnlen’ specified bound [18446744073709550866, 18446744073709551615] exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=] 49 | # define STRNLEN strnlen | ^ tst-strlcat2.c:89:23: note: in expansion of macro ‘STRNLEN’ 89 | size_t dst_length = STRNLEN (dst, n); | ^~~~~~~ This patch just marks the do_one_test function as noinline as also done in test-strncat.c: Fix stringop-overflow warning in test-strncat. https://sourceware.org/git/?p=glibc.git;a=commit;h=51aeab9a363a0d000d0912aa3d6490463a26fba2
* mips: FIx clone3 implementation (BZ 31325)Adhemerval Zanella2024-02-021-5/+27
| | | | | | | | | | | | | For o32 we need to setup a minimal stack frame to allow cprestore on __thread_start_clone3 (which instruct the linker to save the gp for PIC). Also, there is no guarantee by kABI that $8 will be preserved after syscall execution, so we need to save it on the provided stack. Checked on mipsel-linux-gnu. Reported-by: Khem Raj <raj.khem@gmail.com> Tested-by: Khem Raj <raj.khem@gmail.com>
* stdlib: fix qsort example in manualPaul Eggert2024-02-011-9/+12
| | | | | | | | * manual/search.texi (Comparison Functions, Array Sort Function): Sort an array of long ints, not doubles, to avoid hassles with NaNs. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* soft-fp: Add brain format supportJakub Jelinek2024-02-0112-0/+738
| | | | | | | | In https://gcc.gnu.org/r13-3292 I've added brain format support (std::bfloat16_t) on the GCC side, but as glibc has the master copy of soft-fp, the following patch adds the files from that commit and from https://gcc.gnu.org/r13-6598 and https://gcc.gnu.org/r13-6622 The files are not used by glibc right now.
* Rename c2x / gnu2x tests to c23 / gnu23Joseph Myers2024-02-0124-38/+38
| | | | | | | Complete the internal renaming from "C2X" and related names in GCC by renaming *-c2x and *-gnu2x tests to *-c23 and *-gnu23. Tested for x86_64, and with build-many-glibcs.py for powerpc64le.
* manual: Fix up stdbit.texiJakub Jelinek2024-02-011-1/+1
| | | | | | My recent change broke make pdf and in other documentation formats results in weird rendering and invalid URL, all because of a forgotten comma to separate @uref arguments.
* string: Use builtins for ffs and ffsllAdhemerval Zanella Netto2024-02-0128-651/+48
| | | | | | | It allows to remove a lot of arch-specific implementations. Checked on x86_64, aarch64, powerpc64. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* misc: tst-poll: Proper synchronize with child before sending the signalAdhemerval Zanella2024-02-011-3/+3
| | | | | | | | | | When running the testsuite in parallel, for instance running make -j $(nproc) check, occasionally tst-epoll fails with a timeout. It happens because it sometimes takes a bit more than 10ms for the process to get cloned and blocked by the syscall. In that case the signal is sent to early, and the test fails with a timeout. Checked on x86_64-linux-gnu.
* math: Remove bogus math implementationsAdhemerval Zanella2024-02-015-164/+0
| | | | | | The exp10, exp10l, fma, fmaf, and fmal default implementation do not implement the appropriate semantics nor with an reasonable accuracy. They are also not used by any supported port.
* Refer to C23 in place of C2X in glibcJoseph Myers2024-02-0179-278/+300
| | | | | | | | | | | | | | | WG14 decided to use the name C23 as the informal name of the next revision of the C standard (notwithstanding the publication date in 2024). Update references to C2X in glibc to use the C23 name. This is intended to update everything *except* where it involves renaming files (the changes involving renaming tests are intended to be done separately). In the case of the _ISOC2X_SOURCE feature test macro - the only user-visible interface involved - support for that macro is kept for backwards compatibility, while adding _ISOC23_SOURCE. Tested for x86_64.
* elf: Remove _dl_sysdep_open_object hook functionFlorian Weimer2024-02-012-60/+0
| | | | It is currently not used by any target.
* build-many-glibcs: relax version check to allow non-digit charactersFangrui Song2024-01-311-9/+7
| | | | | | | | | | | | | A version string may contain non-digit characters, commonly found in built-from-VCS tools, e.g. ``` git version 2.39.GIT git version 2.43.0.493.gbc7ee2e5e1 ``` `int()` will raise a ValueError, leading to a spurious 'missing'. Reviewed-by: DJ Delorie <dj@redhat.com>
* Use gcc __builtin_stdc_* builtins in stdbit.h if possibleJakub Jelinek2024-01-315-16/+860
| | | | | | | | | | | | | | | | | The following patch uses the GCC 14 __builtin_stdc_* builtins in stdbit.h for the type-generic macros, so that when compiled with GCC 14 or later, it supports not just 8/16/32/64-bit unsigned integers, but also 128-bit (if target supports them) and unsigned _BitInt (any supported precision). And so that the macros don't expand arguments multiple times and can be evaluated in constant expressions. The new testcase is gcc's gcc/testsuite/gcc.dg/builtin-stdc-bit-1.c adjusted to test stdbit.h and the type-generic macros in there instead of the builtins and adjusted to use glibc test framework rather than gcc style tests with __builtin_abort (). Signed-off-by: Jakub Jelinek <jakub@redhat.com> Reviewed-by: Joseph Myers <josmyers@redhat.com>
* Open master branch for glibc 2.40 development glibc-2.39.9000Andreas K. Hüttel2024-01-312-2/+29
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* Create ChangeLog.old/ChangeLog.28 glibc-2.39Andreas K. Hüttel2024-01-311-0/+8505
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* version.h, include/features.h: Bump version to 2.39Andreas K. Hüttel2024-01-312-3/+3
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* po: Update translationsAndreas K. Hüttel2024-01-3138-845/+694
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* libc.pot: regenerateAndreas K. Hüttel2024-01-311-31/+26
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* INSTALL, install.texi: minor updates, regenerateAndreas K. Hüttel2024-01-312-6/+6
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* contrib.texi: updateAndreas K. Hüttel2024-01-301-8/+24
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* NEWS: insert advisories and fixed bugs for 2.39Andreas K. Hüttel2024-01-301-4/+133
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* S390: Fix building with --disable-mutli-arch [BZ #31196]Stefan Liebler2024-01-302-2/+6
| | | | | | | | | | | | | | | | | | | | | | Starting with commits - 7ea510127e2067efa07865158ac92c330c379950 string: Add libc_hidden_proto for strchrnul - 22999b2f0fb62eed1af4095d062bd1272d6afeb1 string: Add libc_hidden_proto for memrchr building glibc on s390x with --disable-multi-arch fails if only the C-variant of strchrnul / memrchr is used. This is the case if gcc uses -march < z13. The build fails with: ../sysdeps/s390/strchrnul-c.c:28:49: error: ‘__strchrnul_c’ undeclared here (not in a function); did you mean ‘__strchrnul’? 28 | __hidden_ver1 (__strchrnul_c, __GI___strchrnul, __strchrnul_c); With --disable-multi-arch, __strchrnul_c is not available as string/strchrnul.c is just included without defining STRCHRNUL and thus we also don't have to create the internal hidden symbol. Tested-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* Fix typoAndreas K. Hüttel2024-01-301-1/+1
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* manual/io: Fix swapped reading and writing phrase.Joe Simmons-Talbott2024-01-301-1/+1
| | | | Reviewed-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* Update advisory format and introduce some automationSiddhesh Poyarekar2024-01-308-67/+182
| | | | | | | | | | | | | | | | | | | | | | | | Simplify the advisory format by dropping the -Backport tags and instead stick to using just the -Commit tags. To identify backports, put a substring of git-describe into the release version in the brackets next to the commit ref. This way, it not only identifies that the fix (or regression) is on the release/2.YY/master branch, it also disambiguates regressions/fixes in the branch from those in the tarball. Add a README to make it easier for consumers to understand the format. Additionally, the Release wiki needs to be updated to inform the release manager to: 1. Generate a NEWS snipped from the advisories directory AND 2. on release/2.YY/master, replace the advisories directory with a text file pointing to the advisories directory in master so that we don't have to update multiple locations. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Reviewed-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* Document CVE-2023-6246, CVE-2023-6779, and CVE-2023-6780Arjun Shankar2024-01-303-0/+43
| | | | This commit adds "advisories" entries for the above three CVEs.
* syslog: Fix integer overflow in __vsyslog_internal (CVE-2023-6780)Arjun Shankar2024-01-301-1/+2
| | | | | | | | | __vsyslog_internal calculated a buffer size by adding two integers, but did not first check if the addition would overflow. This commit fixes that. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* syslog: Fix heap buffer overflow in __vsyslog_internal (CVE-2023-6779)Arjun Shankar2024-01-301-11/+28
| | | | | | | | | | | | __vsyslog_internal used the return value of snprintf/vsnprintf to calculate buffer sizes for memory allocation. If these functions (for any reason) failed and returned -1, the resulting buffer would be too small to hold output. This commit fixes that. All snprintf/vsnprintf calls are checked for negative return values and the function silently returns upon encountering them. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* syslog: Fix heap buffer overflow in __vsyslog_internal (CVE-2023-6246)Arjun Shankar2024-01-304-15/+82
| | | | | | | | | | | | __vsyslog_internal did not handle a case where printing a SYSLOG_HEADER containing a long program name failed to update the required buffer size, leading to the allocation and overflow of a too-small buffer on the heap. This commit fixes that. It also adds a new regression test that uses glibc.malloc.check. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* Use binutils 2.42 branch in build-many-glibcs.pyJoseph Myers2024-01-301-1/+1
| | | | | | | This patch makes build-many-glibcs.py use binutils 2.42 branch. Tested with build-many-glibcs.py (host-libraries, compilers and glibcs builds).
* elf: correct relocation statistics for !ELF_MACHINE_START_ADDRESSAndreas Schwab2024-01-291-4/+3
| | | | Fixes: 6628c742b2 ("elf: Remove prelink support")
* Relicense IBM portions of resolv/base64.c resolv/res_debug.c.Carlos O'Donell2024-01-263-38/+55
| | | | | | | | | | | | | This change relicenses the IBM portions of resolv/base64.c and resolv/res_debug.c to a new license that does not have use-limited patent language. The top-level LICENSE file is updated with the license. The relicensing was approved by IBM. Signed-off-by: Brad Topol, IBM Director of Open Technologies <btopol@us.ibm.com> Signed-off-by: Richard Fontana <rfontana@redhat.com> Signed-off-by: Carlos O'Donell <carlos@redhat.com>
* localedata: Use consistent values for grouping and mon_groupingMike FABIAN2024-01-25133-233/+292
| | | | | | Resolves: BZ # 31205 Adapt test cases in test-grouping_iterator.c
* manual: fix order of arguments of memalign and aligned_alloc (Bug 27547)Dennis Brendel2024-01-241-2/+2
| | | | | | | On the summary page the order of the function arguments was reversed, but it is in correct order in the other places of the manual. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* manual, NEWS: Document malloc side effect of dynamic TLS changesFlorian Weimer2024-01-242-0/+14
| | | | | | | | The increased malloc subsystem usage is a side effect of commit d2123d68275acc0f061e73d5f86ca504e0d5a344 ("elf: Fix slow tls access after dlopen [BZ #19924]"). Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
* NEWS: Update temporary files ignored by ldconfigFlorian Weimer2024-01-241-2/+2
| | | | | | | | | | Fixes commit 2aa0974d2573441bffd596b07bff8698b1f2f18c ("elf: ldconfig should skip temporary files created by package managers") and commit cfb5a97a93ea656e3b2263e42142a4032986d9ba ("ldconfig: Fixes for skipping temporary files."). Reported-by: Guillem Jover <guillem@debian.org> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* po: Incorporate translations (sr)Andreas K. Hüttel2024-01-231-4/+45
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>