about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* shadow: Implement fgetspent_r using __nss_fgetent_rFlorian Weimer2020-07-212-37/+7
| | | | | Tested-by: Carlos O'Donell <carlos@redhat.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* pwd: Implement fgetpwent_r using __nss_fgetent_rFlorian Weimer2020-07-211-37/+6
| | | | | Tested-by: Carlos O'Donell <carlos@redhat.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* gshadow: Implement fgetsgent_r using __nss_fgetent_r (bug 20338)Florian Weimer2020-07-213-36/+198
| | | | | Tested-by: Carlos O'Donell <carlos@redhat.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* grp: Implement fgetgrent_r using __nss_fgetent_rFlorian Weimer2020-07-211-48/+6
| | | | | Tested-by: Carlos O'Donell <carlos@redhat.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* nss: Add __nss_fgetent_rFlorian Weimer2020-07-217-54/+260
| | | | | | | | | | | | And helper functions __nss_readline, __nss_readline_seek, __nss_parse_line_result. This consolidates common code for handling overlong lines and parse files. Use the new functionality in internal_getent in nss/nss_files/files-XXX.c. Tested-by: Carlos O'Donell <carlos@redhat.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* libio: Add fseterr_unlocked for internal useFlorian Weimer2020-07-211-0/+7
| | | | | Tested-by: Carlos O'Donell <carlos@redhat.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* nss_files: Use generic result pointer in parse_lineFlorian Weimer2020-07-212-38/+15
| | | | | | | | | | | | | As a result, all parse_line functions have the same prototype, except for that producing struct hostent. This change is ABI-compatible, so it does not alter the internal GLIBC_PRIVATE ABI (otherwise we should probably have renamed the exported functions). A future change will use this to implement a generict fget*ent_r function. Tested-by: Carlos O'Donell <carlos@redhat.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* nss_files: Consolidate line parse declarations in <nss_files.h>Florian Weimer2020-07-219-49/+52
| | | | | | | | These functions should eventually have the same type, so it makes sense to declare them together. Tested-by: Carlos O'Donell <carlos@redhat.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* nss_compat: Do not use mmap to read database files (bug 26258)Florian Weimer2020-07-214-16/+8
| | | | | | | | | This avoids crashes in case the files are truncated for some reason. For typically file sizes, it is also going to be slightly faster. Using __nss_files_fopen instead mirrors what nss_files does. Tested-by: Carlos O'Donell <carlos@redhat.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* nss_files: Consolidate file opening in __nss_files_fopenFlorian Weimer2020-07-218-11/+86
| | | | | Tested-by: Carlos O'Donell <carlos@redhat.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Update powerpc-nofpu libm-test-ulps.Joseph Myers2020-07-201-30/+30
|
* Use MPFR 4.1.0 in build-many-glibcs.py.Joseph Myers2020-07-201-1/+1
| | | | | | | This patch makes build-many-glibcs.py use the new MPFR 4.1.0 release. Tested with build-many-glibcs.py (host-libraries, compilers and glibcs builds).
* elf: Change TLS static surplus default back to 1664Florian Weimer2020-07-203-8/+75
| | | | | | | Make the computation in elf/dl-tls.c more transparent, and add an explicit test for the historic value. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* hurd: Fix longjmp check for sigstateSamuel Thibault2020-07-182-2/+2
| | | | | * sysdeps/mach/hurd/i386/____longjmp_chk.S,__longjmp.S: Properly check for sigstate being NULL.
* hurd: Fix longjmp early in initializationSamuel Thibault2020-07-182-2/+16
| | | | | | | | | When e.g. an LD_PRELOAD fails, _dl_signal_exception/error longjmps, but TLS is not initialized yet, let along signal state. We thus mustn't look at them within __longjmp. * sysdeps/mach/hurd/i386/____longjmp_chk.S,__longjmp.S: Check for initialized value of %gs, and that sigstate is non-NULL.
* manual: New signal and errno string functions are AS-safeFlorian Weimer2020-07-172-4/+4
| | | | | | | | The annotations for sigabbrev_np, sigdescr_np, strerrordesc_np, strerrorname_np are not preliminary. These functions were added precisely because they are AS-safe. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* AArch64: Improve strlen_asimd performance (bug 25824)Wilco Dijkstra2020-07-175-126/+161
| | | | | | | | | | | | | | | | | Optimize strlen using a mix of scalar and SIMD code. On modern micro architectures large strings are 2.6 times faster than existing strlen_asimd and 35% faster than the new MTE version of strlen. On a random strlen benchmark using small sizes the speedup is 7% vs strlen_asimd and 40% vs the MTE strlen. This fixes the main strlen regressions on Cortex-A53 and other cores with a simple Neon unit. Rename __strlen_generic to __strlen_mte, and select strlen_asimd when MTE is not enabled (this is waiting on support for a HWCAP_MTE bit). This fixes big-endian bug 25824. Passes GLIBC regression tests. Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
* Move <rpc/netdb.h> from sunrpc to inetFlorian Weimer2020-07-175-12/+3
| | | | | | | | | | | Restore <rpc/netdb.h> as an installed header. Delete the dummy header resolv/rpc/netdb.h because inet is not an optional glibc component (so its <rpc/netdb.h> is always available). Fixes commit acb527929d0c2b3bb0798472c42ddb3203729708 ("Move non-deprecated RPC-related functions from sunrpc to inet") in combination with commit 5500cdba4018ddbda7909bc7f4f9718610b43cf0 ("Remove --enable-obsolete-rpc configure flag").
* en_US: Minimize changes to date_fmt (Bug 25923)Carlos O'Donell2020-07-161-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 2000 when date_fmt was originally added as an extension the en_US locale did not have a date_fmt specifier and so used the default which resulted in the abbreviated month name coming before the day of the month (as expected in the US and other locales). In commit 7395f3a0efad9fc51bb54fa383ef6524702e0c49 the date_fmt was added to en_US with a 12H time to better align with US user expectations. Unfortunately the abbreviated month name and day were inverted during that transition, and that was seen as a regression and reported against Fedora 32: https://bugzilla.redhat.com/show_bug.cgi?id=1830623 The progression of date_fmt looks like this: "%a %b %e %H:%M:%S %Z %Y" <- Originally (2000) "%a %d %b %Y %I:%M:%S %p %Z" <- glibc 2.29 (2019) "%a %b %e %r %Z %Y" <- glibc 2.32 (2020) [this commit] Note: "%r" is "%I:%M:%S %p" in en_US and so shorter to write. Likewise the year is in the wrong place in commit 7395f3a0efad9fc51bb54fa383ef6524702e0c49 and this is corrected in this patch. For reference d_t_fmt: "%a %d %b %Y %r %Z" <- d_t_fmt (1997) Yes, d_t_fmt and date_fmt are *not* the same, this is just the history of this locale. This commit does not change d_t_fmt to better align with date_fmt. No users have requested we change d_t_fmt or given any justification for such a change. The only goals of this change are to place the abbreviated month name before the day of the month as it has been printed since 2000, and place the year at the end. This minimizes the change from commit 7395f3a0efad9fc51bb54fa383ef6524702e0c49 and makes good on changing only from 24H clock to 12H clock. Reviewed-by: Florian Weimer <fweimer@redhat.com>
* Linux: Remove rseq supportFlorian Weimer2020-07-1654-1197/+6
| | | | | | | | | | | | | | | | | | The kernel ABI is not finalized, and there are now various proposals to change the size of struct rseq, which would make the glibc ABI dependent on the version of the kernels used for building glibc. This is of course not acceptable. This reverts commit 48699da1c468543ade14777819bd1b4d652709de ("elf: Support at least 32-byte alignment in static dlopen"), commit 8f4632deb3545b2949cec5454afc3cb21a0024ea ("Linux: rseq registration tests"), commit 6e29cb3f61ff5432c78a1c84b0d9b123a350ab36 ("Linux: Use rseq in sched_getcpu if available"), and commit 0c76fc3c2b346dc5401dc055d97d4279632b0fb3 ("Linux: Perform rseq registration at C startup and thread creation"), resolving the conflicts introduced by the ARC port and the TLS static surplus changes. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* manual: Use Unicode instead HTML entities for characters (bug 19737)Florian Weimer2020-07-161-3/+3
| | | | | | | | | | Texinfo no longer treats arguments to @set in @ifhtml blocks as literal HTML, so the & in the entity references was encoded as @amp; in HTML. Using the equivalent Unicode characters avoids this issue. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* Add NEWS entry for CVE-2020-6096 (bug 25620)Aurelien Jarno2020-07-161-0/+5
| | | | Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* arm: remove string/tst-memmove-overflow XFAILAurelien Jarno2020-07-161-5/+0
| | | | | | | | | | | | | The arm string/tst-memmove-overflow XFAIL has been added in commit eca1b233322 ("arm: XFAIL string/tst-memmove-overflow due to bug 25620") as a way to reproduce the reported bug. Now that this bug has been fixed in commits 79a4fa341b8 ("arm: CVE-2020-6096: fix memcpy and memmove for negative length [BZ #25620]") and beea3610507 ("arm: CVE-2020-6096: Fix multiarch memcpy for negative length [BZ #25620]"), let's remove the XFAIL. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* AArch64: Rename IS_ARES to IS_NEOVERSE_N1Wilco Dijkstra2020-07-153-4/+8
| | | | | | Rename IS_ARES to IS_NEOVERSE_N1 since that is a bit clearer. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* AArch64: Add optimized Q-register memcpyWilco Dijkstra2020-07-155-4/+255
| | | | | | | | | | | | | | | | Add a new memcpy using 128-bit Q registers - this is faster on modern cores and reduces codesize. Similar to the generic memcpy, small cases include copies up to 32 bytes. 64-128 byte copies are split into two cases to improve performance of 64-96 byte copies. Large copies align the source rather than the destination. bench-memcpy-random is ~9% faster than memcpy_falkor on Neoverse N1, so make this memcpy the default on N1 (on Centriq it is 15% faster than memcpy_falkor). Passes GLIBC regression tests. Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
* AArch64: Align ENTRY to a cachelineWilco Dijkstra2020-07-151-1/+1
| | | | | | | Given almost all uses of ENTRY are for string/memory functions, align ENTRY to a cacheline to simplify things. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Correct timespec implementation [BZ #26232]H.J. Lu2020-07-144-54/+71
| | | | | | | | | | | | | | | | | | | | | | | | commit 04deeaa9ea74b0679dfc9d9155a37b6425f19a9f Author: Lucas A. M. Magalhaes <lamm@linux.ibm.com> Date: Fri Jul 10 19:41:06 2020 -0300 Fix time/tst-cpuclock1 intermitent failures has 2 issues: 1. It assumes time_t == long which is false on x32. 2. tst-timespec.c is compiled without -fexcess-precision=standard which generates incorrect results on i686 in support_timespec_check_in_range: double ratio = (double)observed_norm / expected_norm; return (lower_bound <= ratio && ratio <= upper_bound); This patch does 1. Compile tst-timespec.c with -fexcess-precision=standard. 2. Replace long with time_t. 3. Replace LONG_MIN and LONG_MAX with TYPE_MINIMUM (time_t) and TYPE_MAXIMUM (time_t).
* Remove --enable-obsolete-rpc configure flagPetr Vorel2020-07-1343-9603/+35
| | | | | | | | | | | | | | | | | | | | | | Sun RPC was removed from glibc. This includes rpcgen program, librpcsvc, and Sun RPC headers. Also test for bug #20790 was removed (test for rpcgen). Backward compatibility for old programs is kept only for architectures and ABIs that have been added in or before version 2.28. libtirpc is mature enough, librpcsvc and rpcgen are provided in rpcsvc-proto project. NOTE: libnsl code depends on Sun RPC (installed libnsl headers use installed Sun RPC headers), thus --enable-obsolete-rpc was a dependency for --enable-obsolete-nsl (removed in a previous commit). The arc ABI list file has to be updated because the port was added with the sunrpc symbols Tested-by: Carlos O'Donell <carlos@redhat.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* hurd: Fix build-many-glibcs.pyAdhemerval Zanella2020-07-133-0/+3
| | | | | | | | It fixes the issue report by Joseph [1]. Checked with a build-many-glibcs.py build for i686-gnu. [1] https://sourceware.org/pipermail/libc-alpha/2020-July/116134.html
* x86: Support usable check for all CPU featuresH.J. Lu2020-07-1363-732/+854
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support usable check for all CPU features with the following changes: 1. Change struct cpu_features to struct cpuid_features { struct cpuid_registers cpuid; struct cpuid_registers usable; }; struct cpu_features { struct cpu_features_basic basic; struct cpuid_features features[COMMON_CPUID_INDEX_MAX]; unsigned int preferred[PREFERRED_FEATURE_INDEX_MAX]; ... }; so that there is a usable bit for each cpuid bit. 2. After the cpuid bits have been initialized, copy the known bits to the usable bits. EAX/EBX from INDEX_1 and EAX from INDEX_7 aren't used for CPU feature detection. 3. Clear the usable bits which require OS support. 4. If the feature is supported by OS, copy its cpuid bit to its usable bit. 5. Replace HAS_CPU_FEATURE and CPU_FEATURES_CPU_P with CPU_FEATURE_USABLE and CPU_FEATURE_USABLE_P to check if a feature is usable. 6. Add DEPR_FPU_CS_DS for INDEX_7_EBX_13. 7. Unset MPX feature since it has been deprecated. The results are 1. If the feature is known and doesn't requre OS support, its usable bit is copied from the cpuid bit. 2. Otherwise, its usable bit is copied from the cpuid bit only if the feature is known to supported by OS. 3. CPU_FEATURE_USABLE/CPU_FEATURE_USABLE_P are used to check if the feature can be used. 4. HAS_CPU_FEATURE/CPU_FEATURE_CPU_P are used to check if CPU supports the feature.
* string: Make tst-strerror/tst-strsignal unsupported if msgfmt is not installedAdhemerval Zanella2020-07-133-1/+14
| | | | | | | | | | | | | Without msgfmt libc.mo files are not generated and its loading failure is silent ignored with xsetlocale. Also unset LANGUAGE environment variable to avoid it taking precedence when loading the message catalog. Although not strictly required (since the test is issued with test-container and it sets a strict environment variable) it follows other tests that deal with translation. Checked on x86_64-linux-gnu.
* malloc: Deprecate more hook-related functionalityFlorian Weimer2020-07-132-3/+11
| | | | | | | | __morecore, __after_morecore_hook, and __default_morecore had not been deprecated in commit 7d17596c198f11fa85cbcf9587443f262e63b616 ("Mark malloc hook variables as deprecated"), probably by accident. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* elf: Support at least 32-byte alignment in static dlopenFlorian Weimer2020-07-121-0/+6
| | | | | | | | | | | Otherwise loading a dynamically linked libc with rseq support fails, as result of the __rseq_abi TLS variable, which has an alignment of 32 bytes. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Vineet Gupta <vgupta@synopsys.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Tested-by: Alistair Francis <alistair.francis@wdc.com>
* x86: Remove __ASSEMBLER__ check in init-arch.hH.J. Lu2020-07-111-5/+1
| | | | | | | | | | | | | Since commit 430388d5dc0e1861b869096f4f5d946d7d74232a Author: H.J. Lu <hjl.tools@gmail.com> Date: Fri Aug 3 08:04:49 2018 -0700 x86: Don't include <init-arch.h> in assembly codes removed all usages of <init-arch.h> from assembly codes, we can remove __ASSEMBLER__ check in init-arch.h.
* x86: Remove the unused __x86_prefetchwH.J. Lu2020-07-115-24/+5
| | | | | | | | | | | | | Since commit c867597bff2562180a18da4b8dba89d24e8b65c4 Author: H.J. Lu <hjl.tools@gmail.com> Date: Wed Jun 8 13:57:50 2016 -0700 X86-64: Remove previous default/SSE2/AVX2 memcpy/memmove removed the only usage of __x86_prefetchw, we can remove the unused __x86_prefetchw.
* Documentation for ARC portVineet Gupta2020-07-103-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (a) ABI doc: https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/wiki/files/ARCv2_ABI.pdf (b) Programmer's Reference Manual (PRM) : needs a download request to be filled https://www.synopsys.com/dw/ipdir.php?ds=arc-hs44-hs46-hs48 https://www.synopsys.com/dw/doc.php/ds/cc/programmers-reference-manual-ARC-HS.pdf As of port merge (and Florian's patch to fix static TLS), glibc testsuite (cross-test setup) has following failures: FAIL: elf/tst-audit14 FAIL: elf/tst-audit15 FAIL: elf/tst-audit16 FAIL: elf/tst-ldconfig-ld_so_conf-update FAIL: elf/tst-libc_dlvsym FAIL: elf/tst-libc_dlvsym-static FAIL: iconv/test-iconvconfig # Needs gconv installed FAIL: io/ftwtest # Requires execution by non-root FAIL: io/tst-lockf FAIL: libio/tst-wfile-sync FAIL: locale/tst-localedef-path-norm FAIL: nptl/test-cond-printers # needs Python3 and target GDB on target FAIL: nptl/test-condattr-printers # ditto FAIL: nptl/test-mutex-printers # ditto FAIL: nptl/test-mutexattr-printers # ditto FAIL: nptl/test-rwlock-printers # ditto FAIL: nptl/test-rwlockattr-printers # ditto FAIL: nptl/tst-umask1 # passes if run natively on target (NFS ACLv3 support needed) FAIL: nss/bug-erange FAIL: nss/tst-nss-files-hosts-getent FAIL: nss/tst-nss-files-hosts-multi FAIL: posix/bug-ga2 FAIL: posix/globtest # require same user on target and host FAIL: posix/tst-getaddrinfo5 FAIL: stdio-common/tst-vfprintf-width-prec FAIL: stdio-common/tst-vfprintf-width-prec-alloc FAIL: stdio-common/tst-vfprintf-width-prec-mem FAIL: string/tst-strerror FAIL: string/tst-strsignal FAIL: sunrpc/bug20790 # missing cpp on target FAIL: timezone/tst-tzset Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* build-many-glibcs.py: Enable ARC buildsVineet Gupta2020-07-101-0/+10
| | | | Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* ARC: Build InfrastructureVineet Gupta2020-07-1015-0/+369
| | | | Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* ARC: ABI listsVineet Gupta2020-07-1018-0/+4671
| | | | Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* ARC: Linux Startup and Dynamic LoadingVineet Gupta2020-07-102-0/+116
| | | | | | | | A big shoutout to Cupertino Miranda <cmiranda@synopsys.com> for his valuable contribution in initial bringup and debugging on Linux and later in solving pesky unwinding/cancelation failures in testsuite. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* ARC: Linux ABIVineet Gupta2020-07-1013-0/+600
| | | | Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* ARC: Linux Syscall InterfaceVineet Gupta2020-07-1015-0/+941
| | | | Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* ARC: hardware floating point supportVineet Gupta2020-07-1020-0/+711
| | | | Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* ARC: math soft float supportVineet Gupta2020-07-105-0/+203
| | | | Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* ARC: Atomics and Locking primitivesVineet Gupta2020-07-101-0/+69
| | | | Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* ARC: Thread Local Storage supportVineet Gupta2020-07-105-0/+240
| | | | | | This includes all 4 TLS addressing models Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* ARC: startup and dynamic linking codeVineet Gupta2020-07-107-0/+591
| | | | | | Code for C runtime startup and dynamic loading including PLT layout. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* ARC: ABI ImplementationVineet Gupta2020-07-1017-0/+547
| | | | | | This code deals with the ARC ABI. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Fix time/tst-cpuclock1 intermitent failuresLucas A. M. Magalhaes2020-07-105-30/+415
| | | | | | | | | | | | | | This test fails intermittently in systems with heavy load as CLOCK_PROCESS_CPUTIME_ID is subject to scheduler pressure. Thus the test boundaries were relaxed to keep it from failing on such systems. A refactor of the spent time checking was made with some support functions. With the advantage to representing time jitter in percent of the target. The values used by the test boundaries are all empirical. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* powerpc64: Fix calls when r2 is not used [BZ #26173]Tulio Magno Quites Machado Filho2020-07-107-4/+52
| | | | | | | | | Teach the linker that __mcount_internal, __sigjmp_save_symbol, __syscall_error and __GI_exit do not use r2, so that it does not need to recover r2 after the call. Test at configure time if the assembler supports @notoc and define USE_PPC64_NOTOC.