about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* elf: ld.so --help calls _dl_init_paths without a main map [BZ #27577]Florian Weimer2021-03-152-3/+23
| | | | | | | | | | | In this case, use the link map of the dynamic loader itself as a replacement. This is more than just a hack: if we ever support DT_RUNPATH/DT_RPATH for the dynamic loader, reporting it for ld.so --help (without further command line arguments) would be the right thing to do. Fixes commit 332421312576bd7095e70589154af99b124dd2d1 ("elf: Always set l in _dl_init_paths (bug 23462)").
* x86: Handle _SC_LEVEL1_ICACHE_LINESIZE [BZ #27444]H.J. Lu2021-03-157-0/+79
| | | | | | | | | | | | | | | | | commit 2d651eb9265d1366d7b9e881bfddd46db9c1ecc4 Author: H.J. Lu <hjl.tools@gmail.com> Date: Fri Sep 18 07:55:14 2020 -0700 x86: Move x86 processor cache info to cpu_features missed _SC_LEVEL1_ICACHE_LINESIZE. 1. Add level1_icache_linesize to struct cpu_features. 2. Initialize level1_icache_linesize by calling handle_intel, handle_zhaoxin and handle_amd with _SC_LEVEL1_ICACHE_LINESIZE. 3. Return level1_icache_linesize for _SC_LEVEL1_ICACHE_LINESIZE. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* elf: Always set l in _dl_init_paths (bug 23462)Carlos O'Donell2021-03-123-35/+65
| | | | | | | | | | | | | | | After d1d5471579eb0426671bf94f2d71e61dfb204c30 ("Remove dead DL_DST_REQ_STATIC code.") we always setup the link map l to make the static and shared cases the same. The bug is that in elf/dl-load.c (_dl_init_paths) we conditionally set l only in the #ifdef SHARED case, but unconditionally use it later. The simple solution is to remove the #ifdef SHARED conditional, because it's no longer needed, and unconditionally setup l for both the static and shared cases. A regression test is added to run a static binary with LD_LIBRARY_PATH='$ORIGIN' which crashes before the fix and runs after the fix. Co-Authored-By: Florian Weimer <fweimer@redhat.com>
* s390x: Regenerate ULPs.Stefan Liebler2021-03-121-1/+3
| | | | | | | Updates needed after recent commit: db3f7bb5586392d9809fc6397c7184983aed6008 "math: Remove slow paths from asin and acos [BZ #15267]" Compre to the required ulps update for x86_64.
* support: Add xpthread_killAdhemerval Zanella2021-03-123-0/+29
| | | | Checked on x86_64-linux-gnu.
* nptl: Move fork into libcAdhemerval Zanella2021-03-1228-102/+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.
* linux: Use __libc_single_threaded on forkAdhemerval Zanella2021-03-121-1/+2
| | | | Checked on x86_64-linux-gnu.
* posix: Consolidate register-atforkAdhemerval Zanella2021-03-1210-219/+66
| | | | | | | | | | | | | Both htl and nptl uses a different data structure to implement atfork handlers. The nptl one was refactored by 27761a1042d to use a dynarray which simplifies the code. This patch moves the nptl one to be the generic implementation and replace Hurd linked one. Different than previous NPTL, Hurd also uses a global lock, so performance should be similar. Checked on x86_64-linux-gnu, i686-linux-gnu, and with a build for i686-gnu.
* nptl: Move Linux pthread_kill to nptlAdhemerval Zanella2021-03-122-66/+17
| | | | | | | 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-126-3/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* test-container: Always copy test-specific support files [BZ #27537]DJ Delorie2021-03-111-11/+12
| | | | | | | | | | | There's a small chance that a fresh checkout will result in some of the test-specific container files will have the same timestamp and size, which breaks the rsync logic in test-container, resulting in tests running with the wrong support files. This patch changes the rsync logic to always copy the test-specific files, which normally would always be copied anyway. The rsync logic for the testroot itself is unchanged.
* math: Remove mpa files (part 2) [BZ #15267]Wilco Dijkstra2021-03-1115-2452/+0
| | | | | | | | | Previous commit was missing deleted files in sysdeps/ieee754/dbl-64. Finally remove all mpa related files, headers, declarations, probes, unused tables and update makefiles. Reviewed-By: Paul Zimmermann <Paul.Zimmermann@inria.fr>
* math: Remove mpa files [BZ #15267]Wilco Dijkstra2021-03-1126-8099/+4
| | | | | | | Finally remove all mpa related files, headers, declarations, probes, unused tables and update makefiles. Reviewed-By: Paul Zimmermann <Paul.Zimmermann@inria.fr>
* math: Remove slow paths from atan2 [BZ #15267]Wilco Dijkstra2021-03-112-294/+40
| | | | | | Remove slow paths from atan2. Add ULP annotations. Reviewed-By: Paul Zimmermann <Paul.Zimmermann@inria.fr>
* math: Remove slow paths from atan [BZ #15267]Wilco Dijkstra2021-03-113-181/+27
| | | | | | Remove slow paths from atan. Add ULP annotations. Reviewed-By: Paul Zimmermann <Paul.Zimmermann@inria.fr>
* math: Remove slow paths in tan [BZ #15267]Wilco Dijkstra2021-03-115-708/+81
| | | | | | | Remove slow paths in tan. Add ULP annotations. Merge 'number' into 'mynumber'. Remove unused entries from tan constants. Reviewed-By: Paul Zimmermann <Paul.Zimmermann@inria.fr>
* math: Remove slow paths from asin and acos [BZ #15267]Wilco Dijkstra2021-03-113-300/+47
| | | | | | | | | | | This patch series removes all remaining slow paths and related code. First asin/acos, tan, atan, atan2 implementations are updated, and the final patch removes the unused mpa files, headers and probes. Passes buildmanyglibc. Remove slow paths from asin/acos. Add ULP annotations based on previous slow path checks (which are approximate). Update AArch64 and x86_64 libm-test-ulps. Reviewed-By: Paul Zimmermann <Paul.Zimmermann@inria.fr>
* io: Return EBAFD for negative file descriptor on fstat (BZ #27559)Adhemerval Zanella2021-03-117-1/+135
| | | | | | | | 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.
* Allow gdb version 10 in pretty printer tests.Stefan Liebler2021-03-111-1/+2
| | | | | | | | | | | | | With gdb 10, the pretty printer tests are UNSUPPORTED:: The gdb version string (gdb -v) is incorrectly formatted. This is observable in: nptl/test-cond-printers, nptl/test-condattr-printers, nptl/test-mutex-printers, nptl/test-mutexattr-printers, nptl/test-rwlock-printers, nptl/test-rwlockattr-printers After updating the regexp and building with debug-info, all those tests are passing.
* 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>
* sunrpc: tst-svc_register can be a regular testFlorian Weimer2021-03-091-2/+1
| | | | | | | Now that compat_symbol_reference is not restricted to internal tests anymore. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* resolv: tst-p_secstodate can be a regular testFlorian Weimer2021-03-092-13/+3
| | | | | | | | Now that compat_symbol_reference works for non-internal tests, too. Also do not build and run the tests on architectures which lack the __p_secstodate compatibility symbol. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* posix: tst-spawn4-compat can be a regular testFlorian Weimer2021-03-092-10/+7
| | | | | | | | compat_symbol_reference now works for non-internal tests, too. Also stop building and running the tests on those architectures that lack the test symbol versions. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* posix: tst-glob_lstat_compat no longer needs to be an internal testFlorian Weimer2021-03-092-16/+11
| | | | | | | | | compat_symbol_reference is now available for regular tests as well. Also avoid building and running the tests in case the pre-2.27 symbol version of glob is not available. This avoids a spurious UNSUPPORTED result. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* math: test-matherr and test-matherr-2 can be regular testsFlorian Weimer2021-03-092-12/+7
| | | | | | | | compat_symbol_reference is now available without tests-internal. Do not build the test at all on glibc versions that lack the symbols, to avoid spurious UNSUPPORTED results. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* math: $(libm-tests-compat) can be regular testsFlorian Weimer2021-03-091-2/+1
| | | | | | | tests-internal is no longer needed because compat_symbol_reference now works in regular tests. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* malloc: Turn tst-mallocstate into a non-internal testFlorian Weimer2021-03-092-13/+8
| | | | | | | | | compat_symbol_reference no longer needs tests-internal. Do not build the test at all for newer targets, so that no spurious UNSUPPORTED result is generated. Use compat_symbol_reference for __malloc_initialize_hook as well, eliminating the need for -rdynamic. Reviewed-by: DJ Delorie <dj@redhat.com>
* <shlib-compat.h>: Support compat_symbol_reference for _ISOMACFlorian Weimer2021-03-091-13/+13
| | | | | | This is helpful for testing compat symbols in cases where _ISOMAC is activated implicitly due to -DMODULE_NAME=testsuite and cannot be disabled easily.
* nss: fix nss_database_lookup2's alternate handling [BZ #27416]DJ Delorie2021-03-0932-105/+252
| | | | | | | | | | | | | | | | | | | | __nss_database_lookup2's extra arguments were left unused in the nsswitch reloading patch set; this broke compat (default config ignored) and shadow files (secondary name ignored) which relies on these fallbacks. This patch adds in the previous behavior by correcting the initialization of the database list to reflect the fallbacks. This means that the nss_database_lookup2 interface no longer needs to be passed the fallback info, so API and callers were adjusted. Since all callers needed to be edited anyway, the calls were changed from __nss_database_lookup2 to the faster __nss_database_get. This was an intended optimization which was deferred during the initial lookup changes to avoid touching so many files. The test case verifies that compat targets work (passwd) and that the default configuration works (group). Tested on x86-64.
* NEWS: Add entry for CVE-2021-27645DJ Delorie2021-03-091-1/+4
|
* tst: Add test for settimeofdayLukasz Majewski2021-03-082-1/+57
| | | | | | | | | | | | This code brings test to check if time on target machine is properly set. To avoid any issues with altering the time: - The time, which was set before the test was executed is restored. - The time is altered only when cross-test-ssh.sh is executed with --allow-time-setting flag 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>
* tst: Add test for clock_settimeLukasz Majewski2021-03-082-1/+46
| | | | | | | | | | | | This code brings test to check if time on target machine is properly set. To avoid any issues with altering the time: - The time, which was set before the test was executed is restored. - The time is altered only when cross-test-ssh.sh is executed with --allow-time-setting flag Reviewed-by: DJ Delorie <dj@redhat.com>
* support: Provide xclock_settime test helper functionLukasz Majewski2021-03-083-0/+40
| | | | | | | | | | | | The xclock_settime is a wrapper function on the clock_settime syscall to be used in the test code. It checks if the GLIBC_TEST_ALLOW_TIME_SETTING env variable is defined in the environment in which test is executed. If it is not - the test ends as unsupported. Otherwise, the clock-settime is executed and return value is assessed. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* tst: Extend cross-test-ssh.sh to specify if target date can be alteredLukasz Majewski2021-03-083-1/+59
| | | | | | | | | | | | | This code adds new flag - '--allow-time-setting' to cross-test-ssh.sh script to indicate if it is allowed to alter the date on the system on which tests are executed. This change is supposed to be used with test systems, which use virtual machines for testing. The GLIBC_TEST_ALLOW_TIME_SETTING env variable is exported to the remote environment on which the eligible test is run and brings no functional change when it is not. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Update hppa libm-test-ulpsJohn David Anglin2021-03-071-1/+3
|
* x86: Set minimum x86-64 level marker [BZ #27318]H.J. Lu2021-03-064-11/+64
| | | | | | | | | | | | | | | | | | | Since the full ISA set used in an ELF binary is unknown to compiler, an x86-64 ISA level marker indicates the minimum, not maximum, ISA set required to run such an ELF binary. We never guarantee a library with an x86-64 ISA level v3 marker doesn't contain other ISAs beyond x86-64 ISA level v3, like AVX VNNI. We check the x86-64 ISA level marker for the minimum ISA set. Since -march=sandybridge enables only some ISAs in x86-64 ISA level v3, we should set the needed ISA marker to v2. Otherwise, libc is compiled with -march=sandybridge will fail to run on Sandy Bridge: $ ./elf/ld.so ./libc.so ./libc.so: (p) CPU ISA level is lower than required: needed: 7; got: 3 Set the minimum, instead of maximum, x86-64 ISA level marker should have no impact on the glibc-hwcaps directory assignment logic in ldconfig nor ld.so.
* posix: glob, glob64 should not be declared __THROW [BZ #27522]Florian Weimer2021-03-051-6/+6
| | | | | | | | These functions invoke callbacks with GLOB_ALTDIRFUNC, so they are not leaf functions (as implied by _THROW). Use __THROWNL and __REDIRECT_NTHNL to express this. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Fix __pthread_clockjoin_np64 __pthread_timedjoin_np64 hidden protoAdhemerval Zanella2021-03-053-4/+4
| | | | They are both implemented in libpthread instead of libc.
* linux: Fix __thrd_sleep64 hidden definitionAdhemerval Zanella2021-03-052-2/+2
| | | | The symbol is exported by libc.
* Update arm libm-test-ulpsAdhemerval Zanella2021-03-051-1/+3
|
* Update sparc libm-test-ulpsAdhemerval Zanella2021-03-051-16/+18
|
* [PATCH] pthread_once hangs when init routine throws an exception [BZ #18435]Jakub Jelinek2021-03-047-10/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is another attempt at making pthread_once handle throwing exceptions from the init routine callback. As the new testcases show, just switching to the cleanup attribute based cleanup does fix the tst-once5 test, but breaks the new tst-oncey3 test. That is because when throwing exceptions, only the unwind info registered cleanups (i.e. C++ destructors or cleanup attribute), when cancelling threads and there has been unwind info from the cancellation point up to whatever needs cleanup both unwind info registered cleanups and THREAD_SETMEM (self, cleanup, ...) registered cleanups are invoked, but once we hit some frame with no unwind info, only the THREAD_SETMEM (self, cleanup, ...) registered cleanups are invoked. So, to stay fully backwards compatible (allow init routines without unwind info which encounter cancellation points) and handle exception throwing we actually need to register the pthread_once cleanups in both unwind info and in the THREAD_SETMEM (self, cleanup, ...) way. If an exception is thrown, only the former will happen and we in that case need to also unregister the THREAD_SETMEM (self, cleanup, ...) registered handler, because otherwise after catching the exception the user code could call deeper into the stack some cancellation point, get cancelled and then a stale cleanup handler would clobber stack and probably crash. If a thread calling init routine is cancelled and unwind info ends before the pthread_once frame, it will be cleaned up through self->cleanup as before. And if unwind info is present, unwind_stop first calls the self->cleanup registered handler for the frame, then it will call the unwind info registered handler but that will already see __do_it == 0 and do nothing.
* powerpc: Regenerate ulpsFlorian Weimer2021-03-031-10/+10
| | | | This time on a POWER8 machine.
* s390x: Regenerate ulpsArjun Shankar2021-03-031-15/+17
| | | | For new test cases in commit 5a051454a9b5.