about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* string: Sort headers, routines, tests and tests-translationH.J. Lu2022-02-051-44/+166
| | | | | Sort headers, routines, tests and tests-translation. Put one entry per line.
* x86: Improve L to support L(XXX_SYMBOL (YYY, ZZZ))H.J. Lu2022-02-051-1/+2
|
* Benchtests: move 'alloc_bufs' from loop in bench-memset.cNoah Goldstein2022-02-051-2/+2
| | | | | | One buf allocation is sufficient. Calling `alloc_bufs' in the loop just adds unnecessary syscall overhead. Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* x86-64: Fix strcmp-evex.SH.J. Lu2022-02-041-1/+1
| | | | | | | | | | Change "movl %edx, %rdx" to "movl %edx, %edx" in: commit 8418eb3ff4b781d31c4ed5dc6c0bd7356bc45db9 Author: Noah Goldstein <goldstein.w.n@gmail.com> Date: Mon Jan 10 15:35:39 2022 -0600 x86: Optimize strcmp-evex.S
* x86-64: Fix strcmp-avx2.SH.J. Lu2022-02-041-1/+1
| | | | | | | | | | Change "movl %edx, %rdx" to "movl %edx, %edx" in: commit b77b06e0e296f1a2276c27a67e1d44f2cfa38d45 Author: Noah Goldstein <goldstein.w.n@gmail.com> Date: Mon Jan 10 15:35:38 2022 -0600 x86: Optimize strcmp-avx2.S
* x86-64: Add vector acos/acosf to libmvec microbenchmarkSunil K Pandey2022-02-033-0/+8201
| | | | | | | | | | | | | | | | | | | | Add vector acos/acosf and input files to libmvec microbenchmark. libmvec-acos-inputs: 90% Normal random distribution range: (-1.0, 1.0) mean: 0.0 sigma: 1.0 10% uniform random distribution in range (-1.0, 1.0) libmvec-acosf-inputs: 90% Normal random distribution range: (-1.0f, 1.0f) mean: 0.0f sigma: 1.0f 10% uniform random distribution in range (-1.0f, 1.0f) Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
* benchtests: Add more coverage for strcmp and strncmp benchmarksNoah Goldstein2022-02-032-69/+183
| | | | | | | | | | | Add more small and medium sized tests for strcmp and strncmp. As well for strcmp add option for more direct control of alignment. Previously alignment was being pushed to the end of the page. While this is the most difficult case to implement, it is far from the common case and so shouldn't be the only benchmark. Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
* x86: Optimize strcmp-evex.SNoah Goldstein2022-02-031-793/+919
| | | | | | | | | | | | | | | | | | Optimization are primarily to the loop logic and how the page cross logic interacts with the loop. The page cross logic is at times more expensive for short strings near the end of a page but not crossing the page. This is done to retest the page cross conditions with a non-faulty check and to improve the logic for entering the loop afterwards. This is only particular cases, however, and is general made up for by more than 10x improvements on the transition from the page cross -> loop case. The non-page cross cases as well are nearly universally improved. test-strcmp, test-strncmp, test-wcscmp, and test-wcsncmp all pass. Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
* x86: Optimize strcmp-avx2.SNoah Goldstein2022-02-031-651/+939
| | | | | | | | | | | | | | | | | | | | Optimization are primarily to the loop logic and how the page cross logic interacts with the loop. The page cross logic is at times more expensive for short strings near the end of a page but not crossing the page. This is done to retest the page cross conditions with a non-faulty check and to improve the logic for entering the loop afterwards. This is only particular cases, however, and is general made up for by more than 10x improvements on the transition from the page cross -> loop case. The non-page cross cases are improved most for smaller sizes [0, 128] and go about even for (128, 4096]. The loop page cross logic is improved so some more significant speedup is seen there as well. test-strcmp, test-strncmp, test-wcscmp, and test-wcsncmp all pass. Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
* string: Improve coverage in test-strcmp.c and test-strncmp.cNoah Goldstein2022-02-032-21/+306
| | | | | | | | | Add additional test cases for small / medium sizes. Add tests in test-strncmp.c where `n` is near ULONG_MAX or LONG_MIN to test for overflow bugs in length handling. Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
* string/test-str*cmp: remove stupid_[strcmp, strncmp, wcscmp, wcsncmp].Noah Goldstein2022-02-032-69/+0
| | | | | | | | These implementations just add to test duration. Since we have simple_* implementations we already have a safe reference implementation. Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
* linux: Fix missing __convert_scm_timestamps (BZ #28860)Adhemerval Zanella2022-02-031-2/+2
| | | | | | | | | Commit 948ce73b31 made recvmsg/recvmmsg to always call __convert_scm_timestamps for 64 bit time_t symbol, so adjust it to always build it for __TIMESIZE != 64. It fixes build for architecture with 32 bit time_t support when configured with minimum kernel of 5.1.
* linux: __get_nprocs_sched: do not feed CPU_COUNT_S with garbage [BZ #28850]Gleb Fotengauer-Malinovskiy2022-02-031-1/+1
| | | | | | | Pass the actual number of bytes returned by the kernel. Fixes: 33099d72e41c ("linux: Simplify get_nprocs") Reviewed-by: Dmitry V. Levin <ldv@altlinux.org>
* posix: Fix tst-spawn6 terminal handling (BZ #28853)Adhemerval Zanella2022-02-031-11/+51
| | | | | | | | | | | | | | | | | | | | | | The test changes the current foreground process group, which might break testing depending of how the make check is issued. For instance: nohup make -j1 test t=posix/tst-spawn6 | less Will set 'make' and 'less' to be in the foreground process group in the current session. When tst-spawn6 new child takes over it becomes the foreground process and 'less' is stopped and backgrounded which interrupts the 'make check' command. To fix it a pseudo-terminal is allocated, the test starts in new session (so there is no controlling terminal associated), and the pseudo-terminal is set as the controlling one (similar to what login_tty does). Checked on x86_64-linux-gnu. Tested-by: Carlos O'Donell <carlos@redhat.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Regenerate configureAndreas Schwab2022-02-031-13/+1
|
* Open master branch for glibc 2.36 development glibc-2.35.9000Carlos O'Donell2022-02-032-2/+26
|
* Create ChangeLog.old/ChangeLog.24. glibc-2.35Carlos O'Donell2022-02-031-0/+11984
|
* Prepare for glibc 2.35 release.Carlos O'Donell2022-02-032-3/+3
| | | | Update version.h, and include/features.h.
* Regenerate configure.Carlos O'Donell2022-02-032-2/+20
|
* Update install.texi, and regenerate INSTALL.Carlos O'Donell2022-02-032-18/+24
|
* Update NEWS bug list.Carlos O'Donell2022-02-021-2/+134
|
* Update NEWS.Carlos O'Donell2022-02-021-6/+7
| | | | | | Moved LD_AUDIT notes into requirements section since the LAV_CURRENT bump is a requirements change that impacts loading old audit modules or new audit modules on older loaders.
* Update translations.Carlos O'Donell2022-02-0236-27411/+27827
|
* Linux: Use ptrdiff_t for __rseq_offsetFlorian Weimer2022-02-0213-14/+15
| | | | | | | | This matches the data size initial-exec relocations use on most targets. Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Fix elf/tst-audit25a with default bind now toolchainsSzabolcs Nagy2022-02-021-0/+1
| | | | | This test relies on lazy binding for the executable so request that explicitly in case the toolchain defaults to bind now.
* posix: Replace posix_spawnattr_tc{get,set}pgrp_np with ↵Adhemerval Zanella2022-02-0247-197/+182
| | | | | | | | | | | | | | | | | | posix_spawn_file_actions_addtcsetpgrp_np The posix_spawnattr_tcsetpgrp_np works on a file descriptor (the controlling terminal), so it would make more sense to actually fit it on the file actions API. Also, POSIX_SPAWN_TCSETPGROUP is not really required since it is implicit by the presence of tcsetpgrp file action. The posix/tst-spawn6.c is also fixed when TTY can is not present. Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* or1k: Define PI_STATIC_AND_HIDDENStafford Horne2022-02-022-0/+9
| | | | | | | | | | | PI_STATIC_AND_HIDDEN means that references to static functions, data and symbols with hidden visibility do not need any run-time relocations after the final link, with the build flags used by glibc. OpenRISC follows this so enabled PI_STATIC_AND_HIDDEN by adding configure.ac and generating configure. Suggested-by: Florian Weimer <fweimer@redhat.com>
* SET_RELHOOK: merge i386 and x86_64, and move to sysdeps/mach/hurd/x86Samuel Thibault2022-02-013-31/+3
| | | | | | | It is not Hurd-specific, but H.J. Lu wants it there. Also, dc.a can be used to avoid hardcoding .long vs .quad and thus use the same implementation for i386 and x86_64.
* elf: Fix runtime linker auditing on aarch64 (BZ #26643)Ben Woodard2022-02-0116-41/+779
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rtld audit support show two problems on aarch64: 1. _dl_runtime_resolve does not preserve x8, the indirect result location register, which might generate wrong result calls depending of the function signature. 2. The NEON Q registers pushed onto the stack by _dl_runtime_resolve were twice the size of D registers extracted from the stack frame by _dl_runtime_profile. While 2. might result in wrong information passed on the PLT tracing, 1. generates wrong runtime behaviour. The aarch64 rtld audit support is changed to: * Both La_aarch64_regs and La_aarch64_retval are expanded to include both x8 and the full sized NEON V registers, as defined by the ABI. * dl_runtime_profile needed to extract registers saved by _dl_runtime_resolve and put them into the new correctly sized La_aarch64_regs structure. * The LAV_CURRENT check is change to only accept new audit modules to avoid the undefined behavior of not save/restore x8. * Different than other architectures, audit modules older than LAV_CURRENT are rejected (both La_aarch64_regs and La_aarch64_retval changed their layout and there are no requirements to support multiple audit interface with the inherent aarch64 issues). * A new field is also reserved on both La_aarch64_regs and La_aarch64_retval to support variant pcs symbols. Similar to x86, a new La_aarch64_vector type to represent the NEON register is added on the La_aarch64_regs (so each type can be accessed directly). Since LAV_CURRENT was already bumped to support bind-now, there is no need to increase it again. Checked on aarch64-linux-gnu. Co-authored-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* elf: Issue la_symbind for bind-now (BZ #23734)Adhemerval Zanella2022-02-0135-39/+1379
| | | | | | | | | | | | | | | | | | | | | | | The audit symbind callback is not called for binaries built with -Wl,-z,now or when LD_BIND_NOW=1 is used, nor the PLT tracking callbacks (plt_enter and plt_exit) since this would change the expected program semantics (where no PLT is expected) and would have performance implications (such as for BZ#15533). LAV_CURRENT is also bumped to indicate the audit ABI change (where la_symbind flags are set by the loader to indicate no possible PLT trace). To handle powerpc64 ELFv1 function descriptor, _dl_audit_symbind requires to know whether bind-now is used so the symbol value is updated to function text segment instead of the OPD (for lazy binding this is done by PPC64_LOAD_FUNCPTR on _dl_runtime_resolve). Checked on x86_64-linux-gnu, i686-linux-gnu, aarch64-linux-gnu, powerpc64-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* elf: Fix initial-exec TLS access on audit modules (BZ #28096)Adhemerval Zanella2022-02-018-6/+169
| | | | | | | | | | | | | | | | | For audit modules and dependencies with initial-exec TLS, we can not set the initial TLS image on default loader initialization because it would already be set by the audit setup. However, subsequent thread creation would need to follow the default behaviour. This patch fixes it by setting l_auditing link_map field not only for the audit modules, but also for all its dependencies. This is used on _dl_allocate_tls_init to avoid the static TLS initialization at load time. Checked on x86_64-linux-gnu, i686-linux-gnu, and aarch64-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* elf: Add la_activity during application exitAdhemerval Zanella2022-02-015-0/+351
| | | | | | | | | | la_activity is not called during application exit, even though la_objclose is. Checked on x86_64-linux-gnu, i686-linux-gnu, and aarch64-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* localedata: Adjust C.UTF-8 to align with C/POSIX.Carlos O'Donell2022-02-013-13/+578
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have had one downstream report from Canonical [1] that an rrdtool test was broken by the differences in LC_TIME that we had in the non-builtin C locale (C.UTF-8). If one application has an issue there are going to be others, and so with this commit we review and fix all the issues that cause the builtin C locale to be different from C.UTF-8, which includes: * mon_decimal_point should be empty e.g. "" - Depends on mon_decimal_point_wc fix. * negative_sign should be empty e.g. "" * week should be aligned with the builtin C/POSIX locale * d_fmt corrected with escaped slashes e.g. "%m//%d//%y" * yesstr and nostr should be empty e.g. "" * country_ab2 and country_ab3 should be empty e.g. "" We bump LC_IDENTIFICATION version and adjust the date to indicate the change in the locale. A new tst-c-utf8-consistency test is added to ensure consistency between C/POSIX and C.UTF-8. Tested on x86_64 and i686 without regression. [1] https://sourceware.org/pipermail/libc-alpha/2022-January/135703.html Co-authored-by: Florian Weimer <fweimer@redhat.com> Reviewed-by: Florian Weimer <fweimer@redhat.com>
* localedef: Fix handling of empty mon_decimal_point (Bug 28847)Carlos O'Donell2022-02-011-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The handling of mon_decimal_point is incorrect when it comes to handling the empty "" value. The existing parser in monetary_read() will correctly handle setting the non-wide-character value and the wide-character value e.g. STR_ELEM_WC(mon_decimal_point) if they are set in the locale definition. However, in monetary_finish() we have conflicting TEST_ELEM() which sets a default value (if the locale definition doesn't include one), and subsequent code which looks for mon_decimal_point to be NULL to issue a specific error message and set the defaults. The latter is unused because TEST_ELEM() always sets a default. The simplest solution is to remove the TEST_ELEM() check, and allow the existing check to look to see if mon_decimal_point is NULL and set an appropriate default. The final fix is to move the setting of mon_decimal_point_wc so it occurs only when mon_decimal_point is being set to a default, keeping both values consistent. There is no way to tell the difference between mon_decimal_point_wc having been set to the empty string and not having been defined at all, for that distinction we must use mon_decimal_point being NULL or "", and so we must logically set the default together with mon_decimal_point. Lastly, there are more fixes similar to this that could be made to ld-monetary.c, but we avoid that in order to fix just the code required for mon_decimal_point, which impacts the ability for C.UTF-8 to set mon_decimal_point to "", since without this fix we end up with an inconsistent setting of mon_decimal_point set to "", but mon_decimal_point_wc set to "." which is incorrect. Tested on x86_64 and i686 without regression. Reviewed-by: Florian Weimer <fweimer@redhat.com>
* malloc: Fix tst-mallocalign1 macro spacing.Carlos O'Donell2022-02-011-1/+1
| | | | Reported by Andreas Schwab <schwab@linux-m68k.org>
* elf: Add <dl-r_debug.h>H.J. Lu2022-01-314-25/+124
| | | | | | | | Add <dl-r_debug.h> to get the adddress of the r_debug structure after relocation and its offset before relocation from the PT_DYNAMIC segment to support DT_DEBUG, DT_MIPS_RLD_MAP_REL and DT_MIPS_RLD_MAP. Co-developed-by: Xi Ruoyao <xry111@mengyan1223.wang>
* Mention _FORTIFY_SOURCE=3 for gcc12 in NEWSSiddhesh Poyarekar2022-01-311-0/+6
| | | | Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* malloc: Fix -Wuse-after-free warning in tst-mallocalign1 [BZ #26779]Carlos O'Donell2022-01-311-9/+11
| | | | | | | | | | | | | | The test leaks bits from the freed pointer via the return value in ret, and the compiler correctly identifies this issue. We switch the test to use TEST_VERIFY and terminate the test if any of the pointers return an unexpected alignment. This fixes another -Wuse-after-free error when compiling glibc with gcc 12. Tested on x86_64 and i686 without regression. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Update libc.pot for 2.35 release.Carlos O'Donell2022-01-301-948/+961
|
* tst-socket-timestamp-compat.c: Check __TIMESIZE [BZ #28837]H.J. Lu2022-01-291-1/+1
| | | | | time_t size is defined by __TIMESIZE, not __WORDSIZE. Check __TIMESIZE, instead of __WORDSIZE, for time_t size. This fixes BZ #28837.
* Add prelink removal plan on NEWSAdhemerval Zanella2022-01-281-0/+4
| | | | Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Linux: Only generate 64 bit timestamps for 64 bit time_t recvmsg/recvmmsgAdhemerval Zanella2022-01-286-26/+330
| | | | | | | | | | | | | | | | | | | | | | | The timestamps created by __convert_scm_timestamps only make sense for 64 bit time_t programs, 32 bit time_t programs will ignore 64 bit time_t timestamps since SO_TIMESTAMP will be defined to old values (either by glibc or kernel headers). Worse, if the buffer is not suffice MSG_CTRUNC is set to indicate it (which breaks some programs [1]). This patch makes only 64 bit time_t recvmsg and recvmmsg to call __convert_scm_timestamps. Also, the assumption to called it is changed from __ASSUME_TIME64_SYSCALLS to __TIMESIZE != 64 since the setsockopt might be called by libraries built without __TIME_BITS=64. The MSG_CTRUNC is only set for the 64 bit symbols, it should happen only if 64 bit time_t programs run older kernels. Checked on x86_64-linux-gnu and i686-linux-gnu. [1] https://github.com/systemd/systemd/pull/20567 Reviewed-by: Florian Weimer <fweimer@redhat.com>
* linux: Fix ancillary 64-bit time timestamp conversion (BZ #28349, BZ#28350)Adhemerval Zanella2022-01-284-6/+348
| | | | | | | | | | | | | | | | | | | | The __convert_scm_timestamps only updates the control message last pointer for SOL_SOCKET type, so if the message control buffer contains multiple ancillary message types the converted timestamp one might overwrite a valid message. The test checks if the extra ancillary space is correctly handled by recvmsg/recvmmsg, where if there is no extra space for the 64-bit time_t converted message the control buffer should be marked with MSG_TRUNC. It also check if recvmsg/recvmmsg handle correctly multiple ancillary data. Checked on x86_64-linux and on i686-linux-gnu on both 5.11 and 4.15 kernel. Co-authored-by: Fabian Vogt <fvogt@suse.de> Reviewed-by: Florian Weimer <fweimer@redhat.com>
* support: Add support_socket_so_timestamp_time64Adhemerval Zanella2022-01-283-0/+53
| | | | | | | | Check if the socket support 64-bit network packages timestamps (SO_TIMESTAMP and SO_TIMESTAMPNS). This will be used on recvmsg and recvmmsg tests to check if the timestamp should be generated. Reviewed-by: Florian Weimer <fweimer@redhat.com>
* Fix elf/loadfail test build dependenciesSzabolcs Nagy2022-01-281-1/+3
| | | | | | | | | | There was no direct or indirect make dependency on testobj3.so so the test could fail with /B/elf/loadfail: failed to load shared object: testobj3.so: cannot open shared object file: No such file or directory Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Fix glibc 2.34 ABI omission (missing GLIBC_2.34 in dynamic loader)Florian Weimer2022-01-2733-0/+69
| | | | | | | | | | | | | The glibc 2.34 release really should have added a GLIBC_2.34 symbol to the dynamic loader. With it, we could move functions such as dlopen or pthread_key_create that work on process-global state into the dynamic loader (once we have fixed a longstanding issue with static linking). Without the GLIBC_2.34 symbol, yet another new symbol version would be needed because old glibc will fail to load binaries due to the missing symbol version in ld.so that newly linked programs will require. Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* x86: Use CHECK_FEATURE_PRESENT to check HLE [BZ #27398]H.J. Lu2022-01-261-1/+1
| | | | | HLE is disabled on blacklisted CPUs. Use CHECK_FEATURE_PRESENT, instead of CHECK_FEATURE_ACTIVE, to check HLE.
* Guard tst-valgrind-smoke.out with run-built-testsMark Wielaard2022-01-261-0/+2
| | | | | | Prevent tst-valgrind-smoke from running when run-built-tests is not yes. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* hurd: Add posix_spawnattr_tc{get,set}pgrp_np on libc.abilistAdhemerval Zanella2022-01-261-0/+2
| | | | Commit 342cc934a3bf74ac missed the update-abi for the ABI.
* Avoid -Wuse-after-free in tests [BZ #26779].Martin Sebor2022-01-266-2/+60
| | | | Reviewed-by: Carlos O'Donell <carlos@redhat.com>