about summary refs log tree commit diff
path: root/sysdeps
Commit message (Collapse)AuthorAgeFilesLines
...
* nss: Add function types and NSS_DECLARE_MODULE_FUNCTIONS macro to <nss.h>Florian Weimer2020-02-131-15/+3
| | | | | | | This macro allows to add type safety to the implementation of NSS service modules. Reviewed-by: DJ Delorie <dj@redhat.com>
* Avoid ldbl-96 stack corruption from range reduction of pseudo-zero (bug 25487).Joseph Myers2020-02-123-1/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug 25487 reports stack corruption in ldbl-96 sinl on a pseudo-zero argument (an representation where all the significand bits, including the explicit high bit, are zero, but the exponent is not zero, which is not a valid representation for the long double type). Although this is not a valid long double representation, existing practice in this area (see bug 4586, originally marked invalid but subsequently fixed) is that we still seek to avoid invalid memory accesses as a result, in case of programs that treat arbitrary binary data as long double representations, although the invalid representations of the ldbl-96 format do not need to be consistently handled the same as any particular valid representation. This patch makes the range reduction detect pseudo-zero and unnormal representations that would otherwise go to __kernel_rem_pio2, and returns a NaN for them instead of continuing with the range reduction process. (Pseudo-zero and unnormal representations whose unbiased exponent is less than -1 have already been safely returned from the function before this point without going through the rest of range reduction.) Pseudo-zero representations would previously result in the value passed to __kernel_rem_pio2 being all-zero, which is definitely unsafe; unnormal representations would previously result in a value passed whose high bit is zero, which might well be unsafe since that is not a form of input expected by __kernel_rem_pio2. Tested for x86_64.
* mips: Fix argument passing for inlined syscalls on Linux [BZ #25523]WANG Xuerui2020-02-123-52/+104
| | | | | | | | | | | | | | According to [gcc documentation][1], temporary variables must be used for the desired content to not be call-clobbered. Fix the Linux inline syscall templates by adding temporary variables, much like what x86 did before (commit 381a0c26d73e0f074c962e0ab53b99a6c327066d). Tested with gcc 9.2.0, both cross-compiled and natively on Loongson 3A4000. [1]: https://gcc.gnu.org/onlinedocs/gcc/Local-Register-Variables.html
* mips: Use 'long int' and 'long long int' in linux syscall codeWANG Xuerui2020-02-1214-220/+230
| | | | Style fixes only, no functional change.
* alpha: Use generic gettimeofday implementationAdhemerval Zanella2020-02-122-2/+8
| | | | | | | | | It makes alpha no longer reports information about a system-wide time zone and moves the version logic on the alpha implementation. Checked on a build and check-abi for alpha-linux-gnu. Reviewed-by: Lukasz Majewski <lukma@denx.de>
* Rename RWF_WRITE_LIFE_NOT_SET to RWH_WRITE_LIFE_NOT_SET following Linux 5.5.Joseph Myers2020-02-121-1/+2
| | | | | | | | Linux 5.5 renames RWF_WRITE_LIFE_NOT_SET to RWH_WRITE_LIFE_NOT_SET, with the old name kept as an alias. This patch makes the corresponding change in glibc. Tested for x86_64.
* S390: Fix non-ascii character in fenv.h.Stefan Liebler2020-02-121-2/+2
| | | | | | | | | | | | | | | | | The comment "isn't" contained a non-ascii character which leads to an error if compiled with -finput-charset=ascii: error: failure to convert ascii to UTF-8 This is observable in GCC testsuite: FAIL: 17_intro/headers/c++1998/charset.cc (test for excess errors) FAIL: 17_intro/headers/c++2011/charset.cc (test for excess errors) FAIL: 17_intro/headers/c++2014/charset.cc (test for excess errors) FAIL: 17_intro/headers/c++2017/charset.cc (test for excess errors) FAIL: 17_intro/headers/c++2020/charset.cc (test for excess errors) Also rewrite the comment above. Reported-by: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
* Linux: Emulate fchmodat with AT_SYMLINK_NOFOLLOW using O_PATH [BZ #14578]Florian Weimer2020-02-121-10/+47
| | | | | /proc/self/fd files are special and chmod on O_PATH descriptors in that directory operates on the symbolic link itself (like lchmod).
* io: Implement lchmod using fchmodat [BZ #14578]Florian Weimer2020-02-122-0/+2
|
* htl C11 threads: Avoid pthread_ symbols visibility in static librarySamuel Thibault2020-02-1035-38/+34
|
* hurd: Add __pthread_spin_wait and use itSamuel Thibault2020-02-1117-24/+33
| | | | | | | | | 900778283ac3 ("htl: make pthread_spin_lock really spin") made pthread_spin_lock really spin and not block, but the current users of __pthread_spin_lock were assuming that it blocks, i.e. they use it as a lightweight mutex fitting in just one int. __pthread_spin_wait provides that support back.
* ldbl-128ibm-compat: set PRINTF_CHK flag in {,v}sprintf_chkPaul E. Murphy2020-02-102-0/+8
| | | | | | | This should be unconditionally set to match the common implementation, and fixes multiple test failures related to sprintf. Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
* nptl: update default pthread-offsets.hAndreas Schwab2020-02-101-16/+6
| | | | | Remove unused definitions, and correct __PTHREAD_RWLOCK_FLAGS_OFFSET for __WORDSIZE == 64.
* nptl: add missing pthread-offsets.hAndreas Schwab2020-02-105-0/+25
| | | | | All architectures using their own definition of struct __pthread_rwlock_arch_t need to provide their own pthread-offsets.h.
* pthread: Move some join tests from nptl to sysdeps/pthreadSamuel Thibault2020-02-107-0/+516
| | | | So they can be checked with htl too.
* pthread: Move most barrier tests from nptl to sysdeps/pthreadSamuel Thibault2020-02-106-0/+531
| | | | So they can be checked with htl too.
* htl: Fix barrier_wait with one threadSamuel Thibault2020-02-101-1/+3
|
* pthread: Move most sem tests from nptl to sysdeps/pthreadSamuel Thibault2020-02-1014-0/+1205
| | | | So they can be checked with htl too.
* htl: Make sem_wait/sem_timedwait interruptibleSamuel Thibault2020-02-105-9/+37
|
* htl: Make sem_open return ENOSYSSamuel Thibault2020-02-101-1/+1
| | | | instead of EOPNOTSUPP, which is for sockets.
* htl: Add support for semaphore maximum valueSamuel Thibault2020-02-102-0/+10
|
* pthread: Move key tests from nptl to sysdeps/pthreadSamuel Thibault2020-02-105-0/+497
| | | | So they can be checked with htl too.
* hurd: Make nanosleep a cancellation pointSamuel Thibault2020-02-101-0/+5
|
* htl: Add support for libc cancellation pointsSamuel Thibault2020-02-102-2/+19
|
* htl: clean __pthread_get_cleanup_stack hidden protoSamuel Thibault2020-02-101-1/+1
|
* htl: XFAIL rwlock tests which need pshared supportSamuel Thibault2020-02-091-0/+2
|
* pthread: Move some rwlock tests from nptl to sysdeps/pthreadSamuel Thibault2020-02-098-0/+1106
| | | | So they can be checked with htl too.
* pthread: Move most once tests from nptl to sysdeps/pthreadSamuel Thibault2020-02-097-0/+525
| | | | So they can be checked with htl too.
* htl: support cancellation during pthread_onceSamuel Thibault2020-02-091-0/+10
|
* pthread: Move most cond tests from nptl to sysdeps/pthreadSamuel Thibault2020-02-0930-0/+3789
| | | | So they can be checked with htl too.
* htl: make pthread_cond_destroy return EBUSY on waitersSamuel Thibault2020-02-091-1/+8
|
* htl: Report missing mutex lock on pthread_cond_*waitSamuel Thibault2020-02-092-0/+55
|
* pthread: Move some attr tests from nptl to sysdeps/pthreadSamuel Thibault2020-02-092-0/+306
| | | | So they can be checked with htl too.
* htl: Fix default guard sizeSamuel Thibault2020-02-092-1/+5
| | | | | When it is not hardcoded by the architecture with PAGESIZE, we need to use the dynamic values from __vm_page_size.
* pthread: Move most mutex tests from nptl to sysdeps/pthreadSamuel Thibault2020-02-099-1/+1468
| | | | | | So they can be checked with htl too. XFAIL tst-mutex4, for which support is still missing in htl.
* pthread: Move spin tests from nptl to sysdeps/pthreadSamuel Thibault2020-02-095-0/+376
| | | | So they can be checked with htl too.
* htl: make pthread_spin_lock really spinSamuel Thibault2020-02-091-1/+1
| | | | | __spin_lock would actually use gsync_wait to block, which is not what pthread_spin_lock is about.
* htl: Avoid check-installed-headers looking at inlinesSamuel Thibault2020-02-091-2/+4
|
* htl: Do not put spin_lock inlines in public headersSamuel Thibault2020-02-092-36/+36
| | | | | | They were not getting used anyway. Also do not make libsupport use them, it would make tests using it have to be made to link against libmachuser for gsync_wait.
* pthread: Move basic tests from nptl to sysdeps/pthreadSamuel Thibault2020-02-098-1/+675
| | | | So they can be checked with htl too.
* htl: Fix calling pthread_exit in the child of a forkSamuel Thibault2020-02-091-0/+9
| | | | | We need to reset the threads counter, otherwise pthread_exit() would not call exit(0).
* x86: Remove <bits/select.h> and use the generic versionFlorian Weimer2020-02-091-63/+0
| | | | | | Particularly on CPUs without ERMS, the string instructions are slow, so it is unclear whether this architecture-specific implementation is in fact an optimization.
* C11 threads: Move implementation to sysdeps/pthreadSamuel Thibault2020-02-0947-64/+1633
| | | | | | | so it gets shared by nptl and htl. Also add htl versions of thrd_current and thrd_yield. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* htl: Add C11 threads types definitionsSamuel Thibault2020-02-091-0/+13
|
* nptl: Move nptl-specific types to separate headerSamuel Thibault2020-02-092-8/+15
| | | | Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* htl: Make __PTHREAD_ONCE_INIT more flexibleSamuel Thibault2020-02-092-2/+2
| | | | | | by moving its (struct __pthread_once) cast into PTHREAD_ONCE_INIT. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* htl: Add support for C11 threads behaviorSamuel Thibault2020-02-091-0/+3
| | | | | | | Essentially properly calling the thread function which returns an int instead of a void*. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* htl: Add missing internal functions declarationsSamuel Thibault2020-02-091-0/+13
|
* htl: Rename _pthread_mutex_init/destroy to __pthread_mutex_init/destroySamuel Thibault2020-02-094-8/+9
|
* htl: Move internal mutex/rwlock symbols to GLIBC_PRIVATESamuel Thibault2020-02-091-7/+0
| | | | | Their prototypes have never been made public, and they are not used outside libc (checked on the whole Debian archive)