about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
...
* gitlog-to-changelog: Drop scripts in favour of gnulib versionSiddhesh Poyarekar2020-01-235-1181/+0
| | | | | | | | | | | | | The ChangeLog automation scripts were incorporated in gnulib as vcs-to-changelog for a while now since other projects expressed the desire to use and extend this script. In the interest of avoiding duplication of code, drop the glibc version of gitlog-to-changelog and use the gnulib one directly. The only file that remains is vcstocl_quirks.py, which specifies properties and quirks of the glibc project source code. This patch also drops the shebang at the start of vcstocl_quirks.py since the file is not intended to be directly executable.
* Add NEWS entry about the change in handling of PT_GNU_STACK on MIPSDragan Mladjenovic2020-01-231-0/+12
| | | | | | | | | | | | | | The change was introduced in: commit 33bc9efd91de1b14354291fc8ebd5bce96379f12 Author: Dragan Mladjenovic <dmladjenovic@wavecomp.com> Date: Fri Aug 23 16:38:04 2019 +0000 mips: Force RWX stack for hard-float builds that can run on pre-4.8 kernels and probably requires a small explanation. Co-authored-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Fix array overflow in backtrace on PowerPC (bug 25423)Andreas Schwab2020-01-213-0/+16
| | | | | | When unwinding through a signal frame the backtrace function on PowerPC didn't check array bounds when storing the frame address. Fixes commit d400dcac5e ("PowerPC: fix backtrace to handle signal trampolines").
* getaddrinfo: Fix resource leak after strdup failure in gethosts [BZ #25425]Florian Weimer2020-01-201-0/+1
| | | | | | | | | | | | Filip Ochnik spotted that one of the error jumps in gethosts fails to call __resolv_context_put to release the resolver context. Fixes commit 352f4ff9a268b81ef5d4b2413f582565806e4790 ("resolv: Introduce struct resolv_context [BZ #21668]") and commit 964263bb8d650f1681665c55704fb01a8e725621 ("getaddrinfo: Release resolver context on error in gethosts [BZ #21885]"). Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Run bench-timing-type with newly built libc.Joseph Myers2020-01-201-1/+4
| | | | | benchtests/timing-type is built with the newly built libc, so should be run with it like actual tests and benchmarks.
* Get rid of Werror=maybe-uninitialized in res_send.c.Stefan Liebler2020-01-201-0/+4
| | | | | | | | | | | | | | The commit 446997ff1433d33452b81dfa9e626b8dccf101a4 introduced this new usage of resplen. If build with gcc 9 -march>=z13 on s390x, the following warning occurs: res_send.c: In function ‘__res_context_send’: res_send.c:539:6: error: ‘resplen’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 539 | if (resplen > HFIXEDSZ) | ^ Therefore this patch adds a further DIAG_IGNORE_NEEDS_COMMENT in the same way as it was previously done for usages of resplen or n. See commit d1bc2cbbed9aea2017ef941f63c8786571da5b4f.
* translations: Update translationsSiddhesh Poyarekar2020-01-1932-65960/+0
| | | | | Update translations after adding msgattrib to the update-translations makefile target.
* translations: Trim po files using msgattribSiddhesh Poyarekar2020-01-191-1/+3
| | | | | | | | | The translation project coordinator Benno Schulenberg suggested that we could save space in our tarball by trimming the generated po files by using msgattrib and dropping all untranslated, fuzzy and obsolete messages. This patch updates the update-translations target to do that. Testing indicates that the current po files reduce by over 65K lines due to this trimming.
* Update translationsSiddhesh Poyarekar2020-01-1934-3945/+4304
| | | | Update translations from the translation project.
* translations: Run msgmerge when downloading translationsSiddhesh Poyarekar2020-01-191-1/+3
| | | | | | | | | | The latest translations in the translationproject URL need to be merged in using msgmerge for the po files to be correctly updated, otherwise we may end up getting odd results, such as the previous translations update. This patch adds another step to the update-translations Makefile target which does a msgmerge of the downloaded po file with libc.pot and then uses that as the final result.
* Fix maybe-uninitialized error on powerpcMatheus Castanho2020-01-171-0/+7
| | | | | | | | | | | | | | | | | | | | | | The build has been failing on powerpc64le-linux-gnu with GCC 10 due to a maybe-uninitialized error: ../sysdeps/ieee754/dbl-64/mpa.c:875:6: error: ‘w.e’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 875 | EY -= EX; | ^~ The warning is thrown because when __inv is called by __dvd *y is not initialized and if t == 0 before calling __dbl_mp, EY will stay uninitialized, as the function does not touch it in this case. However, since t will be set to 1/t before calling __dbl_mp, t == 0 will never happen, so we can instruct the compiler to ignore this case, which suppresses the warning. Tested on powerpc64le. Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
* powerpc32: Fix syntax error in __GLRO macroAndreas Schwab2020-01-181-1/+1
|
* Remove incorrect alloc_size attribute from pvalloc [BZ #25401]Florian Weimer2020-01-173-3/+50
| | | | | | | | | | | | | | pvalloc is guarantueed to round up the allocation size to the page size, so applications can assume that the memory region is larger than the passed-in argument. The alloc_size attribute cannot express that. The test case is based on a suggestion from Jakub Jelinek. This fixes commit 9bf8e29ca136094f73f69f725f15c51facc97206 ("malloc: make malloc fail with requests larger than PTRDIFF_MAX (BZ#23741)"). Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Fix tst-pkey.c pkey_alloc return checks and manualLucas A. M. Magalhaes2020-01-172-0/+8
| | | | | | | | | | | | This test was failing in some powerpc systems as it was not checking for ENOSPC return. As said on the Linux man-pages and can be observed by the implementation at mm/mprotect.c in the Linux Kernel source. The syscall pkey_alloc can return EINVAL or ENOSPC. ENOSPC will indicate either that all keys are in use or that the kernel does not support pkeys. Reviewed-by: Gabriel F. T. Gomes <gabriel@inconstante.net.br>
* powerpc: Move cache line size to rtld_global_roTulio Magno Quites Machado Filho2020-01-1720-67/+312
| | | | | | | | | | | | | | GCC 10.0 enabled -fno-common by default and this started to point that __cache_line_size had been implemented in 2 different places: loader and libc. In order to avoid this duplication, the libc variable has been removed and the loader variable is moved to rtld_global_ro. File sysdeps/unix/sysv/linux/powerpc/dl-auxv.h has been added in order to reuse code for both static and dynamic linking scenarios. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* powerpc: Initialize rtld_global_ro for static dlopen [BZ #20802]Tulio Magno Quites Machado Filho2020-01-171-2/+11
| | | | | | | Initialize dl_auxv, dl_hwcap and dl_hwcap2 in rtld_global_ro for DSOs that have been statically dlopen'ed. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Revert outdated translationsSiddhesh Poyarekar2020-01-1716-38597/+54712
| | | | | | The update-translation target seems to have downloaded outdated translations for these languages. Revert them and try to figure out if this is a problem with the target or an error in translations.
* vcs-to-changelog: Add quirk for __nonnullSiddhesh Poyarekar2020-01-171-0/+2
| | | | | The parser cannot identify the __nonnull off the bat and confuses __typeof in the change db25266c9 to be a function declaration.
* elf: Add elf/tst-dlopenfail-2 [BZ #25396]Florian Weimer2020-01-163-2/+83
| | | | | | | | | | | | | Without CET, a jump into a newly loaded object through an overwritten link map often does not crash, it just executes some random code. CET detects this in some cases because the function pointer does not point to the start of a function in the replacement shared object, so there is no ENDBR instruction. The new test uses a small shared object and the existing dangling link map to trigger the bug. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Clear GL(dl_initfirst) when freeing its link_map memory [BZ# 25396]H.J. Lu2020-01-161-0/+4
| | | | | | | | We should clear GL(dl_initfirst) when freeing its link_map memory. Tested on Fedora 31/x86-64 with CET. Reviewed-by: Florian Weimer <fweimer@redhat.com>
* Update TranslationsSiddhesh Poyarekar2020-01-1627-57666/+40739
| | | | Update translations from translationproject.org for 2.30.9000.
* htl: Add internal version of __pthread_mutex_timedlockSamuel Thibault2020-01-134-2/+7
| | | | The C11 threads implementation will need it.
* htl: Avoid crashing when passed invalid pthread_t valuesSamuel Thibault2020-01-131-2/+4
|
* Update build-many-glibcs.py for GCC move to git.Joseph Myers2020-01-131-10/+17
| | | | | | | This patch updates build-many-glibcs.py for the move of GCC to git, teaching it to do the initial checkout from git, to replace an SVN checkout with a git one if --replace-sources is used, and to get the commit identifier from a git checkout after updating it.
* Fix "elf: Add tst-ldconfig-ld_so_conf-update test" on 32bit.Stefan Liebler2020-01-131-2/+4
| | | | | | | | | | This new test was introduced with recent commit 591236f1a33f11cc65ccf009d997071ba853e186. If run on 32bit, it fails while renaming tst-ldconfig-ld-mod.so as there is no /usr/lib64 directory. This patch is constructing the file name with help of support_libdir_prefix. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* htl: Avoid exposing unixoid functionsSamuel Thibault2020-01-135-4/+7
| | | | C11 threads should not expose them.
* htl: Add type sizes in bits/pthreadtypes-arch.h and check themSamuel Thibault2020-01-1314-0/+42
|
* htl: Add internal versions of functions used by C11 threadsSamuel Thibault2020-01-134-2/+7
| | | | | The C11 threads implementation needs to call pthread_join and pthread_key_delete without exposing them.
* Update timezone/READMEPaul Eggert2020-01-092-6/+9
| | | | | | | * timezone/version: New file, also taken from tzcode2018i. * timezone/README: Reword so that people needn't paw through old ChangeLog files to see which version we're using, a process that is error-prone. Update an obsolescent URL.
* elf: Add tst-ldconfig-ld_so_conf-update testAlexandra Hájková2020-01-095-3/+132
| | | | | | | | Test ldconfig after /etc/ld.so.conf update and verify a running process observes changes to /etc/ld.so.cache. The test uses the test-in-container framework. Reviewed-by: Arjun Shankar <arjun@redhat.com>
* Revise NEWS description of changes to gettimeofday etc.Zack Weinberg2020-01-091-25/+38
| | | | | | | | | | | | | | | Mostly English grammar and style improvements. The bullet list is reorganized a little for clarity. The details of exactly which Linux-based ports still report system-wide time zone information from gettimeofday has been removed, as this is not intended to be something people should rely on. Also clarify the deprecation of older SPARC ISAs, based on the fact that “SPARC version 7” is actually the very first version of the SPARC ISA (Sun Microsystems was very fond of letting the marketing department pick version numbers). Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Drop dependency of dist target on ChangeLogSiddhesh Poyarekar2020-01-092-1/+5
| | | | | | | | | | | | | | We no longer write manual ChangeLog entries since they are auto-generated at release time. Drop dependency of the `make dist` target on the file and document the fact that the latest ChangeLog entries can be read in the highest numbered ChangeLog.N file in ChangeLog.old. The ChangeLog.old/ChangeLog.20 file for 2.31 will thus be generated just before tagging a release. Reviewed-by: Paul Eggert <eggert@cs.ucla.edu> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
* MIPS: Fix circular definition of __LDBL_MANT_DIG__ in ieee754.hZack Weinberg2020-01-081-1/+1
| | | | | | | | | | | | | | | In commit aa706e13f4bfdf32a27c498902edf4f6006e433e, sysdeps/mips/ieee754/ieee754.h was changed to use GCC’s predefined macro __LDBL_MANT_DIG__, instead of including <float.h> and using LDBL_MANT_DIG (and therefore polluting the user namespace with all of the macros defined in float.h). In order to support compilers that don’t provide __LDBL_MANT_DIG__, there is a fallback #if block which was supposed to include <float.h> and then define __LDBL_MANT_DIG__ to LDBL_MANT_DIG. However, at some point during the development of the patch, a typo was introduced, causing the fallback block to define __LDBL_MANT_DIG__ to expand to __LDBL_MANT_DIG__. Correct this typo.
* sl_SI locale: Use "." as the thousands separator (bug 25233)Rafał Lużyński2020-01-081-2/+2
| | | | | | | | | | This is correct according to CLDR [1] and Florian Weimer's quick research. [2] [1] https://st.unicode.org/cldr-apps/v#/sl/Symbols/ [2] https://sourceware.org/bugzilla/show_bug.cgi?id=25233#c0 Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Fix formatting of ChangeLog ouputSiddhesh Poyarekar2020-01-071-1/+1
| | | | | | Add another newline when the number of files differing is too large. This is typical for across-the-board changes such as the copyright year update that happened recently.
* hurd: Fix message reception for timer_threadSamuel Thibault2020-01-051-1/+2
| | | | | | | Without a proper size, we get MACH_RCV_TOO_LARGE instead of MACH_MSG_SUCCESS. * sysdeps/mach/hurd/setitimer.c (timer_thread): Add return_code_type field to received message, and set the receive size in __mach_msg call.
* htl: Add __errno_location and __h_errno_locationSamuel Thibault2020-01-045-0/+42
| | | | | | | | As explained on https://sourceware.org/ml/libc-alpha/2020-01/msg00049.html the presence of __errno_location in libpthread.so on GNU/Linux makes libpthread getting linked in for libstdc++. This aligns on that behavior, to avoid issues that only GNU/Hurd would get.
* htl: Move pthread_atfork to libc_nonshared.aSamuel Thibault2020-01-043-34/+6
| | | | | | | | | | | | | | | This follows bd60ce86520b ('nptl: Move pthread_atfork to libc_nonshared.a') with the same rationale: there is no non-libpthread equivalent to be used for making linking against libpthread optional. libpthread_nonshared.a is unused after this, so remove it from the build. There is no ABI impact because pthread_atfork was implemented using __register_atfork in libc even before this change. pthread_atfork has to be a weak alias because pthread_* names are not reserved in libc.
* htl: Drop common tcbhead_t definitionSamuel Thibault2020-01-041-10/+2
| | | | | This would conflict when including pt-internal.h outside libpthread, while we can actually just include <tls.h>
* htl: Use dso_handle.hSamuel Thibault2020-01-041-5/+2
|
* linux: Optimize fallback 32-bit clock_getresAdhemerval Zanella2020-01-031-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | This patch avoid probing the __NR_clock_getttime64 syscall each time __clock_gettime64 is issued on a kernel without 64 bit time support. Once ENOSYS is obtained, only 32-bit clock_gettime are used. The following snippet: clock_getres (CLOCK_REALTIME, &(struct timespec) { 0 }); clock_getres (CLOCK_MONOTONIC, &(struct timespec) { 0 }); clock_getres (CLOCK_BOOTTIME, &(struct timespec) { 0 }); clock_getres (20, &(struct timespec) { 0 }); On a kernel without 64 bit time support issues the syscalls: syscall_0x196(0, 0xffb83330, [...]) = -1 ENOSYS (Function not implemented) clock_getres(CLOCK_REALTIME, {tv_sec=0, tv_nsec=1}) = 0 clock_getres(CLOCK_MONOTONIC, {tv_sec=0, tv_nsec=1}) = 0 clock_getres(CLOCK_BOOTTIME, {tv_sec=0, tv_nsec=1}) = 0 Checked on i686-linux-gnu on 4.15 kernel. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* linux: Add support for clock_getres64 vDSOAdhemerval Zanella2020-01-038-12/+24
| | | | | | | | No architecture currently defines the vDSO symbol. On archictures with 64-bit time_t the HAVE_CLOCK_GETRES_VSYSCALL is renamed to HAVE_CLOCK_GETRES64_VSYSCALL, it simplifies clock_gettime code. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* linux: Enable vDSO clock_gettime64 for mipsAdhemerval Zanella2020-01-031-0/+5
| | | | | | It was added on Linux 5.4 (commit 1f66c45db3302). Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* linux: Enable vDSO clock_gettime64 for armAdhemerval Zanella2020-01-031-0/+1
| | | | | | It was added on Linux 5.5 (commit 74d06efb9c2f9). Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* linux: Enable vDSO clock_gettime64 for i386Adhemerval Zanella2020-01-031-0/+1
| | | | | | | | It was added on Linux 5.3 (commit 22ca962288c0a). Checked on i686-linux-gnu with 5.3.0 kernel. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* linux: Optimize fallback 32-bit clock_gettimeAdhemerval Zanella2020-01-031-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch avoid probing the __NR_clock_getttime64 syscall each time __clock_gettime64 is issued on a kernel without 64 bit time support. Once ENOSYS is obtained, only 32-bit clock_gettime are used. The following snippet: clock_gettime (CLOCK_REALTIME, &(struct timespec) { 0 }); clock_gettime (CLOCK_MONOTONIC, &(struct timespec) { 0 }); clock_gettime (CLOCK_BOOTTIME, &(struct timespec) { 0 }); clock_gettime (20, &(struct timespec) { 0 }); On a kernel without 64 bit time support and with vDSO support results on the following syscalls: syscall_0x193(0, 0xff87ba30, [...]) = -1 ENOSYS (Function not implemented) clock_gettime(CLOCK_BOOTTIME, {tv_sec=927082, tv_nsec=474382032}) = 0 clock_gettime(0x14 /* CLOCK_??? */, 0xff87b9f8) = -1 EINVAL (Invalid argument) While on a kernel without vDSO support: syscall_0x193(0, 0xbec95550, 0xb6ed2000, 0x1, 0xbec95550, 0) = -1 (errno 38) clock_gettime(CLOCK_REALTIME, {tv_sec=1576615930, tv_nsec=638250162}) = 0 clock_gettime(CLOCK_MONOTONIC, {tv_sec=1665478, tv_nsec=638779620}) = 0 clock_gettime(CLOCK_BOOTTIME, {tv_sec=1675418, tv_nsec=292932704}) = 0 clock_gettime(0x14 /* CLOCK_??? */, 0xbec95530) = -1 EINVAL (Invalid argument) Checked on i686-linux-gnu on 4.15 kernel and on a 5.3 kernel. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* linux: Add support for clock_gettime64 vDSOAdhemerval Zanella2020-01-039-12/+34
| | | | | | | | No architecture currently defines the vDSO symbol. On architectures with 64-bit time_t the HAVE_CLOCK_GETTIME_VSYSCALL is renamed to HAVE_CLOCK_GETTIME64_VSYSCALL, it simplifies clock_gettime code. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* elf: Move vDSO setup to rtld (BZ#24967)Adhemerval Zanella2020-01-0331-289/+257
| | | | | | | | | | | | | | | | | | | | | | | | This patch moves the vDSO setup from libc to loader code, just after the vDSO link_map setup. For static case the initialization is moved to _dl_non_dynamic_init instead. Instead of using the mangled pointer, the vDSO data is set as attribute_relro (on _rtld_global_ro for shared or _dl_vdso_* for static). It is read-only even with partial relro. It fixes BZ#24967 now that the vDSO pointer is setup earlier than malloc interposition is called. Also, vDSO calls should not be a problem for static dlopen as indicated by BZ#20802. The vDSO pointer would be zero-initialized and the syscall will be issued instead. Checked on x86_64-linux-gnu, i686-linux-gnu, aarch64-linux-gnu, arm-linux-gnueabihf, powerpc64le-linux-gnu, powerpc64-linux-gnu, powerpc-linux-gnu, s390x-linux-gnu, sparc64-linux-gnu, and sparcv9-linux-gnu. I also run some tests on mips. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* elf: Enable relro for static buildAdhemerval Zanella2020-01-031-4/+14
| | | | | | | | | | | | | | | | | | | | | The code is similar to the one at elf/dl-reloc.c, where it checks for the l_relro_size from the link_map (obtained from PT_GNU_RELRO header from program headers) and calls_dl_protected_relro. For testing I will use the ones proposed by Florian's patch 'elf: Add tests for working RELRO protection' [1]. Checked on x86_64-linux-gnu, i686-linux-gnu, powerpc64le-linux-gnu, aarch64-linux-gnu, s390x-linux-gnu, and sparc64-linux-gnu. I also check with --enable-static pie on x86_64-linux-gnu, i686-linux-gnu, and aarch64-linux-gnu which seems the only architectures where static PIE is actually working (as per 9d7a3741c9e, on arm-linux-gnueabihf, powerpc64{le}-linux-gnu, and s390x-linux-gnu I am seeing runtime issues not related to my patch). [1] https://sourceware.org/ml/libc-alpha/2019-10/msg00059.html Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* linux: Consolidate time implementationAdhemerval Zanella2020-01-033-55/+54
| | | | | | | | | | | The IFUNC bypass to vDSO is used when USE_IFUNC_TIME is set. Currently powerpc and x86 defines it. Otherwise the generic implementation is used, which calls clock_gettime. Checked on powerpc64le-linux-gnu, powerpc64-linux-gnu, powerpc-linux-gnu-power4, x86_64-linux-gnu, and i686-linux-gnu. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>