about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* nss: Re-enable NSS module loading after chroot [BZ #27389]DJ Delorie2021-03-026-8/+32
| | | | | | | | | | | | | | | | | | | | | The glibc 2.33 release enabled /etc/nsswitch.conf reloading, and to prevent potential security issues like CVE-2019-14271 the re-loading of nsswitch.conf and all mdoules was disabled when the root filesystem changes (see bug 27077). Unfortunately php-lpfm and openldap both require the ability to continue to load NSS modules after chroot. The packages do not exec after the chroot, and so do not cause the protections to be reset. The only solution is to re-enable only NSS module loading (not nsswitch.conf reloading) and so get back the previous glibc behaviour. In the future we may introduce a way to harden applications so they do not reload NSS modules once the root filesystem changes, or that only files/dns are available pre-loaded (or builtin). Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* nscd: Fix double free in netgroupcache [BZ #27462]DJ Delorie2021-03-021-2/+2
| | | | | | | | | | | | | In commit 745664bd798ec8fd50438605948eea594179fba1 a use-after-free was fixed, but this led to an occasional double-free. This patch tracks the "live" allocation better. Tested manually by a third party. Related: RHBZ 1927877 Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* 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-0210-8/+461
|
* 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.
* elf: Build __dl_iterate_phdr with unwinding support [BZ #27498]Florian Weimer2021-03-021-1/+1
|
* nptl: Use <unwind-link.h> for accessing the libgcc_s unwinderFlorian Weimer2021-03-017-146/+50
| | | | 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>
* backtrace: Implement on top of <unwind-link.h>Florian Weimer2021-03-011-67/+17
| | | | | | This reimplements the generic version of backtrace. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Implement <unwind-link.h> for dynamically loading the libgcc_s unwinderFlorian Weimer2021-03-0120-18/+600
| | | | | | | | | | 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>
* Correct buffer end pointer in IO_wdefault_doallocate (BZ #26874)Martin Sebor2021-03-011-4/+3
| | | | | | | | | | | | | An experimental build of GCC 11 with an enhanced -Warray-bounds reports a bug in IO_wdefault_doallocate where the function forms an invalid past-the-end pointer to an allocated wchar_t buffer by failingf to consider the scaling by sizeof (wchar_t). The fix path below corrects this problem. It keeps the buffer size the same as opposed to increasing it according to what other code like it does. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* 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-2719-24/+3086
| | | | (Using values from https://members.loria.fr/PZimmermann/papers/accuracy.pdf)
* Reduce the statically linked startup code [BZ #23323]Florian Weimer2021-02-2563-315/+276
| | | | | | | | | | | | | | | | | | | 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.
* posix: Falling back to non wide mode in case of encoding error [BZ #14185]Adhemerval Zanella2021-02-232-104/+58
| | | | | | | | | | | | | | | | Gnulib has added the proposed fix with aed23714d60 (done in 2005), but recently with a glibc merge with 67306f6 (done in 2020 with sync back) it has fallback to old semantic to return -1 on in case of failure. From gnulib developer feedback it was an oversight. Although the full fix for BZ #14185 would require to rewrite fnmatch implementation to use mbrtowc instead of mbsrtowcs on the full input, this mitigate the issue and it has been used by gnulib for a long time. This patch also removes the alloca usage on the string convertion to wide characters before calling the internal function. Checked on x86_64-linux-gnu.
* nptl: Move elision implementations into libcFlorian Weimer2021-02-2346-646/+185
| | | | | | | | | | | | | | | | | | 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.)
* NEWS: Add missing bug closuresSamuel Thibault2021-02-231-5/+6
|
* added rt to malloc/Depend [BZ #27132]Paul Zimmermann2021-02-231-0/+1
| | | | | This avoids a failure when a new glibc version is compiled with an older system librt. Patch proposed by Florian Weimer.
* 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-224-7/+7
| | | | | | | | 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-226-36/+9
| | | | | | 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-223-2/+4
| | | | Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Reformat VersionsFlorian Weimer2021-02-221-188/+279
| | | | | | One symbol per line, lexicographically ordered. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Split libpthread-routines into one routine per lineFlorian Weimer2021-02-221-86/+152
| | | | | | | And sort the lines lexicographically. This will make it easier to review patches which move symbols from libpthread to libc. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* x86: Remove unused variables for raw cache sizes from cacheinfo.hFlorian Weimer2021-02-221-12/+0
|
* Use Linux 5.11 in build-many-glibcs.py.Joseph Myers2021-02-221-1/+1
| | | | | | | This patch makes build-many-glibcs.py use Linux 5.11. Tested with build-many-glibcs.py (host-libraries, compilers and glibcs builds).
* <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.
* build-many-glibcs.py: Use make -O for more consistent log outputFlorian Weimer2021-02-221-1/+1
| | | | | | | | The -O option avoids interleaving (e.g.) compiler error messages with other build messages, and makes attribution of messages to commands easier. According to my tests, the impact on build time is within the noise.
* configure: Replace obsolete AC_TRY_LINK with AC_LINK_IFELSENaohiro Tamura2021-02-211-1/+2
| | | | | | This patch replaces obsolete AC_TRY_LINK with AC_LINK_IFELSE. It has been confirmed that GNU 'autoconf' 2.69 doesn't change the 'configure' file and suppressed obsolete warning.
* configure: Remove obsolete AC_CHECK_TOOL_PREFIXNaohiro Tamura2021-02-212-2/+0
| | | | | | | | | | | | | This patch removes obsolete AC_CHECK_TOOL_PREFIX. It has been confirmed that AC_CHECK_TOOL_PREFIX is defined as NOP in GNU 'autoconf' 2.69 [1], so we can safely remove it. The 'configure' file has been deleted one blank line by the 'autoconf' 2.69 command . [1] autoconf-2.69/share/autoconf/autoconf/programs.m4 181 # AC_CHECK_TOOL_PREFIX 182 # -------------------- 183 AU_DEFUN([AC_CHECK_TOOL_PREFIX])
* configure: Replace obsoleted AC_HELP_STRING with AS_HELP_STRINGNaohiro Tamura2021-02-211-30/+30
| | | | | | | | This patch replaces obsoleted AC_HELP_STRING with AS_HELP_STRING. As of Glibc 2.33, INSTALL says "GNU 'autoconf' 2.69 (exactly)" is required. So we can safely replace obsoleted macro without worrying about older autoconf. This change doesn't affect the contents of "configure" file.
* 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
|
* string: Work around GCC PR 98512 in rawmemchrFlorian Weimer2021-02-191-11/+15
|