Commit Graph

36187 Commits

Author SHA1 Message Date
Adhemerval Zanella
3feb53bab0 linux: Simplify ppoll
With arch-syscall.h it can now assumes the existance of either
__NR_ppoll or __NR_ppoll_time64.  The 32-bit time_t support is now
only build for !__ASSUME_TIME64_SYSCALLS.

Checked on x86_64-linux-gnu and i686-linux-gnu (on 5.4 and on 4.15
kernel).

Reviewed-by: Lukasz Majewski <lukma@denx.de>
2020-08-24 15:04:31 -03:00
Adhemerval Zanella
85077eaa54 linux: Simplify mq_timedsend
With arch-syscall.h it can now assumes the existance of either
__NR_mq_timedsend or __NR_mq_timedsend_time64.  The 32-bit
time_t support is now only build for !__ASSUME_TIME64_SYSCALLS.

Checked on x86_64-linux-gnu and i686-linux-gnu (on 5.4 and on 4.15
kernel).

Reviewed-by: Lukasz Majewski <lukma@denx.de>
2020-08-24 15:04:31 -03:00
Adhemerval Zanella
1e03b6d828 linux: Simplify mq_timedreceive
With arch-syscall.h it can now assumes the existance of either
__NR_mq_timedreceive or __NR_mq_timedreceive_time64.  The 32-bit
time_t support is now only build for !__ASSUME_TIME64_SYSCALLS.

Checked on x86_64-linux-gnu and i686-linux-gnu (on 5.4 and on 4.15
kernel).

Reviewed-by: Lukasz Majewski <lukma@denx.de>
2020-08-24 15:04:31 -03:00
Adhemerval Zanella
ff6228d5c6 linux: Simplify clock_settime
With arch-syscall.h it can now assumes the existance of either
__NR_clock_settime or __NR_clock_settime_time64.  The 32-bit
time_t support is now only build for !__ASSUME_TIME64_SYSCALLS.

Checked on x86_64-linux-gnu and i686-linux-gnu (on 5.4 and on 4.15
kernel).

Reviewed-by: Lukasz Majewski <lukma@denx.de>
2020-08-24 15:04:31 -03:00
Adhemerval Zanella
55399535c1 linux: Simplify clock_nanosleep
With arch-syscall.h it can now assumes the existance of either
__NR_clock_nanosleep or __NR_clock_nanosleep_time64.  The 32-bit
time_t support is now only build for !__ASSUME_TIME64_SYSCALLS.

Checked on x86_64-linux-gnu and i686-linux-gnu (on 5.4 and on 4.15
kernel).

Reviewed-by: Lukasz Majewski <lukma@denx.de>
2020-08-24 15:04:29 -03:00
Adhemerval Zanella
d9310f33fc linux: Simplify clock_gettime
With arch-syscall.h it can now assumes the existance of either
__NR_clock_gettime or __NR_clock_gettime_time64.  The 32-bit time_t
support is now only build for !__ASSUME_TIME64_SYSCALLS.

It also uses the time64-support functions to simplify it further.

Checked on x86_64-linux-gnu and i686-linux-gnu (on 5.4 and on 4.15
kernel).
2020-08-24 14:28:21 -03:00
Adhemerval Zanella
4f7092348d linux: Simplify clock_adjtime
With arch-syscall.h it can now assumes the existance of either
__NR_clock_adjtime or __NR_clock_adjtime_time64.  The 32-bit time_t
support is now only build for !__ASSUME_TIME64_SYSCALLS.

Checked on x86_64-linux-gnu and i686-linux-gnu (on 5.4 and on 4.15
kernel).

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
2020-08-24 14:27:19 -03:00
Adhemerval Zanella
02c91eb611 linux: Add helper function to optimize 64-bit time_t fallback support
These helper functions are used to optimize the 64-bit time_t support on
configurations that requires support for 32-bit time_t fallback
(!__ASSUME_TIME64_SYSCALLS).  The idea is once the kernel advertises that
it does not have 64-bit time_t support, glibc will stop to try issue the
64-bit time_t syscall altogether.

