summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv
Commit message (Collapse)AuthorAgeFilesLines
* nptl: Move pthread_getspecific, __pthread_getspecific into libcFlorian Weimer2021-03-1861-58/+128
| | | | The symbols have been moved using scripts/move-symbol-to-libc.py.
* nptl: Move pthread_key_create, __pthread_key_create into libcFlorian Weimer2021-03-1861-58/+128
| | | | The symbols have been moved using scripts/move-symbol-to-libc.py.
* nptl: Move part of TCB initialization from libpthread to __tls_init_tpFlorian Weimer2021-03-181-29/+0
| | | | | | | | | | | | | | | | | This initalization should only happen once for the main thread's TCB. At present, auditors can achieve this by not linking against libpthread. If libpthread becomes part of libc, doing this initialization in libc would happen for every audit namespace, or too late (if it happens from the main libc only). That's why moving this code into ld.so seems the right thing to do, right after the TCB initialization. For !__ASSUME_SET_ROBUST_LIST ports, this also moves the symbol __set_robust_list_avail into ld.so, as __nptl_set_robust_list_avail. It also turned into a proper boolean flag. Inline the __pthread_initialize_pids function because it seems no longer useful as a separate function.
* nptl: Move pthread_setcanceltype into libcFlorian Weimer2021-03-1829-29/+0
| | | | | | | | No new symbol version is required because there was a forwarder. The symbol has been moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Move pthread_setcancelstate into libcFlorian Weimer2021-03-1831-35/+3
| | | | | | | | No new symbol version is required because there was a forwarder. The symbol has been moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Move pthread_exit into libcFlorian Weimer2021-03-1829-29/+0
| | | | | | | | | | | | | | The pthread_exit symbol was moved using scripts/move-symbol-to-libc.py. No new symbol version is needed because there was a forwarder. The new tests nptl/tst-pthread_exit-nothreads and nptl/tst-pthread_exit-nothreads-static exercise the scenario that pthread_exit is called without libpthread having been linked in. This is not possible for the generic code, so these tests do not live in sysdeps/pthread for now. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Move __pthread_unwind_next into libcFlorian Weimer2021-03-1863-56/+65
| | | | | | | | | | | | | | | | | | | It's necessary to stub out __libc_disable_asynccancel and __libc_enable_asynccancel via rtld-stubbed-symbols because the new direct references to the unwinder result in symbol conflicts when the rtld exception handling from libc is linked in during the construction of librtld.map. unwind-forcedunwind.c is merged into unwind-resume.c. libc now needs the functions that were previously only used in libpthread. The GLIBC_PRIVATE exports of __libc_longjmp and __libc_siglongjmp are no longer needed, so switch them to hidden symbols. The symbol __pthread_unwind_next has been moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerva Zanella <adhemerval.zanella@linaro.org>
* nptl: Move pthread_once and __pthread_once into libcFlorian Weimer2021-03-1861-58/+128
| | | | | | | | | | | And also the fork generation counter, __fork_generation. This eliminates the need for __fork_generation_pointer. call_once remains in libpthread and calls the exported __pthread_once symbol. pthread_once and __pthread_once have been moved using scripts/move-symbol-to-libc.py.
* nptl: Move __pthread_cleanup_upto into libcFlorian Weimer2021-03-181-5/+2
| | | | | | | | This internal symbol is used as part of the longjmp implementation. Rename the file from nptl/pt-cleanup.c to nptl/pthread_cleanup_upto.c so that the pt-* files remain restricted to libpthread. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* x86: Restore compile-time check for shadow stack pointer in longjmpAdhemerval Zanella2021-03-181-0/+39
|
* nptl: Remove longjmp, siglongjmp from libpthreadFlorian Weimer2021-03-1829-153/+28
| | | | | | | | | | | | | | The definitions in libc are sufficient, the forwarders are no longer needed. The symbols have been moved using scripts/move-symbol-to-libc.py. s390-linux-gnu and s390x-linux-gnu need a new version placeholder to keep the GLIBC_2.19 symbol version in libpthread. Tested on i386-linux-gnu, powerpc64le-linux-gnu, s390x-linux-gnu, x86_64-linux-gnu. Built with build-many-glibcs.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Move legacy cancelation handling into libc as compat symbolsFlorian Weimer2021-03-1861-116/+128
| | | | | | | | | | | | | | | This affects _pthread_cleanup_pop, _pthread_cleanup_pop_restore, _pthread_cleanup_push, _pthread_cleanup_push_defer. The symbols have been moved using scripts/move-symbol-to-libc.py. No new symbol versions are added because the symbols are turned into compatibility symbols at the same time. __pthread_cleanup_pop and __pthread_cleanup_push are added as GLIBC_PRIVATE symbols because they are also used internally, for glibc's own cancellation handling. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Move __pthread_cleanup_routine into libcFlorian Weimer2021-03-1861-29/+64
| | | | Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Move pthread_mutex_consistent into libcFlorian Weimer2021-03-1861-58/+96
| | | | | | And deprecated pthread_mutex_consistent_np, its old name. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* signal: Add __libc_sigactionAdhemerval Zanella2021-03-188-9/+7
| | | | | | | | The generic implementation basically handle the system agnostic logic (filtering out the invalid signals) while the __libc_sigaction is the function with implements the system and architecture bits. Checked on x86_64-linux-gnu and i686-linux-gnu.
* nptl: Move system to libcAdhemerval Zanella2021-03-1825-25/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Move fcntl from libpthreadAdhemerval Zanella2021-03-1826-52/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove sendmsg from libpthreadAdhemerval Zanella2021-03-1829-29/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove recvmsg from libpthreadAdhemerval Zanella2021-03-1829-29/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove sigwait from libpthreadAdhemerval Zanella2021-03-1829-29/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove tcdrain from libpthreadAdhemerval Zanella2021-03-1829-29/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove pause from libpthreadAdhemerval Zanella2021-03-1829-29/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove msync from libpthreadAdhemerval Zanella2021-03-1829-29/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove fsync from libpthreadAdhemerval Zanella2021-03-1829-29/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove sendto from libpthreadAdhemerval Zanella2021-03-1829-29/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove recvfrom from libpthreadAdhemerval Zanella2021-03-1829-29/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove recv from libpthreadAdhemerval Zanella2021-03-1829-29/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove connect from libpthreadAdhemerval Zanella2021-03-1829-58/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove accept from libpthreadAdhemerval Zanella2021-03-1829-29/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove close from libpthreadAdhemerval Zanella2021-03-1829-58/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove read from libpthreadAdhemerval Zanella2021-03-1829-58/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove write from libpthreadAdhemerval Zanella2021-03-1829-58/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Move fork into libcAdhemerval Zanella2021-03-1225-50/+0
| | | | | | | | This is part of the libpthread removal project: <https://sourceware.org/ml/libc-alpha/2019-10/msg00080.html> Checked on x86_64-linux-gnu.
* nptl: Move Linux pthread_kill to nptlAdhemerval Zanella2021-03-121-57/+0
| | | | | | | The nptl already expects a Linux syscall internally. Also __is_internal_signal is used and the DEBUGGING_P check is removed. Checked on x86_64-linux-gnu.
* io: Return UNSUPPORTED if filesystem do not support 64 bit timestampsAdhemerval Zanella2021-03-123-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some Linux filesystems might not fully support 64 bit timestamps [1], which make some Linux specific tests to fail when they check for the functionality. This patch adds a new libsupport function, support_path_support_time64, that returns whether the target file supports or not 64 bit timestamps. The support is checked by issuing a utimensat and verifying both the last access and last modification time against a statx call. The tests that might fail are also adjusted to check the file support as well: $ dd if=/dev/zero of=loopbackfile.img bs=100M count=1 1+0 records in 1+0 records out 104857600 bytes (105 MB, 100 MiB) copied, 0,0589568 s, 1,8 GB/s $ sudo losetup -fP loopbackfile.img $ mkfs.xfs loopbackfile.img meta-data=loopbackfile.img isize=512 agcount=4, agsize=6400 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=1, sparse=1, rmapbt=0 = reflink=1 data = bsize=4096 blocks=25600, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0, ftype=1 log =internal log bsize=4096 blocks=1368, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 $ mkdir loopfs $ sudo mount -o loop /dev/loop0 loopfs/ $ sudo chown -R azanella:azanella loopfs $ TMPDIR=loopfs/ ./testrun.sh misc/tst-utimes error: ../sysdeps/unix/sysv/linux/tst-utimes.c:55: File loopfs//utimesfECsK1 does not support 64-bit timestamps [1] https://bugzilla.redhat.com/show_bug.cgi?id=1795576
* io: Return EBAFD for negative file descriptor on fstat (BZ #27559)Adhemerval Zanella2021-03-112-0/+18
| | | | | | | | Now that fstat is implemented on top fstatat we need to handle negative inputs. The implementation now rejects AT_FDCWD, which would otherwise be accepted by the kernel. Checked on x86_64-linux-gnu and on i686-linux-gnu.
* Update kernel version to 5.11 in tst-mman-consts.py.Joseph Myers2021-03-101-1/+1
| | | | | | | | This patch updates the kernel version in the test tst-mman-consts.py to 5.11. (There are no new MAP_* constants covered by this test in 5.11 that need any other header changes.) Tested with build-many-glibcs.py.
* Linux: misc/tst-ofdlocks-compat can be a regular testFlorian Weimer2021-03-092-9/+7
| | | | | | | | Now that compat_symbol_reference works in non-internal tests. Also do not build and run the test at all on architectures which do not have the pre-2.28 symbol version of fcntl. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Linux: dirent/tst-readdir64-compat can be a regular testFlorian Weimer2021-03-092-6/+5
| | | | | | | | | | compat_symbol_reference works in non-internal tests now. Also avoid building the test for unsupported configurations at all. I verified by building with build-many-glibcs.py that GLIBC_2.1.3 works as the predecessor of GLIBC_2.2. (Symbol versions in the early days are complex.) Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* tst: Add test for ntp_adjtimeLukasz Majewski2021-03-082-1/+23
| | | | | | This test is a wrapper on tst-clock_adjtime test. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* tst: Add test for adjtimexLukasz Majewski2021-03-082-1/+23
| | | | | | This test is a wrapper on tst-clock_adjtime test. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* tst: Modify tst-clock_adjtime to allow reuse of its codeLukasz Majewski2021-03-081-1/+5
| | | | | | | The tst-clock_adjtime can be adjusted to be reused for also testing adjtimex. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* tst: Add test for clock_adjtimeLukasz Majewski2021-03-082-1/+59
| | | | | | | | | | | This code privides test to check if time on target machine is properly adjusted. The time is altered only when cross-test-ssh.sh is executed with --allow-time-setting flag. As the delta added to CLOCK_REALTIME is only 1 sec the original time is not restored and further tests are executed with this bias. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* linux: Fix __thrd_sleep64 hidden definitionAdhemerval Zanella2021-03-052-2/+2
| | | | The symbol is exported by libc.
* tst: Fix tst-timerfd testLukasz Majewski2021-03-021-11/+4
| | | | | | | | | | | | | | | | | | | There were following problems discovered for tst-timerfd test: 1. Do not set the struct itimerspec's it_interval tv_sec to 2 seconds. After this change the timerfd will trigger only once (the it_value is only set in this case). 2. The 'val1' variable (including the call to timerfd_gettime) is not needed anymore, as it is just enough to read the struct itimerspec after sleep. As a consequence the 'val2' has been renamed to 'val'. 3. After calling timerfd_gettime, the value of struct itimerspec time, when timer is running, is the remaining time. In the case of this test it would be less than 1 second. As a result the TEST_COMPARE macro logic had to be adjusted. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* ld.so: Implement the --list-diagnostics optionFlorian Weimer2021-03-021-0/+77
|
* tst: Add test for utimesLukasz Majewski2021-03-022-1/+89
| | | | | | | | | | | This patch provides test for utimes. It uses wrapper to read access and modification times to compare them with ones written by utimes. Moreover, access and modification times beyond the Y2038 threshold date (i.e. 32 bit time_t overflow) are also checked. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* tst: Add test for utimeLukasz Majewski2021-03-022-1/+88
| | | | | | | | | | This patch provides test for utime. It uses wrapper to read access and modification times to compare them with ones written by utime. Moreover, access and modification times beyond the Y2038 threshold date (i.e. 32 bit time_t overflow) are also checked. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* tst: Add test for futimensLukasz Majewski2021-03-022-1/+85
| | | | | | | | | | | This patch provides test for futimens. It uses wrapper, which reads access and modification time to compare them with ones written by futimens. Moreover, access and modification times beyond the Y2038 threshold date (i.e. 32 bit time_t overflow) are also checked. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Use <unwind-link.h> for accessing the libgcc_s unwinderFlorian Weimer2021-03-011-14/+2
| | | | Reviewed-by: Carlos O'Donell <carlos@redhat.com>