aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add RISC-V 32-bit target to build-many-glibcs.pygentoo/2.32-rv32Zong Li2020-09-131-0/+15
| | | | | | | | | Support building three variants of 32-bit RISC-V glibc as follows: - riscv32-linux-gnu-rv32imac-ilp32 - riscv32-linux-gnu-rv32imafdc-ilp32 - riscv32-linux-gnu-rv32imafdc-ilp32d Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
* RISC-V: Build infrastructure for 32-bit portZong Li2020-09-139-10/+69
| | | | | | | | This patch lays out the top-level organisation of the RISC-V 32-bit port. It provides all the Implies files as well as various other fragments of the build infrastructure. Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
* RISC-V: Add rv32 path to RTLDLIST in lddZong Li2020-09-131-1/+1
| | | | Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
* riscv32: Specify the arch_minimum_kernel as 5.4Alistair Francis2020-09-132-0/+8
| | | | | | | | | | Specify the minimum kernel version for RISC-V 32-bit as the 5.4 kernel. We require this commit: "waitid: Add support for waiting for the current process group" for the kernel as it adds support for the P_PGID id for the waitid syscall. Without this patch we can't replace the wait4 syscall on 64-bit time_t only systems. Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
* RISC-V: Fix llrint and llround missing exceptions on RV32Zong Li2020-09-131-0/+38
| | | | | | | | | Conversions from a float to a long long on 32-bit RISC-V (RV32) may not raise the correct exceptions on overflow, it also may raise spurious "inexact" exceptions on non overflow cases. This patch fixes the problem, similarly to the fix for MIPS, ARM and S390. Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
* RISC-V: Add the RV32 libm-test-ulpsAlistair Francis2020-09-132-0/+1406
| | | | | | | | | Add a libm-test-ulps for RV32, this is the same as the RV64 one. This dosn't match what is generated by running `make regen-ulps` on RV32 QEMU, but the current in tree RV64 doesn't match that either. Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
* RISC-V: Add 32-bit ABI listsAlistair Francis2020-09-1313-0/+3336
| | | | | | Use the update-abi Make target to generate the abilist for RV32. Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
* RISC-V: Add hard float support for 32-bit CPUsZong Li2020-09-134-0/+124
| | | | | | | This patch adds support for hardware floating-point support for the RV32IF and RV32IFD platforms. Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
* RISC-V: Support the 32-bit ABI implementationAlistair Francis2020-09-137-22/+146
| | | | | | | This patch adds the ABI implementation for 32-bit RISC-V. It contains the Linux-specific and RISC-V architecture code. Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
* RISC-V: Add arch-syscall.h for RV32Alistair Francis2020-09-131-0/+284
| | | | Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
* RISC-V: Add path of library directories for the 32-bitAlistair Francis2020-09-131-16/+38
| | | | | | | | | | | | | | | | | With RV32 support the list of possible RISC-V system directories increases to: - /lib64/lp64d - /lib64/lp64 - /lib32/ilp32d - /lib32/ilp32 - /lib (only ld.so) This patch changes the add_system_dir () macro to support the new ilp32d and ilp32 directories for RV32. While refactoring this code let's split out the confusing if statements into a loop to make it easier to understand and extend. Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
* RISC-V: Support dynamic loader for the 32-bitZong Li2020-09-131-1/+1
| | | | | | Add the LD_SO_ABI definition for RISC-V 32-bit. Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
* RISC-V: Add support for 32-bit vDSO callsAlistair Francis2020-09-131-6/+17
| | | | Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
* RISC-V: Use 64-bit-time syscall numbers with the 32-bit portAlistair Francis2020-09-131-0/+23
| | | | | | | | | | | | | | | | | | | sysdep.h redefines only the syscall where the generic implementation still does not have actual 64-bit time_t support: /* Workarounds for generic code needing to handle 64-bit time_t. */ /* Fix sysdeps/unix/sysv/linux/clock_getcpuclockid.c. */ #define __NR_clock_getres __NR_clock_getres_time64 /* Fix sysdeps/nptl/lowlevellock-futex.h. */ #define __NR_futex __NR_futex_time64 [...] This patch also adds a comment that it is a workaround to handle 64-bit time_t and on each #define comment for which implementation it intends to. Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
* RISC-V: Cleanup some of the sysdep.h codeAlistair Francis2020-09-131-13/+4
| | | | | | | | Remove a duplicate inclusion of <sysdeps/unix/sysdep.h> which is already pulled via <sysdeps/unix/sysv/linux/generic/sysdep.h>, and the inclusion of <errno.h> whose definition of `__set_errno' is not needed here. Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
* RISC-V: Use 64-bit time_t and off_t for RV32 and RV64Alistair Francis2020-09-134-0/+162
| | | | | | | | | | | | | | | | | | | | | | Using the original glibc headers under bits/ let's make small modifications to use 64-bit time_t and off_t for both RV32 and RV64. For the typesizes.h, here are justifications for the changes from the generic version (based on Arnd's very helpful feedback): - All the !__USE_FILE_OFFSET64 types (__off_t, __ino_t, __rlim_t, ...) are changed to match the 64-bit replacements. - __time_t is defined to 64 bit, but no __time64_t is added. This makes sense as we don't have the time64 support for other 32-bit architectures yet, and it will be easy to change when that happens. - __suseconds_t is 64-bit. This matches what we use the kernel ABI for the few drivers that are relying on 'struct timeval' input arguments in ioctl, as well as the adjtimex system call. It means that timeval has to be defined without the padding, unlike timespec, which needs padding. Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
* io/lockf: Include bits/types.h before __OFF_T_MATCHES_OFF64_T checkAlistair Francis2020-09-131-0/+2
| | | | | | | | | It's possible that although __OFF_T_MATCHES_OFF64_T is defined the included the relevent header file. This results in a io/tst-lockf failure for RV32 by calling the non 64-bit version of lockf. This patch fixes the failure by including bits/types.h. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* elf/tst-libc_dlvsym: Add a TEST_COMPAT around some symbol testsAlistair Francis2020-09-131-0/+5
| | | | | | | | | The _sys_errlist and _sys_siglist symbols are deprecated since 2.32. This patch adds a TEST_COMPAT check around the tests. This fixes test failures on new architectures (such as RV32) that don't have this symbol defined. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Fix miscompilation on ia64's gcc-10gentoo/glibc-2.32-1Sergei Trofimovich2020-08-051-1/+3
| | | | | Bug: https://bugs.gentoo.org/723268 Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* Force -O0 in conform tests to survive $CC changesAndreas K. Hüttel2020-08-052-3/+7
| | | | | | | | | | | | | In bug #659030 Gentoo started passing user's CFLAGS via $CC variable. conform tests should but are not ready to handle -O1/-O2 yet. Tests fail to validate headers due to inlining of weak symbol aliases and other problems. Let's force it back to -O0 until it's fixed upstream. Original patch by Sergei, ported to the new python test framework by Andreas Bug: https://bugs.gentoo.org/659030 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* Add C.UTF-8 localeMike FABIAN2020-08-052-0/+239
| | | | | | | | | | | | | | | | | | | | Source: https://src.fedoraproject.org/rpms/glibc/raw/master/f/glibc-c-utf8-locale.patch Notes from there: This patch needs to upstream as part of Carlos O'Donell <carlos@redhat.com>'s work on enabling upstream C.UTF-8 support. This work is currently blocked on cleaning up the test results to prove that full code-point sorting is working as intended. Note that this patch does not provide full code-point sorting as expected. This patch needs to upstream as soon as possible since it would be nice to have this in F29 and fixed. Further information: https://bugzilla.redhat.com/show_bug.cgi?id=902094 https://sourceware.org/bugzilla/show_bug.cgi?id=17318 https://bugs.gentoo.org/671024
* Adapt to Gentoo-specific /etc/mail/aliasesAndreas K. Hüttel2020-08-053-11/+17
| | | | | | | Patch by pacho2 Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org> (cherry picked from commit 4e616cda056f471b799beba2b1cedc787ad4ecc0)
* Revert " * sysdeps/posix/getaddrinfo.c (gaih_inet): Only use gethostbyname4_r"Andreas K. Hüttel2020-08-052-8/+2
| | | | | | | | | | This reverts commit 8479f23aa1d5e5477a37f46823856bdafaedfa46. See for the background https://sourceware.org/bugzilla/show_bug.cgi?id=16826 https://bugs.gentoo.org/show_bug.cgi?id=600632 This makes tst-nss-files-hosts-multi fail. Disable it.
* Disable ldconfig during installMike Frysinger2020-08-051-0/+1
| | | | | | | | | | Do not bother running ldconfig on DESTDIR. It's a waste of time as we won't use the result (portage will rebuild the cache after install). Also, the Gentoo sandbox does not currently catch chroot() behavior so we end up (incorrectly) flagging it as a violation as a write to /etc. http://sourceware.org/ml/libc-alpha/2012-08/msg00118.html https://bugs.gentoo.org/431038
* Prepare for glibc 2.32 release.glibc-2.32Carlos O'Donell2020-08-043-3/+15380
| | | | Update version.h, features.h, and ChangeLog.old/ChangeLog.21.
* Regenerate configure scripts.Carlos O'Donell2020-08-042-1/+2
|
* Update NEWS with bugs.Carlos O'Donell2020-08-041-2/+110
|
* Update translations.Carlos O'Donell2020-08-0435-25496/+17951
| | | | Incorporate updates from translationproject.org.
* Don't mix linker error messages into edited scriptsAlan Modra2020-08-041-2/+2
| | | | | | | * Makerules (shlib.lds): Discard linker warning output. (format.lds): Likewise. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* benchtests/README update.Paul Zimmermann2020-08-041-6/+14
| | | | | | Improve documentation of the 'name' directive and the 'workload' mechanism. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* RISC-V: Update lp64d libm-test-ulps according to HiFive UnleashedMaciej W. Rozycki2020-08-041-15/+18
| | | | | | | Produced with HiFive Unleashed hardware using Linux 5.8-rc5 exactly and GCC 10.0.1 20200426. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* aarch64: update NEWS about branch protectionSzabolcs Nagy2020-08-031-1/+3
| | | | | | | | | | | After some discussions it seems the original news was not clear and that it is valid to manually pass the branch protection flags iff GCC target libs are built with them too. The main difference between manually passing the flags and using the configure option is that the latter also makes branch protection the default in GCC which may not be desirable in some cases. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Add NEWS entry for CVE-2016-10228 (bug 19519)Aurelien Jarno2020-08-031-0/+4
|
* powerpc: Fix incorrect cache line size load in memset (bug 26332)Florian Weimer2020-08-031-2/+2
| | | | | | | | | | | | | | | | __GLRO loaded the word after the requested variable on big-endian PowerPC, where LOWORD is 4. This can cause the memset implement go wrong because the masking with the cache line size produces wrong results, particularly if the loaded value happens to be 1. The __GLRO macro is not used in any place where loading the lower 32-bit word of a 64-bit value is desired, so the +4 offset is always wrong. Fixes commit 18363b4f010da9ba459b13310b113ac0647c2fcc ("powerpc: Move cache line size to rtld_global_ro") and bug 26332. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Update Nios II libm-test-ulps file.Chung-Lin Tang2020-08-031-11/+11
|
* Move NEWS entry for CVE-2020-1751 to the 2.31 sectionFlorian Weimer2020-07-311-3/+3
| | | | | | | | It was fixed in commit d93769405996dfc11d216ddbe415946617b5a494 ("Fix array overflow in backtrace on PowerPC (bug 25423)"), which went into glibc 2.31. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* NEWS: Deprecate weak libpthread symbols for single-threaded checksFlorian Weimer2020-07-311-0/+8
| | | | | | Recommend the new __libc_single_thread variable instead. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* NEWS: Deprecate nss_hesiodFlorian Weimer2020-07-311-0/+5
| | | | | | | Storing user databases in DNS, without client-side DNSSEC validation, is problematic from a security point of view. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* nptl: Zero-extend arguments to SETXID syscalls [BZ #26248]H.J. Lu2020-07-273-2/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nptl has /* Opcodes and data types for communication with the signal handler to change user/group IDs. */ struct xid_command { int syscall_no; long int id[3]; volatile int cntr; volatile int error; }; /* This must be last, otherwise the current thread might not have permissions to send SIGSETXID syscall to the other threads. */ result = INTERNAL_SYSCALL_NCS (cmdp->syscall_no, 3, cmdp->id[0], cmdp->id[1], cmdp->id[2]); But the second argument of setgroups syscal is a pointer: int setgroups (size_t size, const gid_t *list); But on x32, pointers passed to syscall must have pointer type so that they will be zero-extended. The kernel XID arguments are unsigned and do not require sign extension. Change xid_command to struct xid_command { int syscall_no; unsigned long int id[3]; volatile int cntr; volatile int error; }; so that all arguments are zero-extended. A testcase is added for x32 and setgroups returned with EFAULT when running as root without the fix.
* Use binutils 2.35 branch in build-many-glibcs.py.Joseph Myers2020-07-271-1/+1
| | | | | | This patch makes build-many-glibcs.py use binutils 2.35 branch. Tested with build-many-glibcs.py (compilers and glibcs builds).
* aarch64: Use future HWCAP2_MTE in ifunc resolverSzabolcs Nagy2020-07-271-2/+8
| | | | | | | | | | | Make glibc MTE-safe on systems where MTE is available. This allows using heap tagging with an LD_PRELOADed malloc implementation that enables MTE. We don't document this as guaranteed contract yet, so glibc may not be MTE safe when HWCAP2_MTE is set (older glibcs certainly aren't). This is mainly for testing and debugging. The HWCAP flag is not exposed in public headers until Linux adds it to its uapi. The HWCAP value reservation will be in Linux 5.9.
* Update x86-64 libm-test-ulpsAndreas K. Hüttel2020-07-251-2/+2
| | | | | | x86_64 Intel(R) Core(TM) i5-8265U gcc (Gentoo 10.1.0-r2 p3) 10.1.0 Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* aarch64: Respect p_flags when protecting code with PROT_BTISzabolcs Nagy2020-07-241-1/+8
| | | | | | | | | | | | Use PROT_READ and PROT_WRITE according to the load segment p_flags when adding PROT_BTI. This is before processing relocations which may drop PROT_BTI in case of textrels. Executable stacks are not protected via PROT_BTI either. PROT_BTI is hardening in case memory corruption happened, it's value is reduced if there is writable and executable memory available so missing it on such memory is fine, but we should respect the p_flags and should not drop PROT_WRITE.
* Disable warnings due to deprecated libselinux symbols used by nss and nscdArjun Shankar2020-07-232-0/+24
| | | | | | | | | | | The SELinux API deprecated several symbols in its 3.1 release, including security_context_t, matchpathcon, avc_init, and sidput, which are used in makedb and nscd. While the usage of these should eventually be replaced by newer interfaces, this commit disables GCC warnings due to the use of the above symbols. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* Regenerate INSTALL for ARC port updates.Carlos O'Donell2020-07-221-0/+5
|
* Update libc.pot for 2.32 release.Carlos O'Donell2020-07-221-918/+647
|
* powerpc: Fix POWER10 selectionTulio Magno Quites Machado Filho2020-07-211-0/+1
| | | | | | | | | | Add a line that was missing from a previous commit. Without increasing str, the null-byte is not validated, and _dl_string_platform returns -1. Fixes: d2ba3677da7a ("powerpc: Add support for POWER10") Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* powerpc64le: guarantee a .gnu.attributes section [BZ #26220]Paul E. Murphy2020-07-211-0/+8
| | | | | | | | | | Upstream GCC 11 development is now building the ibm128 runtime support (in libgcc) without a .gnu.attributes section on ppc64le. Ensure we have one to replace by building one ibm128 file in libc and libm with attributes. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
* libio: Remove __libc_readline_unlockedFlorian Weimer2020-07-215-423/+2
| | | | | | | | | | | __nss_readline supersedes it. This reverts part of commit 3f5e3f5d066dcffb80af48ae2cf35a01a85a8f10 ("libio: Implement internal function __libc_readline_unlocked"). The internal aliases __fseeko64 and __ftello64 are preserved because they are needed by __nss_readline as well. Tested-by: Carlos O'Donell <carlos@redhat.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* 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>