about summary refs log tree commit diff
path: root/sysdeps
Commit message (Collapse)AuthorAgeFilesLines
...
* 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.
* 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>
* i386: Regenerate ulpsFlorian Weimer2021-03-022-46/+46
|
* x86: Add CPU-specific diagnostics to ld.so --list-diagnosticsFlorian Weimer2021-03-022-0/+120
|
* x86: Automate generation of PREFERRED_FEATURE_INDEX_1 bitfieldFlorian Weimer2021-03-022-34/+51
| | | | | Use a .def file to define the bitfield layout, so that it is possible to iterate over field members using the preprocessor.
* ld.so: Implement the --list-diagnostics optionFlorian Weimer2021-03-021-0/+77
|
* powerpc: Update libm-test-ulpsMatheus Castanho2021-03-021-13/+15
| | | | | | Generated with 'make regen-ulps' Tested on powerpc, powerpc64, and powerpc64le
* 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: __libc_cleanup_push/__libc_cleanup_pop require -fexceptionsFlorian Weimer2021-03-021-3/+6
| | | | | | Do not define these macros if they do nothing in a particular compilation, otherwise they can easily be used accidentally, while not actually achieving anything.
* nptl: Use <unwind-link.h> for accessing the libgcc_s unwinderFlorian Weimer2021-03-014-142/+44
| | | | Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Implement _Unwind_Resume in libc on top of <unwind-link.h>Florian Weimer2021-03-015-61/+97
| | | | | | | | Temporarily move the arm _Unwind_Resume implementation to the file used by libpthread. It will be ported to <unwind-link.h> along with the rest of nptl. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Move sysdeps/gnu/unwind-resume.c to sysdeps/generic/unwind-resume.cFlorian Weimer2021-03-011-0/+0
| | | | | | | This change allows architecture-specific sysdeps directories to override it. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* __frame_state_for: Use <unwind-link.h> for unwinder accessFlorian Weimer2021-03-011-13/+8
| | | | Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* sparc: Implement backtrace on top <unwind-link.h>Florian Weimer2021-03-011-51/+15
| | | | Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* m68k: Implement backtrace on top of <unwind-link.h>Florian Weimer2021-03-011-64/+18
| | | | Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* i386: Implement backtrace on top of <unwind-link.h>Florian Weimer2021-03-011-64/+18
| | | | Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* arm: Implement backtrace on top of <unwind-link.h>Florian Weimer2021-03-011-57/+20
| | | | Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Implement <unwind-link.h> for dynamically loading the libgcc_s unwinderFlorian Weimer2021-03-0115-16/+447
| | | | | | | | | | This will be used to consolidate the libgcc_s access for backtrace and pthread_cancel. Unlike the existing backtrace implementations, it provides some hardening based on pointer mangling. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* aarch64: update ulps.Szabolcs Nagy2021-03-011-15/+17
| | | | | For new test cases in commit 5a051454a9b50c27984bbc499ee1297de48e2dc8
* Add inputs that generate larger error boundsPaul Zimmermann2021-02-271-24/+26
| | | | (Using values from https://members.loria.fr/PZimmermann/papers/accuracy.pdf)
* Reduce the statically linked startup code [BZ #23323]Florian Weimer2021-02-2558-182/+115
| | | | | | | | | | | | | | | | | | | It turns out the startup code in csu/elf-init.c has a perfect pair of ROP gadgets (see Marco-Gisbert and Ripoll-Ripoll, "return-to-csu: A New Method to Bypass 64-bit Linux ASLR"). These functions are not needed in dynamically-linked binaries because DT_INIT/DT_INIT_ARRAY are already processed by the dynamic linker. However, the dynamic linker skipped the main program for some reason. For maximum backwards compatibility, this is not changed, and instead, the main map is consulted from __libc_start_main if the init function argument is a NULL pointer. For statically linked binaries, the old approach based on linker symbols is still used because there is nothing else available. A new symbol version __libc_start_main@@GLIBC_2.34 is introduced because new binaries running on an old libc would not run their ELF constructors, leading to difficult-to-debug issues.
* nptl: Move elision implementations into libcFlorian Weimer2021-02-2337-667/+138
| | | | | | | | | | | | | | | | | | The elision interfaces are closely aligned between the targets that implement them, so declare them in the generic <lowlevellock.h> file. Empty .c stubs are provided, so that fewer makefile updates under sysdeps are needed. Also simplify initialization via __libc_early_init. The symbols __lll_clocklock_elision, __lll_lock_elision, __lll_trylock_elision, __lll_unlock_elision, __pthread_force_elision move into libc. For the time being, non-hidden references are used from libpthread to access them, but once that part of libpthread is moved into libc, hidden symbols will be used again. (Hidden references seem desirable to reduce the likelihood of transactions aborts.)
* x86: Use x86/nptl/pthreaddef.hH.J. Lu2021-02-222-48/+7
| | | | | | | 1. Move sysdeps/i386/nptl/pthreaddef.h to sysdeps/x86/nptl/pthreaddef.h. 2. Remove sysdeps/x86_64/nptl/pthreaddef.h. Reviewed-by: DJ Delorie <dj@redhat.com>
* nptl: Move futex-internal into libcFlorian Weimer2021-02-221-2/+2
| | | | | | | | This moves __futex_abstimed_wait64 and __futex_abstimed_wait_cancelable64 and exports these functions as GLIBC_PRIVATE. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Move lowlevellock into libc [BZ #15648]Florian Weimer2021-02-222-10/+4
| | | | | | And export __lll_lock_wait and __lll_lock_wait_private as GLIBC_PRIVATE. This should eliminate the need for the previous riscv kludge.
* nptl: Move futex-internal.c into main nptl directoryFlorian Weimer2021-02-222-128/+1
| | | | Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* x86: Remove unused variables for raw cache sizes from cacheinfo.hFlorian Weimer2021-02-221-12/+0
|
* <bits/platform/x86.h>: Correct x86_cpu_TBMH.J. Lu2021-02-221-1/+1
| | | | x86_cpu_TBM should be x86_cpu_index_80000001_ecx + 21.
* x86_64/clone.S: Upate commentsH.J. Lu2021-02-221-6/+8
|
* i386/clone.S: Remove redundant EBX loadH.J. Lu2021-02-221-6/+0
| | | | | | | | | | | | | There is no neeed for call L(here) L(here): popl %ebx addl $_GLOBAL_OFFSET_TABLE_+[.-L(here)], %ebx before movl %eax, %ebx
* aarch64: Remove the unused __read_tp symbolSzabolcs Nagy2021-02-223-51/+0
| | | | | | | | This was likely a mistake in the original aarch64 port copied over from arm: on aarch64 tpidr_el0 register is always available. The __read_tp symbol is visible with static linking, but it's not part of the public ABI so it should be safe to remove.
* Update syscall lists for Linux 5.11.Joseph Myers2021-02-1926-2/+28
| | | | | | | | Linux 5.11 has one new syscall, epoll_pwait2. Update syscall-names.list and regenerate the arch-syscall.h headers with build-many-glibcs.py update-syscalls. Tested with build-many-glibcs.py.
* Correct hppa EFD_NONBLOCK, IN_NONBLOCK, SFD_NONBLOCK and TFD_NONBLOCK defines.John David Anglin2021-02-194-4/+4
|
* S390: Add new hwcap values.Stefan Liebler2021-02-163-3/+8
| | | | The new hwcap values indicate support for arch14 architecture.
* aarch64: Fix sys/ptrace.h if linux headers are includedSzabolcs Nagy2021-02-151-0/+34
| | | | | | If the linux asm/ptrace.h is included before sys/ptrace.h that breaks the newly added declarations there, so undef the names that may be defined as macros in the linux header.
* x86: Remove the extra space between "# endif"H.J. Lu2021-02-121-1/+1
| | | | | | | | | | Remove the extra space between "# endif" left over from commit f380868f6dcfdeae8d449d556298d9c41012ed8d Author: H.J. Lu <hjl.tools@gmail.com> Date: Thu Dec 24 15:43:34 2020 -0800 Remove _ISOMAC check from <cpu-features.h>
* hurd: Fix fstatfs build failureAdhemerval Zanella2021-02-111-1/+1
| | | | | | | It was added by 1bfbaf7130 where it added a libc_hidden_proto for __fstatfs but it didn't update the Hurd version as well. Checked with a build for i686-gnu.
* linux: Remove stat-check.cAdhemerval Zanella2021-02-113-30/+13
| | | | | | | The check is moved to LFS fstatat implementation (since it is the code that actually implements the syscall). Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* linux: Remove overflow.hAdhemerval Zanella2021-02-111-69/+0
| | | | | | The header is not used anywhere. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* linux: Consolidate internal_statvfsAdhemerval Zanella2021-02-119-37/+56
| | | | | | | | | | | Remove the internal_statvfs64.c and open code the implementation on internal_statvfs.c. The alpha is now unrequired, the generic implementation also handles it. Also, remove unused includes on internal_statvfs.c, and remove unused arguments on __internal_statvfs{64}. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* linux: Consolidate statvfs implementationsAdhemerval Zanella2021-02-116-46/+25
| | | | | | | | | There is no need to handle ENOSYS on fstatfs64 call, required only for alpha (where is already fallbacks to fstatfs). Checked on x86_64-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* linux: Consolidate fstatvfs implementationsAdhemerval Zanella2021-02-117-46/+25
| | | | | | | | | | | There is no need to handle ENOSYS on fstatfs64 call, required only for alpha (where is already fallbacks to fstatfs). The wordsize internal_statvfs64.c is removed, since how the LFS support is provided by fstatvfs64.c (used on 64-bit architectures as well). Checked on x86_64-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* linux: Consolidate statfs implementationsAdhemerval Zanella2021-02-119-81/+125
| | | | | | | | | | | | | | | | | | | | | | | | The __NR_statfs64 syscall is supported on all architectures but aarch64, mips64, riscv64, and x86_64. And newer ABIs also uses the new statfs64 interface (where the struct size is used as second argument). So the default implementation now uses: 1. __NR_statfs64 for non-LFS call and handle overflow directly There is no need to handle __NR_statfs since all architectures that only support are LFS only. 2. __NR_statfs if defined or __NR_statfs64 otherwise for LFS call. Alpha is the only outlier, since it is a 64-bit architecture which provides non-LFS interface and only provides __NR_statfs64 on newer kernels (v5.1+). Checked on x86_64-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* linux: Consolidate fstatfs implementationsAdhemerval Zanella2021-02-119-73/+126
| | | | | | | | | | | | | | | | | | | | | | | | The __NR_fstatfs64 syscall is supported on all architectures but aarch64, mips64, riscv64, and x86_64. And newer ABIs also uses the new fstatfs64 interface (where the struct size is used as first argument). So the default implementation now uses: 1. __NR_fstatfs64 for non-LFS call and handle overflow directly There is no need to handle __NR_fstatfs since all architectures that only support are LFS only. 2. __NR_fstatfs if defined or __NR_fstatfs64 otherwise for LFS call. Alpha is the only outlier, it is a 64-bit architecture which provides non-LFS interface and only provides __NR_fstatfs64 on newer kernels (5.1+). Checked on x86_64-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* linux: Set LFS statfs as defaultAdhemerval Zanella2021-02-112-11/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently glibc has three different struct statfs{64} definitions: 1. Non-LFS support where non-LFS and LFS struct have different size: alpha, arm, hppa, i686, m68k, microblaze, mips (all abis), powerpc32, s390, sh4, and sparc. 2. Non-LFS support where non-LFS and LFS struct have the same size: csky and nios2. 3. Only LFS support (where both struct have the same size): arc, ia64, powerpc64 (including LE), riscv (both 32 and 64 bits), s390x, sparc64, and x86 (including x32). The STATFS_IS_STATFS64/__STATFS_MATCHES_STATFS64 does not tell apart between 1. and 2. since for both the only difference is the struct size (for 2. both non-LFS and LFS uses the same syscall, where for 1. the old non-LFS is used for [f]statfs). This patch move the generic statfs.h for both csky and nios2, and make the default definitions for newer ABIs to assume that only LFS will be support (so there is no need to keep no-LFS and LFS struct statfs with the same size, it will be implicit). This patch does not change the code generation. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* linux: Set default kernel_stat.h to LFSAdhemerval Zanella2021-02-1115-200/+231
| | | | | | | | | | | | | | The XSTAT_IS_XSTAT64 and STAT_IS_KERNEL_STAT flags are now set to 1 and STATFS_IS_STATFS64 is set to __STATFS_MATCHES_STATFS64. This makes the default ABI for newer ports to provide only LFS calls. A copy of non-LFS support is provided to 32-bit ABIS with non-LFS support (arm, csky, i386, m68k, nios2, s390, and sh). Is also allows to remove the 64-bit ports, which already uses the default values. This patch does not change the code generation. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* linux: Fix STATFS_IS_STATFS64 definitionAdhemerval Zanella2021-02-118-8/+36
| | | | | | | | | | | | | | | aarch64, arc, ia64, mips64, powerpc64, riscv32, riscv64, s390x, sparc64, and x86_64 defines STATFS_IS_STATFS64 to 0, but all of them alias statfs to statfs64 and the struct statfs has the same and layout of struct statfs64. The correct definition will be used on the [f]statfs[64] consolidation. This patch does not change code generation since the symbols are implemented using the auto-generation syscall for all the aforementioned ABIs. Reviewed-by: Carlos O'Donell <carlos@redhat.com>