aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-06-30login: Move libutil into libcFlorian Weimer
The symbols forkpty, login, login_tty, logout, logwtmp, openpty were moved using scripts/move-symbol-to-libc.py. This is a single commit because most of the symbols are tied together via forkpty, for example. Several changes to use hidden prototypes are needed. This commit also updates pseudoterminal terminology on modified lines. For 390 (31-bit), this commit follows the existing style for the compat symbol version creation. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-06-30login: Rework hidden prototypes for __setutent, __utmpname, __endutentFlorian Weimer
Replace attribute_hidden with a regular combination of libc_hidden_proto and libc_hidden_def. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-06-30login: Hidden prototypes for _getpt, __ptsname_r, grantpt, unlockptFlorian Weimer
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-06-29nptl_db: Re-use the ELF-to-abilist converter for ABI checkingFlorian Weimer
The previous approach uses readelf -DWs, which does not produce a stable output format (older binutils versions do not include symbol version information). This commit re-uses scripts/abilist.awk with a tweak to include GLIBC_PRIVATE symbols. This awk script is based on objdump -T output, which appears to be stable over time. Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
2021-06-29Add RFC 8335 Definitions from Linux 5.13Andreas Roeseler
RFC 8335 defines the network utility PROBE, which builds off of the capabilities of Ping to query more detailed interface information from networking nodes. The definitions included in this patchset have been accepted into the linux net-next branch and will be included in Linux 5.13. This patchset adds the same definitions to the glibc for use in the iputils package. The relevant commits for the Linux definitions can be found here: https://github.com/torvalds/linux/commit/e542d29ca81d005651680a0a697b72ca13ddc4cc https://github.com/torvalds/linux/commit/750f4fc2a12f6632b5aa04526bf57fa06bfe8467 These changes have been tested by running the glibc tests on x86_64 Signed-off-by: Andreas Roeseler <andreas.a.roeseler@gmail.com> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-06-29nss: Fix NSS_DECLARE_MODULE_FUNCTIONS handling of _nss_*_endnetgrentFlorian Weimer
The old version had an additional underscore, making the declaration ineffective.
2021-06-29s390x: Update math: redirect roundeven functionStefan Liebler
After recent commit 447954a206837b5f153869cfeeeab44631c3fac9 "math: redirect roundeven function", building on s390x fails with: Error: symbol `__roundevenl' is already defined Similar to aarch64/riscv fix, this patch redirects target specific functions for s390x: commit 3213ed770cbc5821920d16caa93c85e92dd7b9f6 "Update math: redirect roundeven function"
2021-06-28posix: Add _Fork [BZ #4737]Adhemerval Zanella
Austin Group issue 62 [1] dropped the async-signal-safe requirement for fork and provided a async-signal-safe _Fork replacement that does not run the atfork handlers. It will be included in the next POSIX standard. It allow to close a long standing issue to make fork AS-safe (BZ#4737). As indicated on the bug, besides the internal lock for the atfork handlers itself; there is no guarantee that the handlers itself will not introduce more AS-safe issues. The idea is synchronize fork with the required internal locks to allow children in multithread processes to use mostly of standard function (even though POSIX states only AS-safe function should be used). On signal handles, _Fork should be used intead and only AS-safe functions should be used. For testing, the new tst-_Fork only check basic usage. I also added a new tst-mallocfork3 which uses the same strategy to check for deadlock of tst-mallocfork2 but using threads instead of subprocesses (and it does deadlock if it replaces _Fork with fork). [1] https://austingroupbugs.net/view.php?id=62
2021-06-28nptl: Add glibc.pthread.stack_cache_size tunableFlorian Weimer
The valgrind/helgrind test suite needs a way to make stack dealloction more prompt, and this feature seems to be generally useful. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
2021-06-28nptl: Export libthread_db-used symbols under GLIBC_PRIVATEFlorian Weimer
This allows distributions to strip debugging information from libc.so.6 without impacting the debugging experience. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2021-06-28nptl: Rename nptl_version to __nptl_versionFlorian Weimer
This prepares it for exporting as a dynamic symbol. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-06-28nptl_db: Clean up main/rtld variable handlingFlorian Weimer
Most symbols are now in libc.so.6. The "main" (exempted from coverage checks) status is therefore not necessary. Use DB_MAIN_VARIABLE for the remaining separate symbol, __nptl_initial_report_events. DB_RTLD_VARIABLE is now unused, so remove it. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-06-28arm: align stack in clone [BZ 28020]Szabolcs Nagy
The arm PCS requires 8 byte aligned stack at function entry. Previously unaligned stack could crash the clone child. Fixes bug 28020.
2021-06-28Linux: Cleanups after librt moveFlorian Weimer
librt.so is no longer installed for PTHREAD_IN_LIBC, and tests are not linked against it. $(librt) is introduced globally for shared tests that need to be linked for both PTHREAD_IN_LIBC and !PTHREAD_IN_LIBC. GLIBC_PRIVATE symbols that were needed during the transition are removed again. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2021-06-28Linux: Move timer_settime, __timer_settime64 from librt to libcFlorian Weimer
The symbols were moved using scripts/move-symbol-to-libc.py. The way the ABI intransition is implemented is changed with this commit: the implementation is now consolidated in one file with a TIMER_T_WAS_INT_COMPAT check. The shared librt is now empty, so this commit adds a placeholder symbol at the base version, GLIBC_2.2, and potentially at the GLIBC_2.3.3 version as well (the leftover from the int/timer_t ABI transition). Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-06-28Linux: Move timer_gettime, __timer_gettime64 from librt to libcFlorian Weimer
The symbols were moved using scripts/move-symbol-to-libc.py. The way the ABI intransition is implemented is changed with this commit: the implementation is now consolidated in one file with a TIMER_T_WAS_INT_COMPAT check. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-06-28Linux: Move timer_getoverrun from librt to libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py. The way the ABI intransition is implemented is changed with this commit: the implementation is now consolidated in one file with a TIMER_T_WAS_INT_COMPAT check. Reviewed-by: Adhemerva Zanella <adhemerval.zanella@linaro.org>
2021-06-28Linux: Move timer_create, timer_delete from librt to libcFlorian Weimer
The symbols were moved using scripts/move-symbol-to-libc.py. timer_create and timer_delete are tied together via the int/timer_t compatibility code. The way the ABI intransition is implemented is changed with this commit: the implementation is now consolidated in one file with a TIMER_T_WAS_INT_COMPAT check. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-06-28Linux: Define TIMER_T_WAS_INT_COMPAT in kernel-posix-timers.hFlorian Weimer
This is almost equivalent to __WORDSIZE == 64 && OTHER_SHLIB_COMPAT (librt, GLIBC_2_1, GLIBC_2_3_3), except that this expression is true for mips64/n64 targets as well, even though those did not undergo the timer_t transition. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2021-06-28Install shared objects under their ABI namesFlorian Weimer
Previously, the installed objects were named like libc-2.33.so, and the ABI soname libc.so.6 was just a symbolic link. The Makefile targets to install these symbolic links are no longer needed after this, so they are removed with this commit. The more general $(make-link) command (which invokes scripts/rellns-sh) is retained because other symbolic links are still needed. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@rehdat.com>
2021-06-28elf: Generalize name-based DSO recognition in ldconfigFlorian Weimer
This introduces <dl-is_dso.h> and the _dl_is_dso function. A test ensures that the official names of libc.so, ld.so, and their versioned names are recognized. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-06-28Makerules: Remove lib-version, $(subdir-version)Florian Weimer
Also clarify that the "versioned" term refers to the soname, not the glibc version (which also ends up in the installed file name). Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-06-28nptl_db: Install libthread_db under a regular implementation nameFlorian Weimer
Currently, the name is always libthread_db-1.0.so. It does not change with the glibc version, like the other libraries. GDB hard-codes libthread_db.so.1 (the soname), so this change does not affect loading libthread_db. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-06-28iconvconfig: Fix multiple issuesSiddhesh Poyarekar
It was noticed on big-endian systems that msgfmt would fail with the following error: msgfmt: gconv_builtin.c:70: __gconv_get_builtin_trans: Assertion `cnt < sizeof (map) / sizeof (map[0])' failed. Aborted (core dumped) This is only seen on installed systems because it was due to a corrupted gconv-modules.cache. iconvconfig had the following issues (it was specifically freeing fulldir that caused this issue, but other cleanups are also needed) that this patch fixes. - Add prefix only if dir starts with '/' - Use asprintf instead of mempcpy so that the directory string is NULL terminated - Make a copy of the directory reference in new_module so that fulldir can be freed within the same scope in handle_dir. Reviewed-by: Florian Weimer <fweimer@redhat.com>
2021-06-27wordexp: handle overflow in positional parameter number (bug 28011)Andreas Schwab
Use strtoul instead of atoi so that overflow can be detected.
2021-06-27Update math: redirect roundeven functionH.J. Lu
Redirect target specific roundeven functions for aarch64, ldbl-128ibm and riscv.
2021-06-27Use GCC builtins for roundeven functions if desired.Shen-Ta Hsieh
This patch is using the corresponding GCC builtin for roundevenf, roundeven and roundevenl if the USE_FUNCTION_BUILTIN macros are defined to one in math-use-builtins.h. These builtin functions is supported since GCC 10. The code of the generic implementation is not changed. Signed-off-by: Shen-Ta Hsieh <ibmibmibm.tw@gmail.com> Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2021-06-27x86_64: roundeven with sse4.1 supportShen-Ta Hsieh
This patch adds support for the sse4.1 hardware floating point roundeven. Here is some benchmark results on my systems: =AMD Ryzen 9 3900X 12-Core Processor= * benchmark result before this commit | | roundeven | roundevenf | |------------|--------------|--------------| | duration | 3.75587e+09 | 3.75114e+09 | | iterations | 3.93053e+08 | 4.35402e+08 | | max | 52.592 | 58.71 | | min | 7.98 | 7.22 | | mean | 9.55563 | 8.61535 | * benchmark result after this commit | | roundeven | roundevenf | |------------|---------------|--------------| | duration | 3.73815e+09 | 3.73738e+09 | | iterations | 5.82692e+08 | 5.91498e+08 | | max | 56.468 | 51.642 | | min | 6.27 | 6.156 | | mean | 6.41532 | 6.3185 | =Intel(R) Pentium(R) CPU D1508 @ 2.20GHz= * benchmark result before this commit | | roundeven | roundevenf | |------------|--------------|--------------| | duration | 2.18208e+09 | 2.18258e+09 | | iterations | 2.39932e+08 | 2.46924e+08 | | max | 96.378 | 98.035 | | min | 6.776 | 5.94 | | mean | 9.09456 | 8.83907 | * benchmark result after this commit | | roundeven | roundevenf | |------------|--------------|--------------| | duration | 2.17415e+09 | 2.17005e+09 | | iterations | 3.56193e+08 | 4.09824e+08 | | max | 51.693 | 97.192 | | min | 5.926 | 5.093 | | mean | 6.10385 | 5.29507 | Signed-off-by: Shen-Ta Hsieh <ibmibmibm.tw@gmail.com> Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2021-06-27math: redirect roundeven functionShen-Ta Hsieh
This patch redirect roundeven function for futhermore changes. Signed-off-by: Shen-Ta Hsieh <ibmibmibm.tw@gmail.com> Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2021-06-25Linux: Move timer helper routines from librt to libcFlorian Weimer
This adds several temporary GLIBC_PRIVATE exports. The symbol names are changed so that they all start with __timer_. It is now possible to invoke the fork handler directly, so pthread_atfork is no longer necessary. The associated error cannot happen anymore, and cancellation handling can be removed from the helper thread routine. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-06-25Linux: Move mq_unlink from librt to libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py. A placeholder symbol is needed on some architectures for the GLIBC_2.3.4 version. Reviewed-by: Adhemerva Zanella <adhemerval.zanella@linaro.org>
2021-06-25Linux: Move mq_send, mq_timedsend, __mq_timedsend_time64 to libcFlorian Weimer
The symbols were moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerva Zanella <adhemerval.zanella@linaro.org>
2021-06-25Linux: Move mq_receive, mq_timedreceive, __mq_timedreceive_time64 to libcFlorian Weimer
The symbols were moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerva Zanella <adhemerval.zanella@linaro.org>
2021-06-25Linux: Move mq_open, __mq_open_2 from librt to libcFlorian Weimer
The symbols were moved using scripts/move-symbol-to-libc.py. A placeholder symbol is required to keep the GLIBC_2.7 version. Reviewed-by: Adhemerva Zanella <adhemerval.zanella@linaro.org>
2021-06-25Linux: Move mq_notify from librt to libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py. An explicit call from fork into the mq_notify implementation replaces the previous use of pthread_atfork. Reviewed-by: Adhemerva Zanella <adhemerval.zanella@linaro.org>
2021-06-25Linux: Move mq_getattr from librt to libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerva Zanella <adhemerval.zanella@linaro.org>
2021-06-25Linux: Move mq_setattr from librt to libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py. To introduce the proper symbol versioning, the implementation of the system call wrapper us moved to a C file. Reviewed-by: Adhemerva Zanella <adhemerval.zanella@linaro.org>
2021-06-25Linux: Move mq_close from librt to libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerva Zanella <adhemerval.zanella@linaro.org>
2021-06-25Linux: Move lio_listio, lio_listio64 from librt to libcFlorian Weimer
The symbols were moved using scripts/move-symbol-to-libc.py. Placeholder symbols are needed on some architectures, to keep the GLIBC_2.1 and GLIBC_2.4 symbol versions around. Reviewed-by: Adhemerva Zanella <adhemerval.zanella@linaro.org>
2021-06-25rt: Rework lio_listio implementationFlorian Weimer
Move the common code into rt/lio_listio-common.c and include the file in both rt/lio_listio.c and rt/lio_listio64.c. The common code automatically defines both public symbols for __WORDSIZE == 64. Reviewed-by: Adhemerva Zanella <adhemerval.zanella@linaro.org>
2021-06-25Linux: Move aio_write, aio_write64 into libcFlorian Weimer
Both symbols have to be moved at the same time because they are intertwined for __WORDSIZE == 64. The treatment of this case is also changed to match more closely how the other files suppress the declaration of the *64 identifier. The symbols were moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerva Zanella <adhemerval.zanella@linaro.org>
2021-06-25Linux: Move aio_suspend, aio_suspend64, __aio_suspend_time64 to libcFlorian Weimer
The symbols were moved using scripts/move-symbol-to-libc.py. There is a minor oddity here: This is generic code shared with Hurd, and Hurd does not have time64 support. This is why the versioned_symbol export for __aio_suspend_time64 is restricted to the PTHREAD_IN_LIBC code. Reviewed-by: Adhemerva Zanella <adhemerval.zanella@linaro.org>
2021-06-25Linux: Move aio_return, aio_return64 into libcFlorian Weimer
The symbols were moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerva Zanella <adhemerval.zanella@linaro.org>
2021-06-25Linux: Move aio_read, aio_read64 into libcFlorian Weimer
Both symbols have to be moved at the same time because they are intertwined for __WORDSIZE == 64. The treatment of this case is also changed to match more closely how the other files suppress the declaration of the *64 identifier. The symbols were moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-06-25Linux: Move aio_fsync, aio_fsync64 into libcFlorian Weimer
The symbols were moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-06-25Linux: Move aio_error, aio_error64 into libcFlorian Weimer
The symbols were moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-06-25Linux: Move aio_cancel, aio_cancel64 into libcFlorian Weimer
The symbols were moved using scripts/move-symbol-to-libc.py. A version placeholder symbol is needed on alpha and sparc because of the additional symbols formerly at version GLIBC_2.3. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>:
2021-06-25Linux: Move aio_init from librt into libcFlorian Weimer
This commit also moves the aio_misc and aio_sigquue helper, so GLIBC_PRIVATE exports need to be added. The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-06-25support: Fix xclone build failures on ia64 and hppaFlorian Weimer
2021-06-25elf: Disable most of TLS modid gaps processing [BZ #27135]Florian Weimer
Revert "elf: Fix DTV gap reuse logic [BZ #27135]" This reverts commit 572bd547d57a39b6cf0ea072545dc4048921f4c3. It turns out that the _dl_next_tls_modid in _dl_map_object_from_fd keeps returning the same modid over and over again if there is a gap and more than TLS-using module is loaded in one dlopen call. This corrupts TLS data structures. The bug is still present after a revert, but empirically it is much more difficult to trigger (because it involves a dlopen failure).