about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* sysvipc: Add missing bit of semtimedop s390 consolidationAdhemerval Zanella2019-05-213-0/+13
| | | | | | | | | | | | This patch add the missing SEMTIMEDOP_IPC_ARGS definions on powerpc and sparc ipc_priv.h. Checked on powerpc64le-linux-gnu and with a build for sparc64-linux-gnu. * sysdeps/unix/sysv/linux/powerpc/ipc_priv.h (SEMTIMEDOP_IPC_ARGS): New define. * sysdeps/unix/sysv/linux/sparc/sparc64/ipc_priv.h (SEMTIMEDOP_IPC_ARGS): Likewise.
* wcsmbs: Fix data race in __wcsmbs_clone_conv [BZ #24584]Florian Weimer2019-05-213-4/+29
| | | | | This also adds an overflow check and documents the synchronization requirement in <gconv.h>.
* libio: Fix gconv-related memory leak [BZ #24583]Florian Weimer2019-05-217-8/+143
| | | | | | | struct gconv_fcts for the C locale is statically allocated, and __gconv_close_transform deallocates the steps object. Therefore this commit introduces __wcsmbs_close_conv to avoid freeing the statically allocated steps objects.
* libio: Remove codecvt vtable [BZ #24588]Florian Weimer2019-05-2010-205/+135
| | | | | | | | | | | | | | The codecvt vtable is not a real vtable because it also contains the conversion state data. Furthermore, wide stream support was added to GCC 3.0, after a C++ ABI bump, so there is no compatibility requirement with libstdc++. This change removes several unmangled function pointers which could be used with a corrupted FILE object to redirect execution. (libio vtable verification did not cover the codecvt vtable.) Reviewed-by: Yann Droneaud <ydroneaud@opteya.com> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* support: Expose sbindir as support_sbindir_prefixFlorian Weimer2019-05-204-0/+17
|
* support: Add missing EOL terminators on timespecMike Crowe2019-05-202-2/+5
| | | | | | | | | | | | | The original implementations of test_timespec_before_impl and test_timespec_equal_or_after in 519839965197291924895a3988804e325035beee were missing the backslash required for a newline. Checked on x86_64-linux-gnu. * support/timespec.c: Add backslash to correct newline in failure message. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* support: Correct confusing commentMike Crowe2019-05-202-2/+6
| | | | | | * support/timespec.h: Correct confusing comment. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* sysvipc: Consolidate semtimedop s390Adhemerval Zanella2019-05-205-38/+43
| | | | | | | | | | | | | | | | | | This patch consolidates the s390-32 semtimedop implementation by defining a arch-specific SEMTIMEDOP_IPC_ARGS to rearrange the arguments expected by s390 Linux kABI. The idea is to avoid have multiples semtimedop implementation changes for Linux v5.1 change to enable wire-up sysvipc support. Checked with a s390-linux-gnu and s390x-linux-gnu and checking that resulting semtimedop objects did not change. * sysdeps/unix/sysv/linux/ipc_priv.h (SEMTIMEDOP_IPC_ARGS): New define. * sysdpes/unix/sysv/linux/s390/ipc_priv.h: New file. * sysdeps/unix/sysv/linux/s390/semtimedop.c: Remove file. * sysdeps/unix/sysv/linux/semtimedop.c (semtimedop): Use SEMTIMEDOP_IPC_ARGS for calls with __NR_ipc.
* sysvipc: Fix compat msgctl (BZ#24570)Adhemerval Zanella2019-05-202-1/+7
| | | | | | | | | | | | The __IPC64 flags is meant to be used to enable the new sysv struct format when the architectures supports it (ARCH_WANT_IPC_PARSE_VERSION config flag on Linux kernel). This currently issue only affects alpha. [BZ #24570] * sysdeps/unix/sysv/linux/msgctl.c (__old_msgctl): Remove __IPC_64 usage.
* Add NT_ARM_PACA_KEYS and NT_ARM_PACG_KEYS from Linux 5.1 to elf.h.Joseph Myers2019-05-202-0/+9
| | | | | | | | | | This patch adds the new NT_ARM_PACA_KEYS and NT_ARM_PACG_KEYS from Linux 5.1 to glibc's elf.h. Tested for x86_64. * elf/elf.h (NT_ARM_PACA_KEYS): New macro. (NT_ARM_PACG_KEYS): Likewise.
* Small tcache improvementsWilco Dijkstra2019-05-173-9/+15
| | | | | | | | | | | | | | | | Change the tcache->counts[] entries to uint16_t - this removes the limit set by char and allows a larger tcache. Remove a few redundant asserts. bench-malloc-thread with 4 threads is ~15% faster on Cortex-A72. Reviewed-by: DJ Delorie <dj@redhat.com> * malloc/malloc.c (MAX_TCACHE_COUNT): Increase to UINT16_MAX. (tcache_put): Remove redundant assert. (tcache_get): Remove redundant asserts. (__libc_malloc): Check tcache count is not zero. * manual/tunables.texi (glibc.malloc.tcache_count): Update maximum.
* manual: Document O_DIRECTORYFlorian Weimer2019-05-172-0/+11
|
* Update kernel-features.h files for Linux 5.1.Joseph Myers2019-05-164-7/+23
| | | | | | | | | | | | | | | | | | | | Linux 5.1 adds missing syscalls to the syscall table for many Linux kernel architectures. This patch updates the kernel-features.h headers accordingly. __ASSUME_DIRECT_SYSVIPC_SYSCALLS is not updated because of the differences between new and old syscalls described in <https://sourceware.org/ml/libc-alpha/2019-05/msg00235.html>. The statfs64 structure used by alpha matches what the new kernel syscalls use. Tested with build-many-glibcs.py. * sysdeps/unix/sysv/linux/alpha/kernel-features.h (__ASSUME_STATFS64): Only undefine if [__LINUX_KERNEL_VERSION < 0x050100]. * sysdeps/unix/sysv/linux/ia64/kernel-features.h (__ASSUME_STATX): Likewise. * sysdeps/unix/sysv/linux/sh/kernel-features.h (__ASSUME_STATX): Likewise.
* nss_nis, nss_nisplus: Remove RES_USE_INET6 handlingFlorian Weimer2019-05-163-89/+58
| | | | | | Since commit 3f8b44be0a658266adff5ece1e4bc3ce097a5dbe ("resolv: Remove support for RES_USE_INET6 and the inet6 option"), res_use_inet6 () always evaluates to false.
* nss_files: Remove RES_USE_INET6 from hosts processingFlorian Weimer2019-05-162-27/+24
| | | | | | Since commit 3f8b44be0a658266adff5ece1e4bc3ce097a5dbe ("resolv: Remove support for RES_USE_INET6 and the inet6 option"), res_use_inet6 () always evaluates to false.
* support: Report NULL blobs explicitly in TEST_COMPAREFlorian Weimer2019-05-162-1/+8
| | | | | | | Provide an explicit diagnostic if the length is positive, and do not just crash with a null pointer dereference. Null pointers are only valid if the length is zero, so this can only happen with a faulty test.
* dlfcn: Guard __dlerror_main_freeres with __libc_once_get (once) [BZ# 24476]Mark Wielaard2019-05-152-8/+29
| | | | | | | | | | | | | | | | | | dlerror.c (__dlerror_main_freeres) will try to free resources which only have been initialized when init () has been called. That function is called when resources are needed using __libc_once (once, init) where once is a __libc_once_define (static, once) in the dlerror.c file. Trying to free those resources if init () hasn't been called will produce errors under valgrind memcheck. So guard the freeing of those resources using __libc_once_get (once) and make sure we have a valid key. Also add a similar guard to __dlerror (). * dlfcn/dlerror.c (__dlerror_main_freeres): Guard using __libc_once_get (once) and static_bug == NULL. (__dlerror): Check we have a valid key, set result to static_buf otherwise. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Add missing Changelog entryDJ Delorie2019-05-151-0/+5
| | | | For 5b06f538c5aee0389ed034f60d90a8884d6d54de
* Fix crash in _IO_wfile_sync (bug 20568)Andreas Schwab2019-05-155-3/+57
| | | | | | When computing the length of the converted part of the stdio buffer, use the number of consumed wide characters, not the (negative) distance to the end of the wide buffer.
* nss: Turn __nss_database_lookup into a compatibility symbolFlorian Weimer2019-05-1515-42/+89
| | | | | | | | | | | | | The function uses the internal service_user type, so it is not really usable from the outside of glibc. Rename the function to __nss_database_lookup2 for internal use, and change __nss_database_lookup to always indicate failure to the caller. __nss_next already was a compatibility symbol. The new implementation always fails and no longer calls __nss_next2. unscd, the alternative nscd implementation, does not use __nss_database_lookup, so it is not affected by this change.
* support: Add support_install_rootsbindirAlexandra Hájková2019-05-154-1/+16
| | | | Reviewed by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* iconv: Remove public declaration of __gconv_transliterateFlorian Weimer2019-05-155-11/+17
| | | | | | | | | | Commit ba7b4d294b01870ce3497971e9d07ee261cdc540 ("Complete the removal of __gconv_translit_find") added a declaration of the GLIBC_PRIVATE function, __gconv_transliterate, to the installed header <gconv.h>. It should have been added to the internal <gconv_int.h> header. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Linux: Add the tgkill functionFlorian Weimer2019-05-1438-4/+282
| | | | | | | | | The tgkill function is sometimes used in crash handlers. <bits/signal_ext.h> follows the same approach as <bits/unistd_ext.h> (which was added for the gettid system call wrapper). Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* manual: Adjust twalk_r documentation.Carlos O'Donell2019-05-142-2/+7
| | | | Reviewed-by: Florian Weimer <fweimer@redhat.com>
* elf: Fix tst-pldd for non-default --prefix and/or --bindir (BZ#24544)Adhemerval Zanella2019-05-142-1/+9
| | | | | | | | | | | | | | Use a new libsupport support_bindir_prefix instead of a hardcoded /usr/bin to create the pldd path on container directory. Checked on x86_64-linux-gnu with default and non-default --prefix and --bindir paths, as well with --enable-hardcoded-path-in-tests. [BZ #24544] * elf/tst-pldd.c (do_test): Use support_bindir_prefix instead of pre-defined value. Reviewed-by: DJ Delorie <dj@redhat.com>
* support: Export bindir path on support_pathAdhemerval Zanella2019-05-144-1/+15
| | | | | | | | | | Checked on x86_64-linux-gnu. * support/Makefile (CFLAGS-support_paths.c): Add -DBINDIR_PATH. * support/support.h (support_bindir_prefix): New variable. * support/support_paths.c [BINDIR_PATH] (support_bindir_prefix): Reviewed-by: DJ Delorie <dj@redhat.com>
* Make --bindir effectiveAdhemerval Zanella2019-05-142-0/+3
| | | | | | | | | | This allows sets a path using --bindir. Checked on x86_64-linux-gnu with a non-default --bindir and checked resulting installed binaries (pldd for instance). * config.make.in (bindir): New variable. Reviewed-by: DJ Delorie <dj@redhat.com>
* x86: Remove arch-specific low level lock implementationAdhemerval Zanella2019-05-1412-1026/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the arch-specific x86 assembly implementation for low level locking and consolidate both 64 bits and 32 bits in a single implementation. Different than other architectures, x86 lll_trylock, lll_lock, and lll_unlock implements a single-thread optimization to avoid atomic operation, using cmpxchgl instead. This patch implements by using the new single-thread.h definitions in a generic way, although using the previous semantic. The lll_cond_trylock, lll_cond_lock, and lll_timedlock just use atomic operations plus calls to lll_lock_wait*. For __lll_lock_wait_private and __lll_lock_wait the generic implemtation there is no indication that assembly implementation is required performance-wise. Checked on x86_64-linux-gnu and i686-linux-gnu. * sysdeps/nptl/lowlevellock.h (__lll_trylock): New macro. (lll_trylock): Call __lll_trylock. * sysdeps/unix/sysv/linux/i386/libc-lowlevellock.S: Remove file. * sysdeps/unix/sysv/linux/i386/lll_timedlock_wait.c: Likewise. * sysdeps/unix/sysv/linux/i386/lowlevellock.S: Likewise. * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/lll_timedlock_wait.c: Likewise. * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/x86/lowlevellock.h: New file. * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock-futex.h.
* Assume LLL_LOCK_INITIALIZER is 0Adhemerval Zanella2019-05-147-52/+13
| | | | | | | | | | | | | | | | | Since hppa is not an outlier anymore regarding LLL_LOCK_INITIALIZER value, we can now assume it 0 for all architectures. Checked on a build for all major ABIs. * nptl/nptl-init.c (__pthread_initialize_minimal_internal): Remove initialization for LLL_LOCK_INITIALIZER different than 0. * nptl/old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Assume LLL_LOCK_INITIALIZER being 0. * nptl/old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise. * nptl/old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0): Likewise. * nptl/old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise. * sysdeps/nptl/libc-lockP.h (__libc_lock_define_initialized): Likewise.
* Small optimization for lowlevellockAdhemerval Zanella2019-05-142-12/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch optimizes both __lll_lock_wait_private and __lll_lock_wait by issuing only one lll_futex_wait. Since it is defined as an inlined syscall and inlined syscalls are defined using inlined assembly the compiler usually can not see both calls are equal and optimize accordingly. On aarch64 the resulting binary is change from: 0000000000000060 <__lll_lock_wait>: 60: 2a0103e5 mov w5, w1 64: b9400001 ldr w1, [x0] 68: aa0003e4 mov x4, x0 6c: 7100083f cmp w1, #0x2 70: 540000e1 b.ne 8c <__lll_lock_wait+0x2c> // b.any 74: 521900a1 eor w1, w5, #0x80 78: d2800042 mov x2, #0x2 // #2 7c: 93407c21 sxtw x1, w1 80: d2800003 mov x3, #0x0 // #0 84: d2800c48 mov x8, #0x62 // #98 88: d4000001 svc #0x0 8c: 521900a5 eor w5, w5, #0x80 90: 52800046 mov w6, #0x2 // #2 94: 93407ca5 sxtw x5, w5 98: 14000008 b b8 <__lll_lock_wait+0x58> 9c: d503201f nop a0: aa0403e0 mov x0, x4 a4: aa0503e1 mov x1, x5 a8: d2800042 mov x2, #0x2 // #2 ac: d2800003 mov x3, #0x0 // #0 b0: d2800c48 mov x8, #0x62 // #98 b4: d4000001 svc #0x0 b8: 885ffc80 ldaxr w0, [x4] bc: 88017c86 stxr w1, w6, [x4] c0: 35ffffc1 cbnz w1, b8 <__lll_lock_wait+0x58> c4: 35fffee0 cbnz w0, a0 <__lll_lock_wait+0x40> c8: d65f03c0 ret To: 0000000000000048 <__lll_lock_wait>: 48: aa0003e4 mov x4, x0 4c: 2a0103e5 mov w5, w1 50: b9400000 ldr w0, [x0] 54: 7100081f cmp w0, #0x2 58: 540000c0 b.eq 70 <__lll_lock_wait+0x28> // b.none 5c: 52800041 mov w1, #0x2 // #2 60: 885ffc80 ldaxr w0, [x4] 64: 88027c81 stxr w2, w1, [x4] 68: 35ffffc2 cbnz w2, 60 <__lll_lock_wait+0x18> 6c: 34000120 cbz w0, 90 <__lll_lock_wait+0x48> 70: 521900a1 eor w1, w5, #0x80 74: aa0403e0 mov x0, x4 78: 93407c21 sxtw x1, w1 7c: d2800042 mov x2, #0x2 // #2 80: d2800003 mov x3, #0x0 // #0 84: d2800c48 mov x8, #0x62 // #98 88: d4000001 svc #0x0 8c: 17fffff4 b 5c <__lll_lock_wait+0x14> 90: d65f03c0 ret I see similar changes on powerpc and other architectures. It also aligns with x86_64 implementation by adding the systemtap probes. Checker on aarch64-linux-gnu. * nptl/lowlevellock.c (__lll_lock_wait, __lll_lock_wait_private): Optimize futex call and add systemtap probe.
* Add single-thread.h headerAdhemerval Zanella2019-05-148-79/+146
| | | | | | | | | | | | | | | | | | | | | | | | | This patch move the single-thread syscall optimization defintions from syscall-cancel.h to new header file single-thread.h and also move the cancellation definitions from pthreadP.h to syscall-cancel.h. The idea is just simplify the inclusion of both syscall-cancel.h and single-thread.h (without the requirement of including all pthreadP.h defintions). No semantic changes expected, checked on a build for all major ABIs. * nptl/pthreadP.h (CANCEL_ASYNC, CANCEL_RESET, LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET, __libc_enable_asynccancel, __libc_disable_asynccancel, __librt_enable_asynccancel, __libc_disable_asynccancel, __librt_enable_asynccancel, __librt_disable_asynccancel): Move to ... * sysdeps/unix/sysv/linux/sysdep-cancel.h: ... here. (SINGLE_THREAD_P, RTLD_SINGLE_THREAD_P): Move to ... * sysdeps/unix/sysv/linux/single-thread.h: ... here. * sysdeps/generic/single-thread.h: New file. * sysdeps/unix/sysdep.h: Include single-thread.h. * sysdeps/unix/sysv/linux/futex-internal.h: Include sysdep-cancel.h. * sysdeps/unix/sysv/linux/lowlevellock-futex.h: Likewise.
* Bug 24535: Update to Unicode 12.1.0Mike FABIAN2019-05-1316-237/+254
| | | | | | | | | | | | | | | | | | | Unicode 12.1.0 Support: Character encoding, character type info, and transliteration tables are all updated to Unicode 12.1.0, using the generator scripts contributed by Mike FABIAN (Red Hat). Some info about the number of characters added or changed: Total added characters in newly generated CHARMAP: 1 added: <U32FF> /xe3/x8b/xbf SQUARE ERA NAME REIWA Total added characters in newly generated WIDTH: 1 added: <U32FF> 2 : eaw=W category=So bidi=L name=SQUARE ERA NAME REIWA graph: Added 1 characters in new ctype which were not in old ctype graph: Added: ㋿ U+32FF SQUARE ERA NAME REIWA print: Added 1 characters in new ctype which were not in old ctype print: Added: ㋿ U+32FF SQUARE ERA NAME REIWA punct: Added 1 characters in new ctype which were not in old ctype punct: Added: ㋿ U+32FF SQUARE ERA NAME REIWA
* Fix tcache count maximum (BZ #24531)Wilco Dijkstra2019-05-103-4/+16
| | | | | | | | | | | | The tcache counts[] array is a char, which has a very small range and thus may overflow. When setting tcache_count tunable, there is no overflow check. However the tunable must not be larger than the maximum value of the tcache counts[] array, otherwise it can overflow when filling the tcache. [BZ #24531] * malloc/malloc.c (MAX_TCACHE_COUNT): New define. (do_set_tcache_count): Only update if count is small enough. * manual/tunables.texi (glibc.malloc.tcache_count): Document max value.
* sem_close: Use __twalk_rFlorian Weimer2019-05-102-13/+21
|
* support: Fix timespec printfAdhemerval Zanella2019-05-102-10/+17
| | | | | | | | | | | | | | | | | The patch print timespec members as intmax_t instead of long int. It avoid the -Werror=format= build issue on x32: timespec.c: In function 'test_timespec_before_impl': timespec.c:32:23: error: format '%ld' expects argument of type 'long int', but argument 4 has type '__time_t' {aka 'const long long int'} [-Werror=format=] Checked on x86_64-linux-gnu-x32, x86_64-linux-gnu, and i686-linux-gnu. * support/timespec.c (test_timespec_before_impl, test_timespec_equal_or_after_impl): print timespec member as intmax_t insted of long int. Reviewed-by: Florian Weimer <fweimer@redhat.com>
* nptl/tst-abstime: Use libsupportMike Crowe2019-05-092-52/+20
| | | | | | | | Checked on x86_64-linux-gnu and i686-linux-gnu. * nptl/tst-abstime.c: Use libsupport. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Convert some rwlock tests to use libsupportMike Crowe2019-05-095-386/+105
| | | | | | | | | | | | | | Checked on x86_64-linux-gnu and i686-linux-gnu. * nptl/tst-rwlock6.c: Use libsupport. This also happens to fix a small bug where only tv.tv_usec was checked which could cause an erroneous pass if pthread_rwlock_timedrdlock incorrectly took more than a second. * nptl/tst-rwlock7.c, nptl/tst-rwlock9.c, nptl/tst-rwlock14.c: Use libsupport. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Use recent additions to libsupport in tst-sem5Mike Crowe2019-05-092-16/+8
| | | | | | | | | Checked on x86_64-linux-gnu and i686-linux-gnu. * nptl/tst-sem5.c(do_test): Use xclock_gettime, timespec_add and TEST_TIMESPEC_NOW_OR_AFTER from libsupport. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Convert tst-cond11.c to use libsupportMike Crowe2019-05-092-133/+38
| | | | | | | | Checked on x86_64-linux-gnu and i686-linux-gnu. * nptl/tst-cond11.c: Use libsupport. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* support: Add timespec.hMike Crowe2019-05-097-0/+299
| | | | | | | | | | | | | | | | | | It adds useful functions for tests that use struct timespec. Checked on x86_64-linux-gnu and i686-linux-gnu. * support/timespec.h: New file. Provide timespec helper functions along with macros in the style of those in check.h. * support/timespec.c: New file. Implement check functions declared in support/timespec.h. * support/timespec-add.c: New file from gnulib containing timespec_add implementation that handles overflow. * support/timespec-sub.c: New file from gnulib containing timespec_sub implementation that handles overflow. * support/README: Mention timespec.h. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Move nptl/tst-eintr1 to xtestsSzabolcs Nagy2019-05-092-1/+11
| | | | | | | | | | Don't run nptl/tst-eintr1 by normal make check because it can spuriously break testing on various linux kernels. (Currently this affects the aarch64 glibc buildbot machine which regularly fails and loses test results.) [BZ #24537] * nptl/Makefile: Move tst-eintr1 to xtests.
* powerpc: trunc/truncf refactorAdhemerval Zanella2019-05-0933-665/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patches consolidates all the powerpc trunc{f} implementations on the generic sysdeps/powerpc/fpu/s_trunc{f}. The generic implementation uses either the compiler builts for ISA 2.03+ (which generates the frim instruction) or a generic implementation which uses FP only operations. The IFUNC organization for powerpc64 is also change to be enabled only for powerpc64 and not for powerpc64le (since minium ISA of 2.08 does not require the fallback generic implementation). Checked on powerpc-linux-gnu (built without --with-cpu, with --with-cpu=power4 and with --with-cpu=power5+ and --disable-multi-arch), powerpc64-linux-gnu (built without --with-cp and with --with-cpu=power5+ and --disable-multi-arch). * sysdeps/powerpc/fpu/trunc_to_integer.h (set_fenv_mode): Add TRUNC handling. (round_mode): Add definition for TRUNC. * sysdeps/powerpc/fpu/s_trunc.c: New file. * sysdeps/powerpc/fpu/s_truncf.c: New file. * sysdeps/powerpc/powerpc32/fpu/s_trunc.S: Remove file. * sysdeps/powerpc/powerpc32/fpu/s_truncf.S: Likewise. * sysdep/powerpc/powepc32/power4/fpu/multiarch/s_trunc-power5+.S: Likewise. * sysdep/powerpc/powepc32/power4/fpu/multiarch/s_trunc-ppc32.S: Likewise. * sysdep/powerpc/powepc32/power4/fpu/multiarch/s_truncf-power5+.S: Likewise. * sysdep/powerpc/powepc32/power4/fpu/multiarch/s_truncf-ppc32.S: Likewise. * sysdep/powerpc/powepc32/power4/fpu/multiarch/s_trunc-power5+.c: New file. * sysdep/powerpc/powepc32/power4/fpu/multiarch/s_trunc-ppc32.c: Likewise. * sysdep/powerpc/powepc32/power4/fpu/multiarch/s_truncf-power5+.c: Likewise. * sysdep/powerpc/powepc32/power4/fpu/multiarch/s_truncf-ppc32.c: Likewise. * sysdep/powerpc/powerpc32/power5+/fpu/s_trunc.S: Remove file. * sysdep/powerpc/powerpc32/power5+/fpu/s_truncf.S: Likewise. * sysdep/powerpc/powerpc64/be/fpu/multiarch/Makefile (libm-sysdep_routines): Add s_trunc-power5+, s_trunc-ppc64, s_truncf-power5+, and s_truncf-ppc64. (CFLAGS-s_trunc-power5+.c, CFLAGS-s_truncf-power5+.c): New rule. * sysdep/powerpc/powercp64/be/fpu/multiarch/s_trunc-power5+.c: New file. * sysdep/powerpc/powercp64/be/fpu/multiarch/s_trunc-ppc64.c: Likewise. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_trunc.c: Move to ... * sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_trunc.c: ... here. * sysdep/powerpc/powercp64/be/fpu/multiarch/s_truncf-power5+.c: New file. * sysdep/powerpc/powercp64/be/fpu/multiarch/s_truncf-ppc64.c: Likewise. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_truncf.c: Move to ... * sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_truncf.c: ... here. * sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile (libm-sysdep_routines): Remove s_trunc-power5+, s_trunc-ppc64, s_truncf-power5+, and s_truncf-ppc64. * sysdep/powerpc/powerpc64/fpu/multiarch/s_trunc-power5+.S: Remove file. * sysdep/powerpc/powerpc64/fpu/multiarch/s_trunc-ppc64.S: Likewise. * sysdep/powerpc/powerpc64/fpu/multiarch/s_truncf-power5+.S: Likewise. * sysdep/powerpc/powerpc64/fpu/multiarch/s_truncf-ppc64.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_trunc.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_truncf.S: Likewise. * sysdep/powerpc/powerpc64/power5+/fpu/s_trunc.S: Likewise. * sysdep/powerpc/powerpc64/power5+/fpu/s_truncf.S: Likewise. Reviewed-by: Gabriel F. T. Gomes <gabriel@inconstante.eti.br>
* powerpc: round/roundf refactorAdhemerval Zanella2019-05-0932-704/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patches consolidates all the powerpc round{f} implementations on the generic sysdeps/powerpc/fpu/s_round{f}. The generic implementation uses either the compiler builts for ISA 2.03+ (which generates the frim instruction) or a generic implementation which uses FP only operations. The IFUNC organization for powerpc64 is also change to be enabled only for powerpc64 and not for powerpc64le (since minium ISA of 2.08 does not require the fallback generic implementation). Checked on powerpc-linux-gnu (built without --with-cpu, with --with-cpu=power4 and with --with-cpu=power5+ and --disable-multi-arch), powerpc64-linux-gnu (built without --with-cp and with --with-cpu=power5+ and --disable-multi-arch). * sysdeps/powerpc/fpu/round_to_integer.h (set_fenv_mode): Add ROUND handling. (round_mode): Add definition for ROUND. (round_to_integer_float): Likewise. * sysdeps/powerpc/fpu/s_round.c: New file. * sysdeps/powerpc/fpu/s_roundf.c: New file. * sysdeps/powerpc/powerpc32/fpu/s_round.S: Remove file. * sysdeps/powerpc/powerpc32/fpu/s_roundf.S: Likewise. * sysdep/powerpc/powepc32/power4/fpu/multiarch/s_round-power5+.S: Likewise. * sysdep/powerpc/powepc32/power4/fpu/multiarch/s_round-ppc32.S: Likewise. * sysdep/powerpc/powepc32/power4/fpu/multiarch/s_roundf-power5+.S: Likewise. * sysdep/powerpc/powepc32/power4/fpu/multiarch/s_roundf-ppc32.S: Likewise. * sysdep/powerpc/powepc32/power4/fpu/multiarch/s_round-power5+.c: New file. * sysdep/powerpc/powepc32/power4/fpu/multiarch/s_round-ppc32.c: Likewise. * sysdep/powerpc/powepc32/power4/fpu/multiarch/s_roundf-power5+.c: Likewise. * sysdep/powerpc/powepc32/power4/fpu/multiarch/s_roundf-ppc32.c: Likewise. * sysdep/powerpc/powerpc32/power5+/fpu/s_round.S: Remove file. * sysdep/powerpc/powerpc32/power5+/fpu/s_roundf.S: Likewise. * sysdep/powerpc/powerpc64/be/fpu/multiarch/Makefile (libm-sysdep_routines): Add s_round-power5+, s_round-ppc64, s_roundf-power5+, and s_roundf-ppc64. (CFLAGS-s_round-power5+.c, CFLAGS-s_roundf-power5+.c): New rule. * sysdep/powerpc/powercp64/be/fpu/multiarch/s_round-power5+.c: New file. * sysdep/powerpc/powercp64/be/fpu/multiarch/s_round-ppc64.c: Likewise. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_round.c: Move to ... * sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_round.c: ... here. * sysdep/powerpc/powercp64/be/fpu/multiarch/s_roundf-power5+.c: New file. * sysdep/powerpc/powercp64/be/fpu/multiarch/s_roundf-ppc64.c: Likewise. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_roundf.c: Move to ... * sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_roundf.c: ... here. * sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile (libm-sysdep_routines): Remove s_round-power5+, s_round-ppc64, s_roundf-power5+, and s_roundf-ppc64. * sysdep/powerpc/powerpc64/fpu/multiarch/s_round-power5+.S: Remove file. * sysdep/powerpc/powerpc64/fpu/multiarch/s_round-ppc64.S: Likewise. * sysdep/powerpc/powerpc64/fpu/multiarch/s_roundf-power5+.S: Likewise. * sysdep/powerpc/powerpc64/fpu/multiarch/s_roundf-ppc64.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_round.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_roundf.S: Likewise. * sysdep/powerpc/powerpc64/power5+/fpu/s_round.S: Likewise. * sysdep/powerpc/powerpc64/power5+/fpu/s_roundf.S: Likewise. Reviewed-by: Gabriel F. T. Gomes <gabriel@inconstante.eti.br>
* powerpc: floor/floorf refactorAdhemerval Zanella2019-05-0932-633/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patches consolidates all the powerpc floor{f} implementations on the generic sysdeps/powerpc/fpu/s_floor{f}. The generic implementation uses either the compiler builts for ISA 2.03+ (which generates the frim instruction) or a generic implementation which uses FP only operations. The IFUNC organization for powerpc64 is also change to be enabled only for powerpc64 and not for powerpc64le (since minium ISA of 2.08 does not require the fallback generic implementation). Checked on powerpc-linux-gnu (built without --with-cpu, with --with-cpu=power4 and with --with-cpu=power5+ and --disable-multi-arch), powerpc64-linux-gnu (built without --with-cp and with --with-cpu=power5+ and --disable-multi-arch). * sysdeps/powerpc/fpu/round_to_integer.h (set_fenv_mode): Add FLOOR option. (round_mode): Add definition for FLOOR. * sysdeps/powerpc/fpu/s_floor.c: New file. * sysdeps/powerpc/fpu/s_floorf.c: Likewise. * sysdeps/powerpc/powerpc32/fpu/s_floor.S: Remove file. * sysdeps/powerpc/powerpc32/fpu/s_floorf.S: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floor-power5+.S: Remove file. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floor-ppc32.S: Likewise * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floorf-power5+.S: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floorf-ppc32.S: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floor-power5+.c: New file. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floor-ppc32.c: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floorf-power5+.c: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floorf-ppc32.c: Likewise. * sysdeps/powerpc/powerpc32/power5+/fpu/s_floor.S: Remove file. * sysdeps/powerpc/powerpc32/power5+/fpu/s_floorf.S: Remove file. * sysdeps/powerpc/powerpc64/be/fpu/multiarch/Makefile (libm-sysdep_routines): Add s_floor-power5+, s_floor-ppc64, s_floorf-power5+, and s_floorf-ppc64. (CFLAGS-s_floor-power5+.c, CFLAGS-s_floorf-power5+.c): New rule. * sysdep/powerpc/powerpc64/be/fpu/multiarch/s_floor-power5+.c: New file. * sysdep/powerpc/powerpc64/be/fpu/multiarch/s_floor-ppc64.c: Likewise. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_floor.c: Move to ... * sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_floor.c: ... here. * sysdep/powerpc/powerpc64/be/fpu/multiarch/s_floorf-power5+.c: New file. * sysdep/powerpc/powerpc64/be/fpu/multiarch/s_floorf-ppc64.c: Likewise. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_floorf.c: Move to ... * sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_floorf.c: ... here. * sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile (libm-sysdep_routines): Remove s_floor-power5+, s_floor-ppc64, s_floorf-power5+, and s_floorf-ppc64. * sysdep/powerpc/powerpc64/fpu/multiarch/s_floor-power5+.S: Remove file. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_floor-ppc64.S: Remove file. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_floorf-power5+.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_floorf-ppc64.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_floor.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_floorf.S: Likewise. * sysdeps/powerpc/powerpc64/power5+/fpu/s_floor.S: Likewise. * sysdeps/powerpc/powerpc64/power5+/fpu/s_floorf.S: Likewise. Reviewed-by: Gabriel F. T. Gomes <gabriel@inconstante.eti.br>
* support: Add xclock_gettimeMike Crowe2019-05-085-0/+78
| | | | | | | | | | | | * support/xclock_gettime.c (xclock_gettime): New file. Provide clock_gettime wrapper for use in tests that fails the test rather than returning failure. * support/xtime.h: New file to declare xclock_gettime. * support/Makefile: Add xclock_gettime.c. * support/README: Mention xtime.h.
* malloc/tst-mallocfork2: Use process-shared barriersFlorian Weimer2019-05-083-52/+106
| | | | | | | | | | This synchronization method has a lower overhead and makes it more likely that the signal arrives during one of the critical functions. Also test for fork deadlocks explicitly. Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
* Update syscall-names.list for Linux 5.1.Joseph Myers2019-05-072-2/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch updates syscall-names.list for Linux 5.1 (which has many new syscalls, mainly but not entirely ones for 64-bit time). Tested with build-many-glibcs.py (before the revert of the move to Linux 5.1 there; verified there were no tst-syscall-list failures). * sysdeps/unix/sysv/linux/syscall-names.list: Update kernel version to 5.1. (clock_adjtime64) New syscall. (clock_getres_time64) Likewise. (clock_gettime64) Likewise. (clock_nanosleep_time64) Likewise. (clock_settime64) Likewise. (futex_time64) Likewise. (io_pgetevents_time64) Likewise. (io_uring_enter) Likewise. (io_uring_register) Likewise. (io_uring_setup) Likewise. (mq_timedreceive_time64) Likewise. (mq_timedsend_time64) Likewise. (pidfd_send_signal) Likewise. (ppoll_time64) Likewise. (pselect6_time64) Likewise. (recvmmsg_time64) Likewise. (rt_sigtimedwait_time64) Likewise. (sched_rr_get_interval_time64) Likewise. (semtimedop_time64) Likewise. (timer_gettime64) Likewise. (timer_settime64) Likewise. (timerfd_gettime64) Likewise. (timerfd_settime64) Likewise. (utimensat_time64) Likewise.
* Revert "Use Linux 5.1 in build-many-glibcs.py."Joseph Myers2019-05-072-4/+1
| | | | | | | | | This reverts commit c2b11710fb4a2e8d337ae8f042724143c5ccf173. Linux 5.1 headers are not in fact usable for glibc testing, because "[PATCH] uapi: avoid namespace conflict in linux/posix_types.h" <https://lore.kernel.org/lkml/20190319165123.3967889-1-arnd@arndb.de/> did not get merged for 5.1 and so many conform/ tests fail.
* Use Linux 5.1 in build-many-glibcs.py.Joseph Myers2019-05-072-1/+4
| | | | | * scripts/build-many-glibcs.py (Context.checkout): Default Linux version to 5.1.
* Use GCC 9 in build-many-glibcs.py.Joseph Myers2019-05-072-1/+6
| | | | | * scripts/build-many-glibcs.py (Context.checkout): Default GCC version to 9 branch.