For instance:

  #ifndef __NR_symbol_time64
  # define __NR_symbol_time64 __NR_symbol
  #endif
  int r;
  if (supports_time64 ())
    {
      r = INLINE_SYSCALL_CALL (symbol, ...);
      if (r == 0 || errno != ENOSYS)
        return r;

      mark_time64_unsupported ();
    }
  #ifndef __ASSUME_TIME64_SYSCALLS
  <32-bit fallback syscall>
  #endif
  return r;

On configuration with default 64-bit time_t this optimization should be
optimized away by the compiler resulting in no overhead.
2020-08-24 14:27:15 -03:00
Stefan Liebler
756c306502 S390: Sync HWCAP names with kernel by adding aliases [BZ #25971]
Unfortunately some HWCAP names like HWCAP_S390_VX differs between
kernel (see <kernel>/arch/s390/include/asm/elf.h) and glibc.

Therefore, those HWCAP names from kernel are now introduced as alias
2020-08-21 11:23:17 +02:00
Siddhesh Poyarekar
cd71f47acc [vcstocl] Import ProjectQuirks from its own file
ProjectQuirks moved into its own file in gnulib because one cannot
import modules with hyphens in them.  Adjust the quirks file to
reflect this reality.
2020-08-20 23:23:01 +05:30
Stefan Liebler
33dd32fd79 build-many-glibcs.py: Add a s390x -O3 glibc variant.
On s390x, gcc inlines more aggresive compared to other architectures.
This occaisionally leads to build warnings / errors.

Therefore this patch adds a s390x glibc variant with optimization.

There is the ccopts field which contain ABI options which are passed
to configure as CC / CXX.  Now there is also the cflags field which
contains non-ABI options like -g or -O. Those are passed to configure
as CFLAGS / CXXFLAGS.

Currently CC is passed to conformtest.py or linknamespace.py but not
the CFLAGS.
2020-08-20 10:51:42 +02:00
Stefan Liebler
e1fd4bbe31 Fix namespace violation in stdio.h and sys/stat.h if build with 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-20 10:45:26 +02:00
Joseph Myers
e5baabf57b Add C2x BOOL_MAX and BOOL_WIDTH to limits.h.
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-19 22:46:41 +00:00
Joseph Myers
c08df688f2 Use MPC 1.2.0 in build-many-glibcs.py.
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-19 13:48:14 +00:00
Joseph Myers
88a2cf6c4b Add new STATX_* constants from Linux 5.8 to bits/statx-generic.h.
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-19 13:47:37 +00:00
Andreas Schwab
c4e4b2e149 Correct locking and cancellation cleanup in syslog functions (bug 26100)
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-18 11:27:03 +02:00
H.J. Lu
cb7e7a5ca1 nptl: Handle NULL abstime [BZ #26394]
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-17 05:02:06 -07:00
Joseph Myers
23a7896d06 Update build-many-glibcs.py for binutils ia64 obsoletion.
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-13 18:51:10 +00:00
Joseph Myers
b3aa7976d0 Update kernel version to 5.8 in tst-mman-consts.py.
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-13 18:50:24 +00:00
Lukasz Majewski
4a14cb87ca y2038: nptl: Convert pthread_{clock|timed}join_np to support 64 bit time
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-13 14:16:34 +02:00
Szabolcs Nagy
12b2fd0ef9 aarch64: update ulps.
For new j0 test.
2020-08-13 13:02:35 +01:00
Stefan Liebler
0be0845b7a S390: Regenerate ULPs.
Updates needed after new j0 test:
commit 9bfc225078
math: Regenerate auto-libm-test-out-j0
2020-08-12 16:23:12 +02:00
Adhemerval Zanella
bad4a908ff manual: Fix sigdescr_np and sigabbrev_np return type (BZ #26343) 2020-08-08 16:51:26 -03:00
Adhemerval Zanella
5ff35e9544 math: Update x86_64 ulps
From new j0 test.
2020-08-08 16:43:11 -03:00
Adhemerval Zanella
9bfc225078 math: Regenerate auto-libm-test-out-j0
This is a missing bit for b7dd366dbe.
2020-08-08 16:41:40 -03:00
Adhemerval Zanella
c318905e14 manual: Put the istrerrorname_np and strerrordesc_np return type in braces
Otherwise it is not rendered or indexed correctly.
2020-08-07 17:14:49 -03:00
Florian Weimer
3d3ab573a5 Linux: Use faccessat2 to implement faccessat (bug 18683)
This provides correct AT_EACCESS handling and also takes
Linux security modules into account.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2020-08-07 22:06:59 +02:00
Adhemerval Zanella
268ed383b5 manual: Fix strerrorname_np and strerrordesc_np return type (BZ #26343) 2020-08-07 16:49:59 -03:00
Paul Zimmermann
b7dd366dbe math: Fix inaccuracy of j0f for x >= 2^127 when sin(x)+cos(x) is tiny
Checked on x86_64-linux-gnu and i686-linux-gnu.
2020-08-07 16:33:13 -03:00
Joseph Myers
1cfb471528 Update syscall lists for Linux 5.8.
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-07 14:38:43 +00:00
Joseph Myers
42a00a0fb4 Use Linux 5.8 in build-many-glibcs.py.
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-07 14:38:12 +00:00
Samuel Thibault
ac54c335e9 htl: Enable tst-cancelx?[45]
* 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-06 23:38:35 +00:00
Samuel Thibault
b71bc845dd tst-cancel4: Make blocking on write more portable
* nptl/tst-cancel4.c (tf_send, tf_sendto): Set socket buffer size after
connecting.
2020-08-07 01:13:17 +02:00
Samuel Thibault
4ebd73d43f hurd: Add missing hidden def
* sysdeps/mach/hurd/sched_gets.c (__sched_getscheduler): Add hidden def.
2020-08-06 20:14:01 +02:00
Samuel Thibault
8c6beab4e1 hurd: Rework sbrk
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-05 23:52:04 +02:00
Samuel Thibault
ce62504488 hurd: Implement basic sched_get/setscheduler
* sysdeps/mach/hurd/sched_gets.c: New file.
* sysdeps/mach/hurd/sched_sets.c: New file.
2020-08-05 23:46:14 +02:00
H.J. Lu
ac3bda9a25 x86: Rename Intel CPU feature names
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-05 11:48:46 -07:00
Florian Weimer
180d9bc324 manual: Fix some @code/@var formatting glitches chapter Date And Time 2020-08-05 09:22:21 +02:00
Paul Eggert
2cc478ed1b Copy regex_internal.h from Gnulib
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
2c05d33f90, BZ #1302).
Remove unused member 'unused'.
2020-08-04 23:47:01 -07:00
Paul Eggert
70c609f303 Copy regex BITSET_WORD_BITS porting from Gnulib
* 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-04 23:39:20 -07:00
Paul Eggert
6aa1160d16 Sync regex.h from Gnulib
* 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-04 23:24:03 -07:00
Paul Eggert
db10cd9e62 Sync mktime.c from Gnulib
* time/mktime.c: Sync from Gnulib.
This micro-optimizes three division-related computations.
2020-08-04 23:15:31 -07:00
Paul Eggert
7279f0a282 Sync intprops.h from Gnulib
* 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-04 22:58:58 -07:00
Carlos O'Donell
4c56bcbceb Open master branch for glibc 2.33 development.
Happy hacking!
2020-08-04 23:41:43 -04:00
Carlos O'Donell
3de512be7e Prepare for glibc 2.32 release.
Update version.h, features.h, and ChangeLog.old/ChangeLog.21.
2020-08-04 22:17:00 -04:00
Carlos O'Donell
6d403f2e1b Regenerate configure scripts. 2020-08-04 21:36:19 -04:00
Carlos O'Donell
923adfcb58 Update NEWS with bugs. 2020-08-04 20:39:09 -04:00
Carlos O'Donell
0ffaa7be6e Update translations.
Incorporate updates from translationproject.org.
2020-08-04 20:31:51 -04:00
Alan Modra
bd7a8e038a Don't mix linker error messages into edited scripts
* Makerules (shlib.lds): Discard linker warning output.
	(format.lds): Likewise.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2020-08-04 19:52:56 -04:00
Paul Zimmermann
50a8dd367e benchtests/README update.
Improve documentation of the 'name' directive and the 'workload' mechanism.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2020-08-04 12:44:41 -04:00