aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-08-20Fix namespace violation in stdio.h and sys/stat.h if build with ↵Stefan Liebler2-3/+5
optimization. [BZ #26376] If build with optimization, stdio.h and sys/stat.h are defining some inlining functions. This leads to test fails if glibc is build with the following commands. (Note that the conformtests usually builds without optimization or other CFLAGS): <glibc>/configure CC="gcc -O3" --prefix=/usr make make subdirs=conform check - FAIL: conform/XPG4/stdio.h/conform - FAIL: conform/XPG42/stdio.h/conform out-files: ... PASSCOMBINED: Availability of variable optopt PASSCOMBINED: Type of variable optopt Namespace violation: "getc_unlocked" Namespace violation: "getchar_unlocked" Namespace violation: "putc_unlocked" Namespace violation: "putchar_unlocked" FAIL: Namespace of <stdio.h> ---------------------------------------------------------------------------- Total number of tests : 168 Number of failed tests : 1 Number of xfailed tests : 0 Number of skipped tests : 0 - FAIL: conform/POSIX2008/sys/stat.h/conform out-file: ... PASSCOMBINED: Availability of function utimensat PASSCOMBINED: Type of function utimensat Namespace violation: "mknodat" FAIL: Namespace of <sys/stat.h> ---------------------------------------------------------------------------- Total number of tests : 97 Number of failed tests : 1 Number of xfailed tests : 0 Number of skipped tests : 0 For getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked in stdio.h, those are defined "# ifdef __USE_POSIX" instead of "#ifdef __USE_POSIX199506" for the non-inlining declaration. See also "Bug 20014 - stdio.h namespace for pre-threads POSIX" (https://sourceware.org/bugzilla/show_bug.cgi?id=20014). For mknodat in sys/stat.h, those are defined "# ifdef __USE_ATFILE" instead of the additional guard "# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED".
2020-08-19Add C2x BOOL_MAX and BOOL_WIDTH to limits.h.Joseph Myers1-0/+12
C2x adds BOOL_MAX and BOOL_WIDTH macros to <limits.h>. This patch adds them to glibc's <limits.h> for the case when they aren't defined by GCC's <limits.h>. Tested for x86_64.
2020-08-19Use MPC 1.2.0 in build-many-glibcs.py.Joseph Myers1-1/+1
This patch makes build-many-glibcs.py use the new MPC 1.2.0 release. Tested with build-many-glibcs.py (host-libraries, compilers and glibcs builds).
2020-08-19Add new STATX_* constants from Linux 5.8 to bits/statx-generic.h.Joseph Myers1-0/+3
This patch adds the new STATX_MNT_ID, STATX_ATTR_MOUNT_ROOT and STATX_ATTR_DAX macros from Linux 5.8 to glibc's bits/statx-generic.h. (As with previous such changes, this only does anything if glibc is being used with old kernel headers.) A comment in the Linux kernel headers indicates that STATX_ALL is deliberately not being changed. Tested for x86_64.
2020-08-18Correct locking and cancellation cleanup in syslog functions (bug 26100)Andreas Schwab1-16/+28
Properly serialize the access to the global state shared between the syslog functions, to avoid races in multithreaded processes. Protect a local allocation in the __vsyslog_internal function from leaking during cancellation.
2020-08-17nptl: Handle NULL abstime [BZ #26394]H.J. Lu2-6/+16
Since abstime passed to pthread_{clock|timed}join_np may be NULL, convert to 64 bit abstime only if abstime isn't NULL.
2020-08-13Update build-many-glibcs.py for binutils ia64 obsoletion.Joseph Myers1-3/+9
Since binutils has obsoleted ia64 support, use --enable-obsolete for now when configuring binutils for ia64 in build-many-glibcs.py (which requires adding support for architecture-specific binutils configure options there). As with other obsoletions, the removal of support for ia64 in any of (binutils, GCC, Linux kernel) should imply its removal from glibc. Tested with build-many-glibcs.py for ia64-linux-gnu (compilers and glibcs build).
2020-08-13Update kernel version to 5.8 in tst-mman-consts.py.Joseph Myers1-1/+1
This patch updates the kernel version in the test tst-mman-consts.py to 5.8. (There are no new MAP_* constants covered by this test in 5.8 that need any other header changes.) Tested with build-many-glibcs.py.
2020-08-13y2038: nptl: Convert pthread_{clock|timed}join_np to support 64 bit timeLukasz Majewski5-14/+110
The pthread_clockjoin_np and pthread_timedjoin_np have been converted to support 64 bit time. This change introduces new futex_timed_wait_cancel64 function in ./sysdeps/nptl/futex-internal.h, which uses futex_time64 where possible and tries to replace low-level preprocessor macros from lowlevellock-futex.h The pthread_{timed|clock}join_np only accept absolute time. Moreover, there is no need to check for NULL passed as *abstime pointer as clockwait_tid() always passes struct __timespec64. For systems with __TIMESIZE != 64 && __WORDSIZE == 32: - Conversions between 64 bit time to 32 bit are necessary - Redirection to __pthread_{clock|timed}join_np64 will provide support for 64 bit time Build tests: ./src/scripts/build-many-glibcs.py glibcs Run-time tests: - Run specific tests on ARM/x86 32bit systems (qemu): https://github.com/lmajewski/meta-y2038 and run tests: https://github.com/lmajewski/y2038-tests/commits/master Above tests were performed with Y2038 redirection applied as well as without to test the proper usage of both __pthread_{timed|clock}join_np64 and __pthread_{timed|clock}join_np. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
2020-08-13aarch64: update ulps.Szabolcs Nagy1-1/+1
For new j0 test.
2020-08-12S390: Regenerate ULPs.Stefan Liebler1-1/+1
Updates needed after new j0 test: commit 9bfc225078219521439ec8b0f665915e769d40c2 math: Regenerate auto-libm-test-out-j0
2020-08-08manual: Fix sigdescr_np and sigabbrev_np return type (BZ #26343)Adhemerval Zanella1-2/+2
2020-08-08math: Update x86_64 ulpsAdhemerval Zanella2-6/+6
From new j0 test.
2020-08-08math: Regenerate auto-libm-test-out-j0Adhemerval Zanella1-0/+25
This is a missing bit for b7dd366dbe.
2020-08-07manual: Put the istrerrorname_np and strerrordesc_np return type in bracesAdhemerval Zanella1-2/+2
Otherwise it is not rendered or indexed correctly.
2020-08-07Linux: Use faccessat2 to implement faccessat (bug 18683)Florian Weimer2-3/+19
This provides correct AT_EACCESS handling and also takes Linux security modules into account. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2020-08-07manual: Fix strerrorname_np and strerrordesc_np return type (BZ #26343)Adhemerval Zanella1-2/+2
2020-08-07math: Fix inaccuracy of j0f for x >= 2^127 when sin(x)+cos(x) is tinyPaul Zimmermann2-1/+18
Checked on x86_64-linux-gnu and i686-linux-gnu.
2020-08-07Update syscall lists for Linux 5.8.Joseph Myers25-2/+27
Linux 5.8 has one new syscall, faccessat2. Update syscall-names.list and regenerate the arch-syscall.h headers with build-many-glibcs.py update-syscalls. Tested with build-many-glibcs.py.
2020-08-07Use Linux 5.8 in build-many-glibcs.py.Joseph Myers1-1/+1
This patch makes build-many-glibcs.py use Linux 5.8. Tested with build-many-glibcs.py (host-libraries, compilers and glibcs builds).
2020-08-06htl: Enable tst-cancelx?[45]Samuel Thibault8-16/+17
* nptl/{tst-cancel4-common.c, tst-cancel4-common.h, tst-cancel4.c, tst-cancel5.c, tst-cancelx4.c, tst-cancelx5.c}: Move to sysdeps/pthread/ * nptl/Makefile: Move corresponding rules to... * sysdeps/pthread/Makefile: ... here.
2020-08-07tst-cancel4: Make blocking on write more portableSamuel Thibault1-4/+4
* nptl/tst-cancel4.c (tf_send, tf_sendto): Set socket buffer size after connecting.
2020-08-06hurd: Add missing hidden defSamuel Thibault1-0/+1
* sysdeps/mach/hurd/sched_gets.c (__sched_getscheduler): Add hidden def.
2020-08-05hurd: Rework sbrkSamuel Thibault4-12/+32
Making the brk start exactly at the end of the main application binary was requiring to get it through the _end symbol, which does not work any more with recent toolchains, and actually produces in libc.so a confusing external _end symbol that produces odd results, see https://sourceware.org/bugzilla/show_bug.cgi?id=23499 Trying to do so is quite outdated anyway with the tendency for address randomization. Using _end was also allowing to include the main binary data within the RLIMIT_DATA, but this also seems outdated with dynamic library loading, and nowadays' memory consumption via malloc and mmap rather than statically-allocated data. This adds a BRK_START macro in <vm_param.h> that just tells where we want to start the brk, and thus removes the _end symbol. * sysdeps/mach/hurd/i386/vm_param.h: New file. * sysdeps/mach/hurd/brk.c: Use BRK_START as brk start instead of _end. Also ignore __data_start. * hurd/Versions: Remove _end symbol. * sysdeps/mach/hurd/i386/libc.abilist: Remove _end symbol.
2020-08-05hurd: Implement basic sched_get/setschedulerSamuel Thibault2-0/+75
* sysdeps/mach/hurd/sched_gets.c: New file. * sysdeps/mach/hurd/sched_sets.c: New file.
2020-08-05x86: Rename Intel CPU feature namesH.J. Lu2-15/+15
Intel64 and IA-32 Architectures Software Developer’s Manual has changed the following CPU feature names: 1. The CPU feature of Enhanced Intel SpeedStep Technology is renamed from EST to EIST. 2. The CPU feature which supports Platform Quality of Service Monitoring (PQM) capability is changed to Intel Resource Director Technology (Intel RDT) Monitoring capability, i.e. PQM is renamed to RDT_M. 3. The CPU feature which supports Platform Quality of Service Enforcement (PQE) capability is changed to Intel Resource Director Technology (Intel RDT) Allocation capability, i.e. PQE is renamed to RDT_A.
2020-08-05manual: Fix some @code/@var formatting glitches chapter Date And TimeFlorian Weimer1-10/+10
2020-08-04Copy regex_internal.h from GnulibPaul Eggert1-2/+1
Sync this file from Gnulib, thus incorporating the following fix for a bug with regexps with 16 or more subexpressions: * posix/regex_internal.h (struct re_backref_cache_entry): Use bitset_word_t as the type of eps_reachable_subexps_map, instead of unsigned short int. This fixes a bug I introduced to glibc in 2005-09-28T17:33:18Z!drepper@redhat.com (glibc commit 2c05d33f90861d074dc12808dafbde30f487b1a0, BZ #1302). Remove unused member 'unused'.
2020-08-04Copy regex BITSET_WORD_BITS porting from GnulibPaul Eggert2-30/+22
* posix/regex.c (__STDC_WANT_IEC_60559_BFP_EXT__): Define, for ULONG_WIDTH. This syncs regex.c from Gnujlib. * posix/regex_internal.h (ULONG_WIDTH): Use a more-portable fallback, from Gnulib. (BITSET_WORD_BITS): Now defined in terms of ULONG_WIDTH.
2020-08-04Sync regex.h from GnulibPaul Eggert1-2/+0
* posix/regex.h: Remove an ‘#ifndef _CRAY’ that hasn’t been needed for years in Gnulib (and was needed only because of Gnulib).
2020-08-04Sync mktime.c from GnulibPaul Eggert1-3/+3
* time/mktime.c: Sync from Gnulib. This micro-optimizes three division-related computations.
2020-08-04Sync intprops.h from GnulibPaul Eggert1-6/+11
* include/intprops.h: Sync from Gnulib. This improves performance of INT_MULTIPLY_WRAPV on recent GCC, which affects glibc only in the support library.
2020-08-04Open master branch for glibc 2.33 development.glibc-2.32.9000Carlos O'Donell2-2/+26
Happy hacking!
2020-08-04Prepare for glibc 2.32 release.glibc-2.32Carlos O'Donell3-3/+15380
Update version.h, features.h, and ChangeLog.old/ChangeLog.21.
2020-08-04Regenerate configure scripts.Carlos O'Donell2-1/+2
2020-08-04Update NEWS with bugs.Carlos O'Donell1-2/+110
2020-08-04Update translations.Carlos O'Donell35-25496/+17951
Incorporate updates from translationproject.org.
2020-08-04Don't mix linker error messages into edited scriptsAlan Modra1-2/+2
* Makerules (shlib.lds): Discard linker warning output. (format.lds): Likewise. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2020-08-04benchtests/README update.Paul Zimmermann1-6/+14
Improve documentation of the 'name' directive and the 'workload' mechanism. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2020-08-04RISC-V: Update lp64d libm-test-ulps according to HiFive UnleashedMaciej W. Rozycki1-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>
2020-08-03aarch64: update NEWS about branch protectionSzabolcs Nagy1-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>
2020-08-03Add NEWS entry for CVE-2016-10228 (bug 19519)Aurelien Jarno1-0/+4
2020-08-03powerpc: Fix incorrect cache line size load in memset (bug 26332)Florian Weimer1-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>
2020-08-03Update Nios II libm-test-ulps file.Chung-Lin Tang1-11/+11
2020-07-31Move NEWS entry for CVE-2020-1751 to the 2.31 sectionFlorian Weimer1-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>
2020-07-31NEWS: Deprecate weak libpthread symbols for single-threaded checksFlorian Weimer1-0/+8
Recommend the new __libc_single_thread variable instead. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2020-07-31NEWS: Deprecate nss_hesiodFlorian Weimer1-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>
2020-07-27nptl: Zero-extend arguments to SETXID syscalls [BZ #26248]H.J. Lu3-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.
2020-07-27Use binutils 2.35 branch in build-many-glibcs.py.Joseph Myers1-1/+1
This patch makes build-many-glibcs.py use binutils 2.35 branch. Tested with build-many-glibcs.py (compilers and glibcs builds).
2020-07-27aarch64: Use future HWCAP2_MTE in ifunc resolverSzabolcs Nagy1-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.