platform/upstream/glibc.git
6 years agox86-64: Optimize strcmp/wcscmp and strncmp/wcsncmp with AVX2
Leonardo Sandoval [Thu, 3 May 2018 16:09:30 +0000 (11:09 -0500)]
x86-64: Optimize strcmp/wcscmp and strncmp/wcsncmp with AVX2

Optimize x86-64 strcmp/wcscmp and strncmp/wcsncmp with AVX2. It uses vector
comparison as much as possible. Peak performance observed on a SkyLake
machine: 9x, 3x, 2.5x and 5.5x for strcmp, strncmp, wcscmp and wcsncmp,
respectively. The larger the comparison length, the more benefit using
avx2 functions, except on the strcmp, where peak is observed at length
== 32 bytes. Select AVX2 strcmp/wcscmp on AVX2 machines where vzeroupper
is preferred and AVX unaligned load is fast.

NB: It uses TZCNT instead of BSF since TZCNT produces the same result
as BSF for non-zero input.  TZCNT is faster than BSF and is executed
as BSF if machine doesn't support TZCNT.

* sysdeps/x86_64/multiarch/Makefile (sysdep_routines): Add
strcmp-avx2, strncmp-avx2, wcscmp-avx2, wcscmp-sse2, wcsncmp-avx2 and
wcsncmp-sse2.
* sysdeps/x86_64/multiarch/ifunc-impl-list.c
(__libc_ifunc_impl_list): Add tests for __strcmp_avx2,
__strncmp_avx2, __wcscmp_avx2, __wcsncmp_avx2, __wcscmp_sse2
and __wcsncmp_sse2.
* sysdeps/x86_64/multiarch/strcmp.c (OPTIMIZE (avx2)):
(IFUNC_SELECTOR): Return OPTIMIZE (avx2) on AVX 2 machines if
AVX unaligned load is fast and vzeroupper is preferred.
* sysdeps/x86_64/multiarch/strncmp.c: Likewise.
* sysdeps/x86_64/multiarch/strcmp-avx2.S: New file.
* sysdeps/x86_64/multiarch/strncmp-avx2.S: Likewise.
* sysdeps/x86_64/multiarch/wcscmp-avx2.S: Likewise.
* sysdeps/x86_64/multiarch/wcscmp-sse2.S: Likewise.
* sysdeps/x86_64/multiarch/wcscmp.c: Likewise.
* sysdeps/x86_64/multiarch/wcsncmp-avx2.S: Likewise.
* sysdeps/x86_64/multiarch/wcsncmp-sse2.c: Likewise.
* sysdeps/x86_64/multiarch/wcsncmp.c: Likewise.
* sysdeps/x86_64/wcscmp.S (__wcscmp): Add alias only if __wcscmp
is undefined.

6 years agomath: Update i686 ulps (--disable-multi-arch configuration)
Florian Weimer [Fri, 1 Jun 2018 20:37:55 +0000 (22:37 +0200)]
math: Update i686 ulps (--disable-multi-arch configuration)

The results are from configuring with --disable-multi-arch,  building
with “-march=x86-64 -mtune=generic -mfpmath=sse” and running the
testsuite on a Haswell-era CPU.

6 years agomath: Update i686 ulps
Florian Weimer [Fri, 1 Jun 2018 17:31:45 +0000 (19:31 +0200)]
math: Update i686 ulps

The results are from building with “-march=x86-64 -mtune=generic
-mfpmath=sse” and running the testsuite on a Haswell-era CPU.

6 years agoMake powerpc-nofpu __sqrtsf2, __sqrtdf2 compat symbols (bug 18473).
Joseph Myers [Fri, 1 Jun 2018 17:25:12 +0000 (17:25 +0000)]
Make powerpc-nofpu __sqrtsf2, __sqrtdf2 compat symbols (bug 18473).

powerpc-nofpu libc exports __sqrtsf2 and __sqrtdf2 symbols.  The
export of these soft-fp symbols is a mistake; they aren't part of the
libgcc interface and GCC will never generate code that calls them.
This patch makes them into compat symbols (no code built for static
libc), moving their sources from the generic soft-fp sources to
sysdeps/powerpc/nofpu (the underlying soft-fp FP_SQRT functionality
remains of use to implement actual sqrt public interfaces, such as
sqrtl / sqrtf128 for which it is used on various platforms, but
__sqrt[sdt]f2 are not such interfaces).

Tested with build-many-glibcs.py for relevant platforms.

[BZ #18473]
* soft-fp/sqrttf2.c: Remove file.
* soft-fp/sqrtdf2.c: Move to ....
* sysdeps/powerpc/nofpu/sqrtdf2.c: ... here.  Include
<shlib-compat.h>.
(__sqrtdf2): Make conditional on
[SHLIB_COMPAT (libc, GLIBC_2_3_2, GLIBC_2_28)].  Define as compat
symbol.
* soft-fp/sqrtsf2.c: Move to ....
* sysdeps/powerpc/nofpu/sqrtsf2.c: ... here.  Include
<shlib-compat.h>.
(__sqrtsf2): Make conditional on
[SHLIB_COMPAT (libc, GLIBC_2_3_2, GLIBC_2_28)].  Define as compat
symbol.
* soft-fp/Makefile (gcc-single-routines): Remove sqrtsf2.
(gcc-double-routines): Remove sqrtdf2.
(gcc-quad-routines): Remove sqrttf2.
* sysdeps/nios2/Makefile [$(subdir) = soft-fp] (sysdep_routines):
Do not filter out sqrtsf2 and sqrtdf2.
* sysdeps/powerpc/nofpu/Makefile [$(subdir) = soft-fp]
(sysdep_routines): Add sqrtsf2 and sqrtdf2.

6 years agoRemove sysdeps/generic/libcidn.abilist
Florian Weimer [Fri, 1 Jun 2018 09:25:41 +0000 (11:25 +0200)]
Remove sysdeps/generic/libcidn.abilist

This file was left behind by the libidn removal in commit
7f9f1ecb710eac4d65bb02785ddf288cac098323.

6 years agolibio: Avoid _allocate_buffer, _free_buffer function pointers [BZ #23236]
Florian Weimer [Fri, 1 Jun 2018 08:41:03 +0000 (10:41 +0200)]
libio: Avoid _allocate_buffer, _free_buffer function pointers [BZ #23236]

These unmangled function pointers reside on the heap and could
be targeted by exploit writers, effectively bypassing libio vtable
validation.  Instead, we ignore these pointers and always call
malloc or free.

In theory, this is a backwards-incompatible change, but using the
global heap instead of the user-supplied callback functions should
have little application impact.  (The old libstdc++ implementation
exposed this functionality via a public, undocumented constructor
in its strstreambuf class.)

6 years agoUpdate ulps with "make regen-ulps" on AMD Ryzen 7 1800X.
Paul Pluzhnikov [Wed, 30 May 2018 16:17:47 +0000 (09:17 -0700)]
Update ulps with "make regen-ulps" on AMD Ryzen 7 1800X.

2018-05-30  Paul Pluzhnikov  <ppluzhnikov@google.com>

* sysdeps/x86_64/fpu/libm-test-ulps (log_vlen8_avx2): Update for
AMD Ryzen 7 1800X.

6 years agopowerpc: Add multiarch sqrtf128 for ppc64le
Rajalakshmi Srinivasaraghavan [Wed, 30 May 2018 16:01:27 +0000 (21:31 +0530)]
powerpc: Add multiarch sqrtf128 for ppc64le

This patch creates ifunc for sqrtf128() to make use of new xssqrtqp
instruction for POWER9 when --enable-multi-arch and --with-cpu=power8
options are used on power9 system.  This is achieved by explicitly
adding -mcpu=power9 flag for sqrtf128-power9.

6 years agosupport: Add wrappers for pthread_barrierattr_t
Florian Weimer [Tue, 29 May 2018 08:48:46 +0000 (10:48 +0200)]
support: Add wrappers for pthread_barrierattr_t

6 years agostatic-PIE: Update DT_DEBUG for debugger [BZ #23206]
H.J. Lu [Tue, 29 May 2018 13:33:42 +0000 (06:33 -0700)]
static-PIE: Update DT_DEBUG for debugger [BZ #23206]

This is needed to support debugging dlopened shared libraries in static
PIE.

[BZ #23206]
* elf/dl-reloc-static-pie.c (_dl_relocate_static_pie): Initialize
_r_debug and update DT_DEBUG for debugger.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
6 years agostdlib: Additional tests need generated locale dependencies
Florian Weimer [Tue, 29 May 2018 08:34:52 +0000 (10:34 +0200)]
stdlib: Additional tests need generated locale dependencies

Without these dependencies, the tests fail at high make parallelism
levels if the locale data has not been generated for other reasons.

6 years agoRemove sysdeps/sparc/sparc64/soft-fp directory.
Joseph Myers [Fri, 25 May 2018 20:00:51 +0000 (20:00 +0000)]
Remove sysdeps/sparc/sparc64/soft-fp directory.

As per <https://sourceware.org/ml/libc-alpha/2014-10/msg00369.html>,
there should not be separate sysdeps/<arch>/soft-fp directories when
those are used by all configurations that use sysdeps/<arch>, and,
more generally, should not be sysdeps/foo/Implies files pointing to a
subdirectory foo/bar.  This patch eliminates the
sysdeps/sparc/sparc64/soft-fp directory accordingly, merging its
contents into sysdeps/sparc/sparc64.  This completes removing the
unnecessary <arch>/soft-fp sysdeps directories.

sysdeps/sparc/sparc64/soft-fp/e_ilogbl.c is removed rather than moved.
It was not in fact used previously - the ldbl-128 version of
e_ilogbl.c was used instead - and moving it into sysdeps/sparc/sparc64
results in it being used, but causing a build failure because of
FP_DECL_EX declaring an unused variable (as I noted in
<https://sourceware.org/ml/libc-alpha/2013-10/msg00457.html> that file
doesn't appear to use FP_DECL_EX).  Given that the file was previously
unused and so presumably not tested recently, removing it is the safe
way to avoid this patch changing what actually gets built into glibc
(if this file should turn out more efficient than the ldbl-128
e_ilogbl.c, it can always be added back in future with the build
failure fixed).

Tested with build-many-glibcs.py that installed stripped shared
libraries for sparc configurations are unchanged by this patch.

* sysdeps/sparc/sparc64/Implies: Remove sparc/sparc64/soft-fp.
* sysdeps/sparc/sparc64/Makefile [$(subdir) = soft-fp]
(sparc64-quad-routines): New variable.  Moved from ....
[$(subdir) = soft-fp] (sysdep_routines): Add
$(sparc64-quad-routines).  Moved from ....
[$(subdir) = math] (CPPFLAGS): Add -I../soft-fp/.  Moved from ....
* sysdeps/sparc/sparc64/soft-fp/Makefile: ... here.  Remove file.
* sysdeps/sparc/sparc64/Versions (libc): Add GLIBC_2.2 symbols
moved from ....
* sysdeps/sparc/sparc64/soft-fp/Versions: ... here.  Remove file.
* sysdeps/sparc/sparc64/soft-fp/e_ilogbl.c: Remove file.
* sysdeps/sparc/sparc64/soft-fp/qp_add.c: Move to ....
* sysdeps/sparc/sparc64/qp_add.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_cmp.c: Move to ....
* sysdeps/sparc/sparc64/qp_cmp.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_cmpe.c: Move to ....
* sysdeps/sparc/sparc64/qp_cmpe.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_div.c: Move to ....
* sysdeps/sparc/sparc64/qp_div.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_dtoq.c: Move to ....
* sysdeps/sparc/sparc64/qp_dtoq.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_feq.c: Move to ....
* sysdeps/sparc/sparc64/qp_feq.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_fge.c: Move to ....
* sysdeps/sparc/sparc64/qp_fge.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_fgt.c: Move to ....
* sysdeps/sparc/sparc64/qp_fgt.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_fle.c: Move to ....
* sysdeps/sparc/sparc64/qp_fle.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_flt.c: Move to ....
* sysdeps/sparc/sparc64/qp_flt.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_fne.c: Move to ....
* sysdeps/sparc/sparc64/qp_fne.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_itoq.c: Move to ....
* sysdeps/sparc/sparc64/qp_itoq.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_mul.c: Move to ....
* sysdeps/sparc/sparc64/qp_mul.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_neg.S: Move to ....
* sysdeps/sparc/sparc64/qp_neg.S: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_qtod.c: Move to ....
* sysdeps/sparc/sparc64/qp_qtod.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c: Move to ....
* sysdeps/sparc/sparc64/qp_qtoi.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_qtos.c: Move to ....
* sysdeps/sparc/sparc64/qp_qtos.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_qtoui.c: Move to ....
* sysdeps/sparc/sparc64/qp_qtoui.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_qtoux.c: Move to ....
* sysdeps/sparc/sparc64/qp_qtoux.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_qtox.c: Move to ....
* sysdeps/sparc/sparc64/qp_qtox.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_sqrt.c: Move to ....
* sysdeps/sparc/sparc64/qp_sqrt.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_stoq.c: Move to ....
* sysdeps/sparc/sparc64/qp_stoq.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_sub.c: Move to ....
* sysdeps/sparc/sparc64/qp_sub.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_uitoq.c: Move to ....
* sysdeps/sparc/sparc64/qp_uitoq.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_util.c: Move to ....
* sysdeps/sparc/sparc64/qp_util.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_uxtoq.c: Move to ....
* sysdeps/sparc/sparc64/qp_uxtoq.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_xtoq.c: Move to ....
* sysdeps/sparc/sparc64/qp_xtoq.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/sfp-machine.h: Move to ....
* sysdeps/sparc/sparc64/sfp-machine.h: ... here.

6 years agoRemove sysdeps/sparc/sparc32/soft-fp directory.
Joseph Myers [Fri, 25 May 2018 16:51:15 +0000 (16:51 +0000)]
Remove sysdeps/sparc/sparc32/soft-fp directory.

As per <https://sourceware.org/ml/libc-alpha/2014-10/msg00369.html>,
there should not be separate sysdeps/<arch>/soft-fp directories when
those are used by all configurations that use sysdeps/<arch>, and,
more generally, should not be sysdeps/foo/Implies files pointing to a
subdirectory foo/bar.  This patch eliminates the
sysdeps/sparc/sparc32/soft-fp directory accordingly, merging its
contents into sysdeps/sparc/sparc32.

Tested with build-many-glibcs.py that installed stripped shared
libraries for sparc configurations are unchanged by this patch.

* sysdeps/sparc/sparc32/Implies: Remove sparc/sparc32/soft-fp.
* sysdeps/sparc/sparc32/Makefile [$(subdir) = soft-fp]
(sparc32-quad-routines): New variable.  Moved from ....
[$(subdir) = soft-fp] (sysdep_routines): Add
$(sparc32-quad-routines).  Moved from ....
* sysdeps/sparc/sparc32/soft-fp/Makefile: ... here.  Remove file.
* sysdeps/sparc/sparc32/Versions (libc): Add GLIBC_2.4 symbols
moved from ....
* sysdeps/sparc/sparc32/soft-fp/Versions: ... here.  Remove file.
* sysdeps/sparc/sparc32/soft-fp/q_add.c: Move to ....
* sysdeps/sparc/sparc32/q_add.c: ... here.
* sysdeps/sparc/sparc32/soft-fp/q_cmp.c: Move to ....
* sysdeps/sparc/sparc32/q_cmp.c: ... here.
* sysdeps/sparc/sparc32/soft-fp/q_cmpe.c: Move to ....
* sysdeps/sparc/sparc32/q_cmpe.c: ... here.
* sysdeps/sparc/sparc32/soft-fp/q_div.c: Move to ....
* sysdeps/sparc/sparc32/q_div.c: ... here.
* sysdeps/sparc/sparc32/soft-fp/q_dtoq.c: Move to ....
* sysdeps/sparc/sparc32/q_dtoq.c: ... here.
* sysdeps/sparc/sparc32/soft-fp/q_feq.c: Move to ....
* sysdeps/sparc/sparc32/q_feq.c: ... here.
* sysdeps/sparc/sparc32/soft-fp/q_fge.c: Move to ....
* sysdeps/sparc/sparc32/q_fge.c: ... here.
* sysdeps/sparc/sparc32/soft-fp/q_fgt.c: Move to ....
* sysdeps/sparc/sparc32/q_fgt.c: ... here.
* sysdeps/sparc/sparc32/soft-fp/q_fle.c: Move to ....
* sysdeps/sparc/sparc32/q_fle.c: ... here.
* sysdeps/sparc/sparc32/soft-fp/q_flt.c: Move to ....
* sysdeps/sparc/sparc32/q_flt.c: ... here.
* sysdeps/sparc/sparc32/soft-fp/q_fne.c: Move to ....
* sysdeps/sparc/sparc32/q_fne.c: ... here.
* sysdeps/sparc/sparc32/soft-fp/q_itoq.c: Move to ....
* sysdeps/sparc/sparc32/q_itoq.c: ... here.
* sysdeps/sparc/sparc32/soft-fp/q_lltoq.c: Move to ....
* sysdeps/sparc/sparc32/q_lltoq.c: ... here.
* sysdeps/sparc/sparc32/soft-fp/q_mul.c: Move to ....
* sysdeps/sparc/sparc32/q_mul.c: ... here.
* sysdeps/sparc/sparc32/soft-fp/q_neg.c: Move to ....
* sysdeps/sparc/sparc32/q_neg.c: ... here.
* sysdeps/sparc/sparc32/soft-fp/q_qtod.c: Move to ....
* sysdeps/sparc/sparc32/q_qtod.c: ... here.
* sysdeps/sparc/sparc32/soft-fp/q_qtoi.c: Move to ....
* sysdeps/sparc/sparc32/q_qtoi.c: ... here.
* sysdeps/sparc/sparc32/soft-fp/q_qtoll.c: Move to ....
* sysdeps/sparc/sparc32/q_qtoll.c: ... here.
* sysdeps/sparc/sparc32/soft-fp/q_qtos.c: Move to ....
* sysdeps/sparc/sparc32/q_qtos.c: ... here.
* sysdeps/sparc/sparc32/soft-fp/q_qtou.c: Move to ....
* sysdeps/sparc/sparc32/q_qtou.c: ... here.
* sysdeps/sparc/sparc32/soft-fp/q_qtoull.c: Move to ....
* sysdeps/sparc/sparc32/q_qtoull.c: ... here.
* sysdeps/sparc/sparc32/soft-fp/q_sqrt.c: Move to ....
* sysdeps/sparc/sparc32/q_sqrt.c: ... here.
* sysdeps/sparc/sparc32/soft-fp/q_stoq.c: Move to ....
* sysdeps/sparc/sparc32/q_stoq.c: ... here.
* sysdeps/sparc/sparc32/soft-fp/q_sub.c: Move to ....
* sysdeps/sparc/sparc32/q_sub.c: ... here.
* sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c: Move to ....
* sysdeps/sparc/sparc32/q_ulltoq.c: ... here.
* sysdeps/sparc/sparc32/soft-fp/q_util.c: Move to ....
* sysdeps/sparc/sparc32/q_util.c: ... here.
* sysdeps/sparc/sparc32/soft-fp/q_utoq.c: Move to ....
* sysdeps/sparc/sparc32/q_utoq.c: ... here.
* sysdeps/sparc/sparc32/soft-fp/sfp-machine.h: Move to ....
* sysdeps/sparc/sparc32/sfp-machine.h: ... here.

6 years agopowerpc: Move around math-related Implies
Tulio Magno Quites Machado Filho [Thu, 24 May 2018 21:20:40 +0000 (18:20 -0300)]
powerpc: Move around math-related Implies

Currently, powerpc, powerpc64, and powerpc64le imply the same set of
subdirectories from sysdeps/ieee754: flt-32, dbl-64, ldbl-128ibm, and
ldbl-opt.  In preparation for the transition of the long double format -
from IBM Extended Precision to IEEE 754 128-bits floating-point - on
powerpc64le, this patch splits the shared Implies file into three
separate files (one for each of the powerpc architectures), without
changing their contents.  Future patches will modify powerpc64le.

* sysdeps/powerpc/Implies: Removed.  Previous contents copied to...
* sysdeps/powerpc/powerpc32/Implies-after: ... here.
* sysdeps/powerpc/powerpc64/be/Implies-after: ... here.
* sysdeps/powerpc/powerpc64/le/Implies-before: ... and here.

6 years agoRemove sysdeps/powerpc/soft-fp directory.
Joseph Myers [Thu, 24 May 2018 22:02:32 +0000 (22:02 +0000)]
Remove sysdeps/powerpc/soft-fp directory.

As per <https://sourceware.org/ml/libc-alpha/2014-10/msg00369.html>,
there should not be separate sysdeps/<arch>/soft-fp directories when
those are used by all configurations that use sysdeps/<arch>, and,
more generally, should not be sysdeps/foo/Implies files pointing to a
subdirectory foo/bar.

sysdeps/powerpc/soft-fp isn't quite such a case, as the Implies files
pointing to it are
sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/Implies and
sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/nofpu/Implies (and
indeed there is a different sfp-machine.h used for powerpc64le).
However, the same principle applies: there is no need for this
directory because sfp-machine.h, the only file in it, can most
naturally go in sysdeps/powerpc/nofpu, which is used by exactly the
same configurations (and there is a close dependence between the files
there and the sfp-machine.h implementation).  This patch eliminates
the sysdeps/powerpc/soft-fp directory accordingly.

Tested with build-many-glibcs.py that installed stripped shared
libraries for powerpc configurations are unchanged by this patch.

* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/Implies: Remove
powerpc/soft-fp.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/nofpu/Implies:
Likewise.
* sysdeps/powerpc/soft-fp/sfp-machine.h: Move to ....
* sysdeps/powerpc/nofpu/sfp-machine.h: ... here.

6 years agoFix parameter type in C++ version of iseqsig (bug 23171)
Gabriel F. T. Gomes [Mon, 14 May 2018 12:04:28 +0000 (09:04 -0300)]
Fix parameter type in C++ version of iseqsig (bug 23171)

The commit

  commit c85e54ac6cef0faed7b7ffc722f52523dec59bf5
  Author: Gabriel F. T. Gomes <gabriel@inconstante.eti.br>
  Date:   Fri Nov 3 10:44:36 2017 -0200

      Provide a C++ version of iseqsig (bug 22377)

mistakenly used double parameters in the long double version of iseqsig,
thus causing spurious conversions to double, as reported on bug 23171.

Tested for powerpc64le and x86_64.

6 years agoAdd references to CVE-2017-18269, CVE-2018-11236, CVE-2018-11237
Florian Weimer [Thu, 24 May 2018 10:19:11 +0000 (12:19 +0200)]
Add references to CVE-2017-18269, CVE-2018-11236, CVE-2018-11237

6 years agoRemove sysdeps/sh/soft-fp directory.
Joseph Myers [Wed, 23 May 2018 20:05:31 +0000 (20:05 +0000)]
Remove sysdeps/sh/soft-fp directory.

As per <https://sourceware.org/ml/libc-alpha/2014-10/msg00369.html>,
there should not be separate sysdeps/<arch>/soft-fp directories when
those are used by all configurations that use sysdeps/<arch>, and,
more generally, should not be sysdeps/foo/Implies files pointing to a
subdirectory foo/bar.  This patch eliminates the sysdeps/sh/soft-fp
directory accordingly, merging its contents into sysdeps/sh.

Tested with build-many-glibcs.py that installed stripped shared
libraries for sh configurations are unchanged by this patch.

* sysdeps/sh/Implies: Remove sh/soft-fp.
* sysdeps/sh/soft-fp/sfp-machine.h: Move to ....
* sysdeps/sh/sfp-machine.h: ... here.

6 years agox86-64: Skip zero length in __mem[pcpy|move|set]_erms
H.J. Lu [Wed, 23 May 2018 18:25:20 +0000 (11:25 -0700)]
x86-64: Skip zero length in __mem[pcpy|move|set]_erms

This patch skips zero length in __mempcpy_erms, __memmove_erms and
__memset_erms.

Tested on x86-64.

* sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S
(__mempcpy_erms): Skip zero length.
(__memmove_erms): Likewise.
* sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S
(__memset_erms): Likewise.

6 years agoRemove sysdeps/alpha/soft-fp directory.
Joseph Myers [Wed, 23 May 2018 17:29:20 +0000 (17:29 +0000)]
Remove sysdeps/alpha/soft-fp directory.

As per <https://sourceware.org/ml/libc-alpha/2014-10/msg00369.html>,
there should not be separate sysdeps/<arch>/soft-fp directories when
those are used by all configurations that use sysdeps/<arch>, and,
more generally, should not be sysdeps/foo/Implies files pointing to a
subdirectory foo/bar.  This patch eliminates the
sysdeps/alpha/soft-fp directory accordingly, merging its contents
into sysdeps/alpha.

Tested with build-many-glibcs.py that installed stripped shared
libraries for alpha-linux-gnu are unchanged by this patch.

* sysdeps/alpha/Implies: Remove alpha/soft-fp.
* sysdeps/alpha/Makefile [$(subdir) = soft-fp] (sysdep_routines):
Add functions moved from ....
[$(subdir) = math] (CPPFLAGS): Add -I../soft-fp.  Moved from ....
* sysdeps/alpha/soft-fp/Makefile: ... here.  Remove file.
* sysdeps/alpha/Versions (libc): Add GLIBC_2.3.4 symbols moved
from ....
* sysdeps/alpha/soft-fp/Versions: ... here.  Remove file.
* sysdeps/alpha/soft-fp/e_sqrtl.c: Move to ....
* sysdeps/alpha/e_sqrtl.c: ... here.
* sysdeps/alpha/soft-fp/local-soft-fp.h: Move to ....
* sysdeps/alpha/local-soft-fp.h: ... here.
* sysdeps/alpha/soft-fp/ots_add.c: Move to ....
* sysdeps/alpha/ots_add.c: ... here.
* sysdeps/alpha/soft-fp/ots_cmp.c: Move to ....
* sysdeps/alpha/ots_cmp.c: ... here.
* sysdeps/alpha/soft-fp/ots_cmpe.c: Move to ....
* sysdeps/alpha/ots_cmpe.c: ... here.
* sysdeps/alpha/soft-fp/ots_cvtqux.c: Move to ....
* sysdeps/alpha/ots_cvtqux.c: ... here.
* sysdeps/alpha/soft-fp/ots_cvtqx.c: Move to ....
* sysdeps/alpha/ots_cvtqx.c: ... here.
* sysdeps/alpha/soft-fp/ots_cvttx.c: Move to ....
* sysdeps/alpha/ots_cvttx.c: ... here.
* sysdeps/alpha/soft-fp/ots_cvtxq.c: Move to ....
* sysdeps/alpha/ots_cvtxq.c: ... here.
* sysdeps/alpha/soft-fp/ots_cvtxt.c: Move to ....
* sysdeps/alpha/ots_cvtxt.c: ... here.
* sysdeps/alpha/soft-fp/ots_div.c: Move to ....
* sysdeps/alpha/ots_div.c: ... here.
* sysdeps/alpha/soft-fp/ots_mul.c: Move to ....
* sysdeps/alpha/ots_mul.c: ... here.
* sysdeps/alpha/soft-fp/ots_nintxq.c: Move to ....
* sysdeps/alpha/ots_nintxq.c: ... here.
* sysdeps/alpha/soft-fp/ots_sub.c: Move to ....
* sysdeps/alpha/ots_sub.c: ... here.
* sysdeps/alpha/soft-fp/sfp-machine.h: Move to ....
* sysdeps/alpha/sfp-machine.h: ... here.

6 years agoSwitch IDNA implementation to libidn2 [BZ #19728] [BZ #19729] [BZ #22247]
Florian Weimer [Wed, 23 May 2018 13:26:19 +0000 (15:26 +0200)]
Switch IDNA implementation to libidn2 [BZ #19728] [BZ #19729] [BZ #22247]

This provides an implementation of the IDNA2008 standard and fixes
CVE-2016-6261, CVE-2016-6263, CVE-2017-14062.

6 years agoImplement allocate_once for atomic initialization with allocation
Florian Weimer [Wed, 23 May 2018 12:16:18 +0000 (14:16 +0200)]
Implement allocate_once for atomic initialization with allocation

6 years agoAdd a test case for [BZ #23196]
H.J. Lu [Wed, 23 May 2018 10:59:56 +0000 (03:59 -0700)]
Add a test case for [BZ #23196]

[BZ #23196]
* string/test-memcpy.c (do_test1): New function.
(test_main): Call it.

6 years agoDon't write beyond destination in __mempcpy_avx512_no_vzeroupper (bug 23196)
Andreas Schwab [Tue, 22 May 2018 08:37:59 +0000 (10:37 +0200)]
Don't write beyond destination in __mempcpy_avx512_no_vzeroupper (bug 23196)

When compiled as mempcpy, the return value is the end of the destination
buffer, thus it cannot be used to refer to the start of it.

6 years agoRemove sysdeps/aarch64/soft-fp directory.
Joseph Myers [Tue, 22 May 2018 17:23:34 +0000 (17:23 +0000)]
Remove sysdeps/aarch64/soft-fp directory.

As per <https://sourceware.org/ml/libc-alpha/2014-10/msg00369.html>,
there should not be separate sysdeps/<arch>/soft-fp directories when
those are used by all configurations that use sysdeps/<arch>, and,
more generally, should not be sysdeps/foo/Implies files pointing to a
subdirectory foo/bar.  This patch eliminates the
sysdeps/aarch64/soft-fp directory accordingly, merging its contents
into sysdeps/aarch64.

Tested with build-many-glibcs.py that installed stripped shared
libraries for aarch64 configurations are unchanged by this patch.

* sysdeps/aarch64/Implies: Remove aarch64/soft-fp.
* sysdeps/aarch64/Makefile [$(subdir) = math] (CPPFLAGS): Add
-I../soft-fp.  Moved from ....
* sysdeps/aarch64/soft-fp/Makefile: ... here.  Remove file.
* sysdeps/aarch64/soft-fp/e_sqrtl.c: Move to ....
* sysdeps/aarch64/e_sqrtl.c: ... here.
* sysdeps/aarch64/soft-fp/sfp-machine.h: Move to ....
* sysdeps/aarch64/sfp-machine.h: ... here.

6 years agoFix i686-linux-gnu build with GCC mainline.
Joseph Myers [Tue, 22 May 2018 16:55:04 +0000 (16:55 +0000)]
Fix i686-linux-gnu build with GCC mainline.

Building with recent GCC mainline for i686-linux-gnu is failing with:

../sysdeps/ieee754/flt-32/k_rem_pio2f.c: In function '__kernel_rem_pio2f':
../sysdeps/ieee754/flt-32/k_rem_pio2f.c:186:28: error: 'fq[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   fv = math_narrow_eval (fq[0]-fv);
                            ^

and

../sysdeps/ieee754/dbl-64/k_rem_pio2.c: In function '__kernel_rem_pio2':
../sysdeps/ieee754/dbl-64/k_rem_pio2.c:333:32: error: 'fq[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
       fv = math_narrow_eval (fq[0] - fv);
                                ^

These are similar to -Warray-bounds cases for which the DIAG_* macros
are already used in those files: the array element is in fact always
initialized, but the reasoning that it is depends on another array not
having been all zero at an earlier point, which depends on the
functions not being called with zero arguments.  Thus, this patch uses
DIAG_* to disable -Wmaybe-uninitialized for this code.

(The warning may be i686-specific because of math_narrow_eval somehow
perturbing what the compiler does with this code enough to cause the
warning.  I don't know why it doesn't appear for i686-gnu.)

Tested with build-many-glibcs.py that this fixes the i686 build in
this configuration.

* sysdeps/ieee754/dbl-64/k_rem_pio2.c (__kernel_rem_pio2): Ignore
-Wmaybe-uninitialized around access to fq[0].
* sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f):
Likewise.

6 years agoMake llseek a compat symbol (bug 18471).
Joseph Myers [Tue, 22 May 2018 15:44:01 +0000 (15:44 +0000)]
Make llseek a compat symbol (bug 18471).

The llseek function name is an obsolete, Linux-specific, unprototyped
name for lseek64 with a link-time warning.  This patch completes the
obsoletion of this function name by making it into a compat symbol,
not available for newly linked programs and not included in the ABI
for new ports.

When a compat symbol is defined in syscalls.list, the code for that
function is not built at all for static linking unless some non-compat
symbol for that function is also defined with an explicit symbol
version, so an explicit symbol version for lseek64 is added to the
MIPS n32 syscalls.list.  The case in make-syscalls.sh that handles
such explicit non-compat symbol versions then needs to be changed to
use weak_alias instead of strong_alias when the syscall is built
outside of libc, to avoid linknamespace failures from a strong lseek64
symbol in static libpthread.

The x32 llseek.S was as far as I could tell already unused (nothing
builds an llseek.* source file, at least since the lseek / lseek64 /
llseek consolidation), so is removed in this patch as well.

Tested for x86_64 and x86, and with build-many-glibcs.py.

[BZ #18471]
* sysdeps/unix/make-syscalls.sh (emit_weak_aliases): Use weak
aliases for non-libc case of versioned symbols.
* sysdeps/unix/sysv/linux/lseek64.c: Include <shlib-compat.h>.
(llseek): Define as compat symbol if
[SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_28)], not as weak alias
with link warning.
* sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list (llseek):
Make into a compat symbol, disabled for minimum symbol version
GLIBC_2.28 and later.
* sysdeps/unix/sysv/linux/x86_64/x32/llseek.S: Remove file.

6 years agoi386: Drop -mpreferred-stack-boundary=4
Florian Weimer [Tue, 22 May 2018 12:44:14 +0000 (14:44 +0200)]
i386: Drop -mpreferred-stack-boundary=4

The flag was a left-over from when the -mpreferred-stack-boundary=2 flag
was removed in commit db290cf59207aff09d1794e666e2854a93775f32.

6 years agox86-64: Check Prefer_FSRM in ifunc-memmove.h
H.J. Lu [Mon, 21 May 2018 23:54:46 +0000 (16:54 -0700)]
x86-64: Check Prefer_FSRM in ifunc-memmove.h

Although the REP MOVSB implementations of memmove, memcpy and mempcpy
aren't used by the current processors, this patch adds Prefer_FSRM
check in ifunc-memmove.h so that they can be used in the future.

* sysdeps/x86/cpu-features.h (bit_arch_Prefer_FSRM): New.
(index_arch_Prefer_FSRM): Likewise.
* sysdeps/x86/cpu-tunables.c (TUNABLE_CALLBACK (set_hwcaps)):
Also check Prefer_FSRM.
* sysdeps/x86_64/multiarch/ifunc-memmove.h (IFUNC_SELECTOR):
Also return OPTIMIZE (erms) for Prefer_FSRM.

6 years agoInitial Fast Short REP MOVSB (FSRM) support
H.J. Lu [Mon, 21 May 2018 17:54:20 +0000 (10:54 -0700)]
Initial Fast Short REP MOVSB (FSRM) support

The newer Intel processors support Fast Short REP MOVSB which has a
feature bit in CPUID.  This patch adds the Fast Short REP MOVSB (FSRM)
bit to x86 cpu-features.

* sysdeps/x86/cpu-features.h (bit_cpu_FSRM): New.
(index_cpu_FSRM): Likewise.
(reg_FSRM): Likewise.

6 years agoSplit test-tgmath3 by function.
Joseph Myers [Fri, 18 May 2018 17:30:18 +0000 (17:30 +0000)]
Split test-tgmath3 by function.

It has been noted that test-tgmath3 is slow to compile, and to link on
some systems
<https://sourceware.org/ml/libc-alpha/2018-02/msg00477.html>, because
of the size of the test.

I'm working on tgmath.h support for the TS 18661-1 / 18661-3 functions
that round their results to a narrower type.  For the functions
already present in glibc, this wouldn't make test-tgmath3 much bigger,
because those functions only have two arguments.  For the narrowing
versions of fma (for which I've not yet added the functions to glibc),
however, it would result in many configurations building tests of the
type-generic macros f32fma, f64fma, f32xfma, f64xfma, each with 21
possible types for each of three arguments (float, double, long double
aren't valid argument types for these macros when they return a
_FloatN / _FloatNx type), so substantially increasing the size of the
testcase.

To avoid further increasing the size of a single test when adding the
type-generic narrowing fma macros, this patch arranges for the
test-tgmath3 tests to be run separately for each function tested.  The
fma tests are still by far the largest (next is pow, as that has two
arguments that can be real or complex; after that, the two-argument
real-only functions), but each type-generic fma macro for a different
return type would end up with its tests being run separately, rather
than increasing the size of a single test.

To avoid accidentally missing testing a macro because
gen-tgmath-tests.py supports testing it but the makefile fails to call
it for that function, a test is also added that verifies that the
lists of macros in the makefile and gen-tgmath-tests.py agree.

Tested for x86_64.

* math/gen-tgmath-tests.py: Import sys.
(Tests.__init__): Initialize macros_seen.
(Tests.add_tests): Add macro to macros_seen.  Only generate tests
if requested to do so for this macro.
(Tests.add_all_tests): Take argument for macro for which to
generate tests.
(Tests.check_macro_list): New function.
(main): Handle check-list argument and argument specifying macro
for which to generate tests.
* math/Makefile [PYTHON] (tgmath3-macros): New variable.
[PYTHON] (tgmath3-macro-tests): Likewise.
[PYTHON] (tests): Add $(tgmath3-macro-tests) not test-tgmath3.
[PYTHON] (generated): Add $(addsuffix .c,$(tgmath3-macro-tests))
not test-tgmath3.c.
[PYTHON] (CFLAGS-test-tgmath3.c): Remove.
[PYTHON] ($(tgmath3-macro-tests:%=$(objpfx)%.o): Add -fno-builtin
to CFLAGS.
[PYTHON] ($(objpfx)test-tgmath3.c): Replace rule by....
[PYTHON] ($(foreach
m,$(tgmath3-macros),$(objpfx)test-tgmath3-$(m).c): ... this.  New
rule.
[PYTHON] (tests-special): Add
$(objpfx)test-tgmath3-macro-list.out.
[PYTHON] ($(objpfx)test-tgmath3-macro-list.out): New rule.

6 years agoObsolete nfsservctl.
Joseph Myers [Fri, 18 May 2018 16:50:44 +0000 (16:50 +0000)]
Obsolete nfsservctl.

The Linux nfsservctl syscall was removed in Linux 3.1.  Since the
minimum kernel version for use with glibc is 3.2, the glibc wrapper
for this syscall can no longer usefully be called.  This patch makes
it into a compat symbol, not provided at all for static linking or new
ports.  (It was already the case that there was no header declaration
of this function.)

Tested for x86_64.

* sysdeps/unix/sysv/linux/syscalls.list (nfsservctl): Make into a
compat symbol, disabled for minimum symbol version GLIBC_2.28 and
later.

6 years agoFix year 2039 bug for localtime with 64-bit time_t (bug 22639).
Joseph Myers [Fri, 18 May 2018 11:57:15 +0000 (11:57 +0000)]
Fix year 2039 bug for localtime with 64-bit time_t (bug 22639).

Bug 22639 reports localtime failing to handle time offset transitions
correctly in 2039 and later on platforms with 64-bit time_t.

The problem is the use of SECSPERDAY (constant 86400) in calculations
such as

    t = ((year - 1970) * 365
 + /* Compute the number of leapdays between 1970 and YEAR
      (exclusive).  There is a leapday every 4th year ...  */
 + ((year - 1) / 4 - 1970 / 4)
 /* ... except every 100th year ... */
 - ((year - 1) / 100 - 1970 / 100)
 /* ... but still every 400th year.  */
 + ((year - 1) / 400 - 1970 / 400)) * SECSPERDAY;

where t is of type time_t and year is of type int.  Before my commit
92bd70fb85bce57ac47ba5d8af008736832c955a (an update from tzcode,
included in 2.26 and later releases), SECSPERDAY was obtained from a
file imported from tzcode, where the value included a cast to
int_fast32_t.  On 64-bit platforms, glibc defines int_fast32_t to be
long int, so 64-bit, but my patch resulted in it changing to int.
(The bug would probably have existed even before my patch for x32,
which has 64-bit time_t but 32-bit int_fast32_t, but I haven't
verified that.)

This patch fixes the problem by including a cast to time_t in the
definition of SECSPERDAY.  (64-bit time support for 32-bit systems
should move such code that isn't a public interface to using the
internal 64-bit version of time_t throughout.)

Tested for x86_64 and x86.

[BZ #22639]
* time/tzset.c (SECSPERDAY): Cast to time_t.
* time/tst-y2039.c: New file.
* time/Makefile (tests): Add tst-y2039.

6 years agoAdd missing changelog from previous commit
Leonardo Sandoval [Thu, 17 May 2018 15:11:45 +0000 (10:11 -0500)]
Add missing changelog from previous commit

6 years agox86-64: remove duplicate line on PREFETCH_ONE_SET macro
Leonardo Sandoval [Tue, 15 May 2018 16:56:03 +0000 (11:56 -0500)]
x86-64: remove duplicate line on PREFETCH_ONE_SET macro

Tested on 64-bit AVX machine

       * sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S
       (PREFETCH_ONE_SET): Remove duplicate line

6 years agomath: Reverse include order in <math-type-macros-*.h>
Florian Weimer [Thu, 17 May 2018 12:53:19 +0000 (14:53 +0200)]
math: Reverse include order in <math-type-macros-*.h>

_Float128 is defined for certain compilers indirectly from
<libm-alias-double.h>, and <ieee754_float128.h> (included from
<math-nan-payload-float128.h>) needs this definition.

6 years agoRemove unneeded setting of errno after malloc failure
Andreas Schwab [Thu, 17 May 2018 11:04:46 +0000 (13:04 +0200)]
Remove unneeded setting of errno after malloc failure

The errno value has alread been set by malloc.

6 years agonptl: Remove __ASSUME_PRIVATE_FUTEX
H.J. Lu [Thu, 17 May 2018 11:24:24 +0000 (04:24 -0700)]
nptl: Remove __ASSUME_PRIVATE_FUTEX

Since __ASSUME_PRIVATE_FUTEX is always defined, this patch removes the
!__ASSUME_PRIVATE_FUTEX paths.

Tested with build-many-glibcs.py.

* nptl/allocatestack.c (allocate_stack): Remove the
!__ASSUME_PRIVATE_FUTEX paths.
* nptl/descr.h (header): Remove the !__ASSUME_PRIVATE_FUTEX path.
* nptl/nptl-init.c (__pthread_initialize_minimal_internal):
Likewise.
* sysdeps/i386/nptl/tcb-offsets.sym (PRIVATE_FUTEX): Removed.
* sysdeps/powerpc/nptl/tcb-offsets.sym (PRIVATE_FUTEX): Likewise.
* sysdeps/sh/nptl/tcb-offsets.sym (PRIVATE_FUTEX): Likewise.
* sysdeps/x86_64/nptl/tcb-offsets.sym (PRIVATE_FUTEX): Likewise.
* sysdeps/i386/nptl/tls.h: (tcbhead_t): Remve the
!__ASSUME_PRIVATE_FUTEX path.
* sysdeps/s390/nptl/tls.h (tcbhead_t): Likewise.
* sysdeps/sparc/nptl/tls.h (tcbhead_t): Likewise.
* sysdeps/x86_64/nptl/tls.h (tcbhead_t): Likewise.
* sysdeps/unix/sysv/linux/i386/lowlevellock.S: Remove the
!__ASSUME_PRIVATE_FUTEX macros.
* sysdeps/unix/sysv/linux/lowlevellock-futex.h: Likewise.
* sysdeps/unix/sysv/linux/x86_64/cancellation.S: Likewise.
* sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
* sysdeps/unix/sysv/linux/kernel-features.h
(__ASSUME_PRIVATE_FUTEX): Removed.

6 years agoAdd narrowing divide functions.
Joseph Myers [Thu, 17 May 2018 00:40:52 +0000 (00:40 +0000)]
Add narrowing divide functions.

This patch adds the narrowing divide functions from TS 18661-1 to
glibc's libm: fdiv, fdivl, ddivl, f32divf64, f32divf32x, f32xdivf64
for all configurations; f32divf64x, f32divf128, f64divf64x,
f64divf128, f32xdivf64x, f32xdivf128, f64xdivf128 for configurations
with _Float64x and _Float128; __nldbl_ddivl for ldbl-opt.

The changes are mostly essentially the same as for the other narrowing
functions, so the description of those generally applies to this patch
as well.

Tested for x86_64, x86, mips64 (all three ABIs, both hard and soft
float) and powerpc, and with build-many-glibcs.py.

* math/Makefile (libm-narrow-fns): Add div.
(libm-test-funcs-narrow): Likewise.
* math/Versions (GLIBC_2.28): Add narrowing divide functions.
* math/bits/mathcalls-narrow.h (div): Use __MATHCALL_NARROW.
* math/gen-auto-libm-tests.c (test_functions): Add div.
* math/math-narrow.h (CHECK_NARROW_DIV): New macro.
(NARROW_DIV_ROUND_TO_ODD): Likewise.
(NARROW_DIV_TRIVIAL): Likewise.
* sysdeps/ieee754/float128/float128_private.h (__fdivl): New
macro.
(__ddivl): Likewise.
* sysdeps/ieee754/ldbl-opt/Makefile (libnldbl-calls): Add fdiv and
ddiv.
(CFLAGS-nldbl-ddiv.c): New variable.
(CFLAGS-nldbl-fdiv.c): Likewise.
* sysdeps/ieee754/ldbl-opt/Versions (GLIBC_2.28): Add
__nldbl_ddivl.
* sysdeps/ieee754/ldbl-opt/nldbl-compat.h (__nldbl_ddivl): New
prototype.
* manual/arith.texi (Misc FP Arithmetic): Document fdiv, fdivl,
ddivl, fMdivfN, fMdivfNx, fMxdivfN and fMxdivfNx.
* math/auto-libm-test-in: Add tests of div.
* math/auto-libm-test-out-narrow-div: New generated file.
* math/libm-test-narrow-div.inc: New file.
* sysdeps/i386/fpu/s_f32xdivf64.c: Likewise.
* sysdeps/ieee754/dbl-64/s_f32xdivf64.c: Likewise.
* sysdeps/ieee754/dbl-64/s_fdiv.c: Likewise.
* sysdeps/ieee754/float128/s_f32divf128.c: Likewise.
* sysdeps/ieee754/float128/s_f64divf128.c: Likewise.
* sysdeps/ieee754/float128/s_f64xdivf128.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_ddivl.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_f64xdivf128.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_fdivl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_ddivl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_fdivl.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_ddivl.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_fdivl.c: Likewise.
* sysdeps/ieee754/ldbl-opt/nldbl-ddiv.c: Likewise.
* sysdeps/ieee754/ldbl-opt/nldbl-fdiv.c: Likewise.
* sysdeps/ieee754/soft-fp/s_ddivl.c: Likewise.
* sysdeps/ieee754/soft-fp/s_fdiv.c: Likewise.
* sysdeps/ieee754/soft-fp/s_fdivl.c: Likewise.
* sysdeps/powerpc/fpu/libm-test-ulps: Update.
* sysdeps/mach/hurd/i386/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/aarch64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/alpha/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/arm/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/hppa/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/i386/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/ia64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/microblaze/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/nios2/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/riscv/rv64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/sh/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Likewise.

6 years agoFix concurrent changes on nscd aware files (BZ #23178)
Adhemerval Zanella [Wed, 16 May 2018 13:51:15 +0000 (10:51 -0300)]
Fix concurrent changes on nscd aware files (BZ #23178)

As indicated by BZ#23178, concurrent access on some files read by nscd
may result non expected data send through service requisition.  This is
due 'sendfile' Linux implementation where for sockets with zero-copy
support, callers must ensure the transferred portions of the the file
reffered by input file descriptor remain unmodified until the reader
on the other end of socket has consumed the transferred data.

I could not find any explicit documentation stating this behaviour on
Linux kernel documentation.  However man-pages sendfile entry [1] states
in NOTES the aforementioned remark.  It was initially pushed on man-pages
with an explicit testcase [2] that shows changing the file used in
'sendfile' call prior the socket input data consumption results in
previous data being lost.

From commit message it stated on tested Linux version (3.15) only TCP
socket showed this issues, however on recent kernels (4.4) I noticed the
same behaviour for local sockets as well.

Since sendfile on HURD is a read/write operation and the underlying
issue on Linux, the straightforward fix is just remove sendfile use
altogether.  I am really skeptical it is hitting some hotstop (there
are indication over internet that sendfile is helpfull only for large
files, more than 10kb) here to justify that extra code complexity or
to pursuit other possible fix (through memory or file locks for
instance, which I am not sure it is doable).

Checked on x86_64-linux-gnu.

[BZ #23178]
* nscd/nscd-client.h (sendfileall): Remove prototype.
* nscd/connections.c [HAVE_SENDFILE] (sendfileall): Remove function.
(handle_request): Use writeall instead of sendfileall.
* nscd/aicache.c (addhstaiX): Likewise.
* nscd/grpcache.c (cache_addgr): Likewise.
* nscd/hstcache.c (cache_addhst): Likewise.
* nscd/initgrcache.c (addinitgroupsX): Likewise.
* nscd/netgroupcache.c (addgetnetgrentX, addinnetgrX): Likewise.
* nscd/pwdcache.c (cache_addpw): Likewise.
* nscd/servicescache.c (cache_addserv): Likewise.
* sysdeps/unix/sysv/linux/Makefile [$(subdir) == nscd]
(sysdep-CFLAGS): Remove -DHAVE_SENDFILE.
* sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_SENDFILE):
Remove define.

[1] http://man7.org/linux/man-pages/man2/sendfile.2.html
[2] https://github.com/mkerrisk/man-pages/commit/7b6a3299776b5c1c4f169a591434a855d50c68b4#diff-efd6af3a70f0f07c578e85b51e83b3c3

6 years agox86-64: Use IFUNC strncat inside libc.so
H.J. Lu [Wed, 16 May 2018 16:03:45 +0000 (09:03 -0700)]
x86-64: Use IFUNC strncat inside libc.so

Unlike i386, we can call hidden IFUNC functions inside libc.so since
x86-64 PLT is always PIC.

Tested on x86-64.

* sysdeps/x86_64/multiarch/strncat-c.c (STRNCAT_PRIMARY): Removed.
Include <string/strncat.c>.
* sysdeps/x86_64/multiarch/strncat.c (__strncat): New strong
alias.
(__GI___strncat): New hidden alias.

6 years agoUpdate MIPS libm-test-ulps.
Joseph Myers [Wed, 16 May 2018 15:35:26 +0000 (15:35 +0000)]
Update MIPS libm-test-ulps.

* sysdeps/mips/mips32/libm-test-ulps: Update.
* sysdeps/mips/mips64/libm-test-ulps: Likewise.

6 years agosupport: Add TEST_COMPARE_BLOB, support_quote_blob
Florian Weimer [Wed, 16 May 2018 15:00:35 +0000 (17:00 +0200)]
support: Add TEST_COMPARE_BLOB, support_quote_blob

The declaration of support_test_compare_blob uses unsigned long int,
to avoid including <stddef.h>.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
6 years agomath: Merge strtod_nan_*.h into math-type-macros-*.h
Florian Weimer [Wed, 16 May 2018 04:03:08 +0000 (06:03 +0200)]
math: Merge strtod_nan_*.h into math-type-macros-*.h

This change will eventually make it possible to compile
stdlib/strtod_nan_main.c as part of math/s_nan_template.c.

6 years agoAdd narrowing multiply functions.
Joseph Myers [Wed, 16 May 2018 00:05:28 +0000 (00:05 +0000)]
Add narrowing multiply functions.

This patch adds the narrowing multiply functions from TS 18661-1 to
glibc's libm: fmul, fmull, dmull, f32mulf64, f32mulf32x, f32xmulf64
for all configurations; f32mulf64x, f32mulf128, f64mulf64x,
f64mulf128, f32xmulf64x, f32xmulf128, f64xmulf128 for configurations
with _Float64x and _Float128; __nldbl_dmull for ldbl-opt.

The changes are mostly essentially the same as for the narrowing add
functions, so the description of those generally applies to this patch
as well.  f32xmulf64 for i386 cannot use precision control as used for
add and subtract, because that would result in double rounding for
subnormal results, so that uses round-to-odd with long double
intermediate result instead.  The soft-fp support involves adding a
new FP_TRUNC_COOKED since soft-fp multiplication uses cooked inputs
and outputs.

Tested for x86_64, x86, mips64 (all three ABIs, both hard and soft
float) and powerpc, and with build-many-glibcs.py.

* math/Makefile (libm-narrow-fns): Add mul.
(libm-test-funcs-narrow): Likewise.
* math/Versions (GLIBC_2.28): Add narrowing multiply functions.
* math/bits/mathcalls-narrow.h (mul): Use __MATHCALL_NARROW.
* math/gen-auto-libm-tests.c (test_functions): Add mul.
* math/math-narrow.h (CHECK_NARROW_MUL): New macro.
(NARROW_MUL_ROUND_TO_ODD): Likewise.
(NARROW_MUL_TRIVIAL): Likewise.
* soft-fp/op-common.h (FP_TRUNC_COOKED): Likewise.
* sysdeps/ieee754/float128/float128_private.h (__fmull): New
macro.
(__dmull): Likewise.
* sysdeps/ieee754/ldbl-opt/Makefile (libnldbl-calls): Add fmul and
dmul.
(CFLAGS-nldbl-dmul.c): New variable.
(CFLAGS-nldbl-fmul.c): Likewise.
* sysdeps/ieee754/ldbl-opt/Versions (GLIBC_2.28): Add
__nldbl_dmull.
* sysdeps/ieee754/ldbl-opt/nldbl-compat.h (__nldbl_dmull): New
prototype.
* manual/arith.texi (Misc FP Arithmetic): Document fmul, fmull,
dmull, fMmulfN, fMmulfNx, fMxmulfN and fMxmulfNx.
* math/auto-libm-test-in: Add tests of mul.
* math/auto-libm-test-out-narrow-mul: New generated file.
* math/libm-test-narrow-mul.inc: New file.
* sysdeps/i386/fpu/s_f32xmulf64.c: Likewise.
* sysdeps/ieee754/dbl-64/s_f32xmulf64.c: Likewise.
* sysdeps/ieee754/dbl-64/s_fmul.c: Likewise.
* sysdeps/ieee754/float128/s_f32mulf128.c: Likewise.
* sysdeps/ieee754/float128/s_f64mulf128.c: Likewise.
* sysdeps/ieee754/float128/s_f64xmulf128.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_dmull.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_f64xmulf128.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_fmull.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_dmull.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_fmull.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_dmull.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_fmull.c: Likewise.
* sysdeps/ieee754/ldbl-opt/nldbl-dmul.c: Likewise.
* sysdeps/ieee754/ldbl-opt/nldbl-fmul.c: Likewise.
* sysdeps/ieee754/soft-fp/s_dmull.c: Likewise.
* sysdeps/ieee754/soft-fp/s_fmul.c: Likewise.
* sysdeps/ieee754/soft-fp/s_fmull.c: Likewise.
* sysdeps/powerpc/fpu/libm-test-ulps: Update.
* sysdeps/mach/hurd/i386/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/aarch64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/alpha/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/arm/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/hppa/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/i386/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/ia64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/microblaze/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/nios2/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/riscv/rv64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/sh/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Likewise.

6 years agoi386: Replace PREINIT_FUNCTION@PLT with *%eax in call
H.J. Lu [Mon, 14 May 2018 16:23:55 +0000 (09:23 -0700)]
i386: Replace PREINIT_FUNCTION@PLT with *%eax in call

Since we have loaded address of PREINIT_FUNCTION into %eax, we can
avoid extra branch to PLT slot.

* sysdeps/i386/crti.S (_init): Replace PREINIT_FUNCTION@PLT
with *%eax in call.

Acked-by: Christian Brauner (Ubuntu) <christian@brauner.io>
6 years agox86: Add sysdeps/x86/ldsodefs.h
H.J. Lu [Mon, 14 May 2018 16:19:12 +0000 (09:19 -0700)]
x86: Add sysdeps/x86/ldsodefs.h

Merge sysdeps/i386/ldsodefs.h and sysdeps/x86_64/ldsodefs.h into
sysdeps/x86/ldsodefs.h.

Tested on i686 and x86-64.

* sysdeps/i386/ldsodefs.h: Removed.
* sysdeps/x86_64/ldsodefs.h: Moved to ...
* sysdeps/x86/ldsodefs.h: This.
(La_i86_regs): New.
(La_i86_retval): Likewise.
(ARCH_PLTENTER_MEMBERS): Add i86_gnu_pltenter.
(ARCH_PLTEXIT_MEMBERS): i86_gnu_pltexit.

Acked-by: Christian Brauner (Ubuntu) christian@brauner.io
6 years agox86-64: Remove the unnecessary testl in strlen-avx2.S
H.J. Lu [Mon, 14 May 2018 10:41:22 +0000 (03:41 -0700)]
x86-64: Remove the unnecessary testl in strlen-avx2.S

Since the result of testl is never used, this patch removes it.

Tested on 64-bit AVX2 machine.

* sysdeps/x86_64/multiarch/strlen-avx2.S (STRLEN): Remove the
unnecessary testl.

6 years agoR_PARISC_TLS_DTPOFF32 reloc handling
Alan Modra [Sat, 21 Apr 2018 03:11:29 +0000 (12:41 +0930)]
R_PARISC_TLS_DTPOFF32 reloc handling

* sysdeps/hppa/dl-machine.h (elf_machine_rela): Add
R_PARISC_TLS_DTPOFF32 reloc addend.

6 years agopowerpc: Fix the compiler type used with C++ when -mabi=ieeelongdouble
Tulio Magno Quites Machado Filho [Fri, 11 May 2018 21:05:03 +0000 (18:05 -0300)]
powerpc: Fix the compiler type used with C++ when -mabi=ieeelongdouble

When compiling C++ code with -mabi=ieeelongdouble, KCtype is
unavailable and the long double type should be used instead.

This is also providing macro __HAVE_FLOAT128_UNLIKE_LDBL in order to
identify the kind of long double type is being used in the current
compilation unit.
Notice that bits/floatn.h cannot benefit from the new macro due to order
of header inclusion.

* bits/floatn-common.h: Define __HAVE_FLOAT128_UNLIKE_LDBL.
* math/math.h: Restrict the prototype definition for the functions
issignaling(_Float128) and iszero(_Float128); and template
__iseqsig_type<_Float128>, from __HAVE_DISTINCT_FLOAT128 to
__HAVE_FLOAT128_UNLIKE_LDBL.
* sysdeps/powerpc/bits/floatn.h [__HAVE_FLOAT128
&& (!__GNUC_PREREQ (7, 0) || defined __cplusplus)
&& __LDBL_MANT_DIG__ == 113]: Use long double suffix for
__f128() constants; define the type _Float128 as long double;
and reuse long double in __CFLOAT128.

Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
6 years agoDo not include math-barriers.h in math_private.h.
Joseph Myers [Fri, 11 May 2018 15:11:38 +0000 (15:11 +0000)]
Do not include math-barriers.h in math_private.h.

This patch continues the math_private.h cleanup by stopping
math_private.h from including math-barriers.h and making the users of
the barrier macros include the latter header directly.  No attempt is
made to remove any math_private.h includes that are now unused, except
in strtod_l.c where that is done to avoid line number changes in
assertions, so that installed stripped shared libraries can be
compared before and after the patch.  (I think the floating-point
environment support in math_private.h should also move out - some
architectures already have fenv_private.h as an architecture-internal
header included from their math_private.h - and after moving that out
might be a better time to identify unused math_private.h includes.)

Tested for x86_64 and x86, and tested with build-many-glibcs.py that
installed stripped shared libraries are unchanged by the patch.

* sysdeps/generic/math_private.h: Do not include
<math-barriers.h>.
* stdlib/strtod_l.c: Include <math-barriers.h> instead of
<math_private.h>.
* math/fromfp.h: Include <math-barriers.h>.
* math/math-narrow.h: Likewise.
* math/s_nextafter.c: Likewise.
* math/s_nexttowardf.c: Likewise.
* sysdeps/aarch64/fpu/s_llrint.c: Likewise.
* sysdeps/aarch64/fpu/s_llrintf.c: Likewise.
* sysdeps/aarch64/fpu/s_lrint.c: Likewise.
* sysdeps/aarch64/fpu/s_lrintf.c: Likewise.
* sysdeps/i386/fpu/s_nextafterl.c: Likewise.
* sysdeps/i386/fpu/s_nexttoward.c: Likewise.
* sysdeps/i386/fpu/s_nexttowardf.c: Likewise.
* sysdeps/ieee754/dbl-64/e_atan2.c: Likewise.
* sysdeps/ieee754/dbl-64/e_atanh.c: Likewise.
* sysdeps/ieee754/dbl-64/e_exp.c: Likewise.
* sysdeps/ieee754/dbl-64/e_exp2.c: Likewise.
* sysdeps/ieee754/dbl-64/e_j0.c: Likewise.
* sysdeps/ieee754/dbl-64/e_sqrt.c: Likewise.
* sysdeps/ieee754/dbl-64/s_expm1.c: Likewise.
* sysdeps/ieee754/dbl-64/s_fma.c: Likewise.
* sysdeps/ieee754/dbl-64/s_fmaf.c: Likewise.
* sysdeps/ieee754/dbl-64/s_log1p.c: Likewise.
* sysdeps/ieee754/dbl-64/s_nearbyint.c: Likewise.
* sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c: Likewise.
* sysdeps/ieee754/flt-32/e_atanhf.c: Likewise.
* sysdeps/ieee754/flt-32/e_j0f.c: Likewise.
* sysdeps/ieee754/flt-32/s_expm1f.c: Likewise.
* sysdeps/ieee754/flt-32/s_log1pf.c: Likewise.
* sysdeps/ieee754/flt-32/s_nearbyintf.c: Likewise.
* sysdeps/ieee754/flt-32/s_nextafterf.c: Likewise.
* sysdeps/ieee754/k_standardl.c: Likewise.
* sysdeps/ieee754/ldbl-128/e_asinl.c: Likewise.
* sysdeps/ieee754/ldbl-128/e_expl.c: Likewise.
* sysdeps/ieee754/ldbl-128/e_powl.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_fmal.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_nearbyintl.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_nextafterl.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_nexttoward.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_nexttowardf.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/e_asinl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_fmal.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_rintl.c: Likewise.
* sysdeps/ieee754/ldbl-96/e_atanhl.c: Likewise.
* sysdeps/ieee754/ldbl-96/e_j0l.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_fma.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_fmal.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_nexttoward.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_nexttowardf.c: Likewise.
* sysdeps/ieee754/ldbl-opt/s_nexttowardfd.c: Likewise.
* sysdeps/m68k/m680x0/fpu/s_nextafterl.c: Likewise.

6 years agotime: Use 64-bit time values for time zone parsing
Florian Weimer [Fri, 11 May 2018 14:30:30 +0000 (16:30 +0200)]
time: Use 64-bit time values for time zone parsing

6 years agosunrpc: Remove stray exports without --enable-obsolete-rpc [BZ #23166]
Florian Weimer [Fri, 11 May 2018 13:36:50 +0000 (15:36 +0200)]
sunrpc: Remove stray exports without --enable-obsolete-rpc [BZ #23166]

This is needed to avoid a warning when linking against libtirpc:

/lib64/libc.so.6: warning: common of `rpc_createerr@@TIRPC_0.3.0' overridden by definition
/usr/lib64/libtirpc.so: warning: defined here

This ld warning is not enabled by default; -Wl,--warn-common enables it.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
6 years agogd_GB: Fix typo in abbreviated "May" (bug 23152).
Rafal Luzynski [Wed, 9 May 2018 01:06:32 +0000 (03:06 +0200)]
gd_GB: Fix typo in abbreviated "May" (bug 23152).

[BZ #23152]
* localedata/locales/gd_GB (abmon): Fix typo in May:
"Mhàrt" -> "Cèit".  Adjust the comment according to the change.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
6 years agoaarch64,falkor: Ignore prefetcher tagging for smaller copies
Siddhesh Poyarekar [Thu, 10 May 2018 18:41:52 +0000 (00:11 +0530)]
aarch64,falkor: Ignore prefetcher tagging for smaller copies

For smaller and medium sized copies, the effect of hardware
prefetching are not as dominant as instruction level parallelism.
Hence it makes more sense to load data into multiple registers than to
try and route them to the same prefetch unit.  This is also the case
for the loop exit where we are unable to latch on to the same prefetch
unit anyway so it makes more sense to have data loaded in parallel.

The performance results are a bit mixed with memcpy-random, with
numbers jumping between -1% and +3%, i.e. the numbers don't seem
repeatable.  memcpy-walk sees a 70% improvement (i.e. > 2x) for 128
bytes and that improvement reduces down as the impact of the tail copy
decreases in comparison to the loop.

* sysdeps/aarch64/multiarch/memcpy_falkor.S (__memcpy_falkor):
Use multiple registers to copy data in loop tail.

6 years agoaarch64,falkor: Ignore prefetcher hints for memmove tail
Siddhesh Poyarekar [Thu, 10 May 2018 18:38:01 +0000 (00:08 +0530)]
aarch64,falkor: Ignore prefetcher hints for memmove tail

The tail of the copy loops are unable to train the falkor hardware
prefetcher because they load from a different base compared to the hot
loop.  In this case avoid serializing the instructions by loading them
into different registers.  Also peel the last iteration of the loop
into the tail (and have them use different registers) since it gives
better performance for medium sizes.

This results in performance improvements of between 3% and 20% over
the current falkor implementation for sizes between 128 bytes and 1K
on the memmove-walk benchmark, thus mostly covering the regressions
seen against the generic memmove.

* sysdeps/aarch64/multiarch/memmove_falkor.S
(__memmove_falkor): Use multiple registers to move data in
loop tail.

6 years agoMove math_check_force_underflow macros to separate math-underflow.h.
Joseph Myers [Thu, 10 May 2018 00:53:04 +0000 (00:53 +0000)]
Move math_check_force_underflow macros to separate math-underflow.h.

This patch continues cleaning up math_private.h by moving the
math_check_force_underflow set of macros to a separate header
math-underflow.h.

This header is included by the files that need it rather than from
math_private.h.  Moving these macros to a separate file removes the
math_private.h uses of macros from float.h, so the inclusion of
float.h in math_private.h is also removed; files that were depending
on that inclusion are fixed to include float.h directly.  The
inclusion of math-barriers.h from math_private.h will be removed in a
separate patch.

Tested for x86_64 and x86.  Also tested with build-many-glibcs.py that
installed stripped shared libraries are unchanged by this patch.

* math/math-underflow.h: New file.
* sysdeps/generic/math_private.h: Do not include <float.h>.
(fabs_tg): Remove macro.  Moved to math-underflow.h.
(min_of_type_f): Likewise.
(min_of_type_): Likewise.
(min_of_type_l): Likewise.
(min_of_type_f128): Likewise.
(min_of_type): Likewise.
(math_check_force_underflow): Likewise.
(math_check_force_underflow_nonneg): Likewise.
(math_check_force_underflow_complex): Likewise.
* math/e_exp2_template.c: Include <math-underflow.h>.
* math/k_casinh_template.c: Likewise.
* math/s_catan_template.c: Likewise.
* math/s_catanh_template.c: Likewise.
* math/s_ccosh_template.c: Likewise.
* math/s_cexp_template.c: Likewise.
* math/s_clog10_template.c: Likewise.
* math/s_clog_template.c: Likewise.
* math/s_csin_template.c: Likewise.
* math/s_csinh_template.c: Likewise.
* math/s_csqrt_template.c: Likewise.
* math/s_ctan_template.c: Likewise.
* math/s_ctanh_template.c: Likewise.
* sysdeps/ieee754/dbl-64/e_asin.c: Likewise.
* sysdeps/ieee754/dbl-64/e_atanh.c: Likewise.
* sysdeps/ieee754/dbl-64/e_exp2.c: Likewise.
* sysdeps/ieee754/dbl-64/e_gamma_r.c: Likewise.
* sysdeps/ieee754/dbl-64/e_hypot.c: Likewise.
* sysdeps/ieee754/dbl-64/e_j1.c: Likewise.
* sysdeps/ieee754/dbl-64/e_jn.c: Likewise.
* sysdeps/ieee754/dbl-64/e_pow.c: Likewise.
* sysdeps/ieee754/dbl-64/e_sinh.c: Likewise.
* sysdeps/ieee754/dbl-64/s_asinh.c: Likewise.
* sysdeps/ieee754/dbl-64/s_atan.c: Likewise.
* sysdeps/ieee754/dbl-64/s_erf.c: Likewise.
* sysdeps/ieee754/dbl-64/s_expm1.c: Likewise.
* sysdeps/ieee754/dbl-64/s_log1p.c: Likewise.
* sysdeps/ieee754/dbl-64/s_sin.c: Likewise.
* sysdeps/ieee754/dbl-64/s_sincos.c: Likewise.
* sysdeps/ieee754/dbl-64/s_tan.c: Likewise.
* sysdeps/ieee754/dbl-64/s_tanh.c: Likewise.
* sysdeps/ieee754/flt-32/e_asinf.c: Likewise.
* sysdeps/ieee754/flt-32/e_atanhf.c: Likewise.
* sysdeps/ieee754/flt-32/e_gammaf_r.c: Likewise.
* sysdeps/ieee754/flt-32/e_j1f.c: Likewise.
* sysdeps/ieee754/flt-32/e_jnf.c: Likewise.
* sysdeps/ieee754/flt-32/e_sinhf.c: Likewise.
* sysdeps/ieee754/flt-32/k_sinf.c: Likewise.
* sysdeps/ieee754/flt-32/k_tanf.c: Likewise.
* sysdeps/ieee754/flt-32/s_asinhf.c: Likewise.
* sysdeps/ieee754/flt-32/s_atanf.c: Likewise.
* sysdeps/ieee754/flt-32/s_erff.c: Likewise.
* sysdeps/ieee754/flt-32/s_expm1f.c: Likewise.
* sysdeps/ieee754/flt-32/s_log1pf.c: Likewise.
* sysdeps/ieee754/flt-32/s_tanhf.c: Likewise.
* sysdeps/ieee754/ldbl-128/e_asinl.c: Likewise.
* sysdeps/ieee754/ldbl-128/e_atanhl.c: Likewise.
* sysdeps/ieee754/ldbl-128/e_expl.c: Likewise.
* sysdeps/ieee754/ldbl-128/e_gammal_r.c: Likewise.
* sysdeps/ieee754/ldbl-128/e_hypotl.c: Likewise.
* sysdeps/ieee754/ldbl-128/e_j1l.c: Likewise.
* sysdeps/ieee754/ldbl-128/e_jnl.c: Likewise.
* sysdeps/ieee754/ldbl-128/e_sinhl.c: Likewise.
* sysdeps/ieee754/ldbl-128/k_sincosl.c: Likewise.
* sysdeps/ieee754/ldbl-128/k_sinl.c: Likewise.
* sysdeps/ieee754/ldbl-128/k_tanl.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_asinhl.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_atanl.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_erfl.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_expm1l.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_log1pl.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_tanhl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/e_asinl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/e_atanhl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/e_hypotl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/e_j1l.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/e_jnl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/e_powl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/e_sinhl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/k_sincosl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/k_sinl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/k_tanl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_asinhl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_atanl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_erfl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_fmal.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_tanhl.c: Likewise.
* sysdeps/ieee754/ldbl-96/e_asinl.c: Likewise.
* sysdeps/ieee754/ldbl-96/e_atanhl.c: Likewise.
* sysdeps/ieee754/ldbl-96/e_gammal_r.c: Likewise.
* sysdeps/ieee754/ldbl-96/e_hypotl.c: Likewise.
* sysdeps/ieee754/ldbl-96/e_j1l.c: Likewise.
* sysdeps/ieee754/ldbl-96/e_jnl.c: Likewise.
* sysdeps/ieee754/ldbl-96/e_sinhl.c: Likewise.
* sysdeps/ieee754/ldbl-96/k_sinl.c: Likewise.
* sysdeps/ieee754/ldbl-96/k_tanl.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_asinhl.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_erfl.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_tanhl.c: Likewise.
* sysdeps/powerpc/fpu/e_hypot.c: Likewise.
* sysdeps/x86/fpu/powl_helper.c: Likewise.
* sysdeps/ieee754/dbl-64/s_nextup.c: Include <float.h>.
* sysdeps/ieee754/flt-32/s_nextupf.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_nextupl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_nextupl.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_nextupl.c: Likewise.

6 years agoMove math_opt_barrier, math_force_eval to separate math-barriers.h.
Joseph Myers [Wed, 9 May 2018 19:45:47 +0000 (19:45 +0000)]
Move math_opt_barrier, math_force_eval to separate math-barriers.h.

This patch continues cleaning up math_private.h by moving the
math_opt_barrier and math_force_eval macros to a separate header
math-barriers.h.

At present, those macros are inside a "#ifndef math_opt_barrier" in
math_private.h to allow architectures to override them and then use
a separate math-barriers.h header, no such #ifndef or #include_next is
needed; architectures just have their own alternative version of
math-barriers.h when providing their own optimized versions that avoid
going through memory unnecessarily.  The generic math-barriers.h has a
comment added to document these two macros.

In this patch, math_private.h is made to #include <math-barriers.h>,
so files using these macros do not need updating yet.  That is because
of uses of math_force_eval in math_check_force_underflow and
math_check_force_underflow_nonneg, which are still defined in
math_private.h.  Once those are moved out to a separate header, that
separate header can be made to include <math-barriers.h>, as can the
other files directly using these barrier macros, and then the include
of <math-barriers.h> from math_private.h can be removed.

Tested for x86_64 and x86.  Also tested with build-many-glibcs.py that
installed stripped shared libraries are unchanged by this patch.

* sysdeps/generic/math-barriers.h: New file.
* sysdeps/generic/math_private.h [!math_opt_barrier]
(math_opt_barrier): Move to math-barriers.h.
[!math_opt_barrier] (math_force_eval): Likewise.
* sysdeps/aarch64/fpu/math-barriers.h: New file.
* sysdeps/aarch64/fpu/math_private.h (math_opt_barrier): Move to
math-barriers.h.
(math_force_eval): Likewise.
* sysdeps/alpha/fpu/math-barriers.h: New file.
* sysdeps/alpha/fpu/math_private.h (math_opt_barrier): Move to
math-barriers.h.
(math_force_eval): Likewise.
* sysdeps/x86/fpu/math-barriers.h: New file.
* sysdeps/i386/fpu/fenv_private.h (math_opt_barrier): Move to
math-barriers.h.
(math_force_eval): Likewise.
* sysdeps/m68k/m680x0/fpu/math_private.h: Move to....
* sysdeps/m68k/m680x0/fpu/math-barriers.h: ... here.  Adjust
multiple-include guard for rename.
* sysdeps/powerpc/fpu/math-barriers.h: New file.
* sysdeps/powerpc/fpu/math_private.h (math_opt_barrier): Move to
math-barriers.h.
(math_force_eval): Likewise.

6 years agoFix BZ 22786: integer addition overflow may cause stack buffer overflow
Paul Pluzhnikov [Wed, 9 May 2018 01:12:41 +0000 (18:12 -0700)]
Fix BZ 22786: integer addition overflow may cause stack buffer overflow
when realpath() input length is close to SSIZE_MAX.

2018-05-09  Paul Pluzhnikov  <ppluzhnikov@google.com>

[BZ #22786]
* stdlib/canonicalize.c (__realpath): Fix overflow in path length
computation.
* stdlib/Makefile (test-bz22786): New test.
* stdlib/test-bz22786.c: New test.

6 years agoMove math_narrow_eval to separate math-narrow-eval.h.
Joseph Myers [Wed, 9 May 2018 00:15:10 +0000 (00:15 +0000)]
Move math_narrow_eval to separate math-narrow-eval.h.

This patch continues cleaning up the math_private.h header, which
contains lots of different definitions many of which are only needed
by a limited subset of files using that header (and some of which are
overridden by architectures that only want to override selected parts
of the header), by moving the math_narrow_eval macro out to a separate
math-narrow-eval.h header, only included by those files that need it.
That header is placed in include/ (since it's used in stdlib/, not
just files built in math/, but no sysdeps variants are needed at
present).

Tested for x86_64, and with build-many-glibcs.py.  (Installed stripped
shared libraries change because of line numbers in assertions in
strtod_l.c.)

* include/math-narrow-eval.h: New file.  Contents moved from ....
* sysdeps/generic/math_private.h: ... here.
(math_narrow_eval): Remove macro.  Moved to math-narrow-eval.h.
[FLT_EVAL_METHOD != 0] (excess_precision): Likewise.
* math/s_fdim_template.c: Include <math-narrow-eval.h>.
* stdlib/strtod_l.c: Likewise.
* sysdeps/i386/fpu/s_f32xaddf64.c: Likewise.
* sysdeps/i386/fpu/s_f32xsubf64.c: Likewise.
* sysdeps/i386/fpu/s_fdim.c: Likewise.
* sysdeps/ieee754/dbl-64/e_cosh.c: Likewise.
* sysdeps/ieee754/dbl-64/e_gamma_r.c: Likewise.
* sysdeps/ieee754/dbl-64/e_j1.c: Likewise.
* sysdeps/ieee754/dbl-64/e_jn.c: Likewise.
* sysdeps/ieee754/dbl-64/e_lgamma_r.c: Likewise.
* sysdeps/ieee754/dbl-64/e_sinh.c: Likewise.
* sysdeps/ieee754/dbl-64/gamma_productf.c: Likewise.
* sysdeps/ieee754/dbl-64/k_rem_pio2.c: Likewise.
* sysdeps/ieee754/dbl-64/lgamma_neg.c: Likewise.
* sysdeps/ieee754/dbl-64/s_erf.c: Likewise.
* sysdeps/ieee754/dbl-64/s_llrint.c: Likewise.
* sysdeps/ieee754/dbl-64/s_lrint.c: Likewise.
* sysdeps/ieee754/flt-32/e_coshf.c: Likewise.
* sysdeps/ieee754/flt-32/e_exp2f.c: Likewise.
* sysdeps/ieee754/flt-32/e_expf.c: Likewise.
* sysdeps/ieee754/flt-32/e_gammaf_r.c: Likewise.
* sysdeps/ieee754/flt-32/e_j1f.c: Likewise.
* sysdeps/ieee754/flt-32/e_jnf.c: Likewise.
* sysdeps/ieee754/flt-32/e_lgammaf_r.c: Likewise.
* sysdeps/ieee754/flt-32/e_sinhf.c: Likewise.
* sysdeps/ieee754/flt-32/k_rem_pio2f.c: Likewise.
* sysdeps/ieee754/flt-32/lgamma_negf.c: Likewise.
* sysdeps/ieee754/flt-32/s_erff.c: Likewise.
* sysdeps/ieee754/flt-32/s_llrintf.c: Likewise.
* sysdeps/ieee754/flt-32/s_lrintf.c: Likewise.
* sysdeps/ieee754/ldbl-96/gamma_product.c: Likewise.

6 years agoFix comment typo
Andreas Schwab [Tue, 8 May 2018 12:57:33 +0000 (14:57 +0200)]
Fix comment typo

6 years agox86-64/memset: Mark the debugger symbol as hidden
H.J. Lu [Mon, 7 May 2018 18:01:38 +0000 (11:01 -0700)]
x86-64/memset: Mark the debugger symbol as hidden

When MEMSET_SYMBOL (__memset, erms) is provided for debugger, mark it
as hidden so that it will be local to the library.

* sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S
(MEMSET_SYMBOL (__memset, erms)): Mark the debugger symbol as
hidden.

6 years agobenchtests: Move iterator declaration into loop header
Siddhesh Poyarekar [Mon, 7 May 2018 15:24:31 +0000 (20:54 +0530)]
benchtests: Move iterator declaration into loop header

This is a minor style change to move the definition of I to its usage
scope instead of at the top of the function.  This is consistent with
glibc style guidelines and more importantly it was getting in the way
of my testing.

* benchtests/bench-memcpy-walk.c (do_test): Move declaration
of I into loop header.
* benchtests/bench-memmove-walk.c (do_test): Likewise.

6 years agoRevert:
Alexandre Oliva [Mon, 7 May 2018 04:37:37 +0000 (01:37 -0300)]
Revert:
2018-04-30  Raymond Nicholson <rain1@airmail.cc>
* manual/startup.texi (Aborting a Program): Remove inappropriate joke.

This complies with the decision of the project leader and primary and
ultimate maintainer, who partially delegated maintainership to myself
and others under certain constraints.

This is also in line with the community-agreed procedures.

It is obvious that we didn't have consensus on a decision to install
that patch, since both sides are still arguing over it.

As for the decision to reverse the deletion, if we even need one to
counter a move that did not have consensus, although nobody else offered
to install the reversal and restore the status prior to the fait
accompli, and some explicitly refused to do so themselves, nobody
objected when I offered to do so.  Therefore, by the same reasoning that
led to the mistaken installation of the patch, and after a much longer
wait for objections, I understand there is consensus on my reverting it.

6 years agoFix BZ 20419. A PT_NOTE in a binary could be arbitratily large, so using
Paul Pluzhnikov [Sun, 6 May 2018 01:08:27 +0000 (18:08 -0700)]
Fix BZ 20419.  A PT_NOTE in a binary could be arbitratily large, so using
alloca for it may cause stack overflow.  If the note is larger than
__MAX_ALLOCA_CUTOFF, use dynamically allocated memory to read it in.

2018-05-05  Paul Pluzhnikov  <ppluzhnikov@google.com>

[BZ #20419]
* elf/dl-load.c (open_verify): Fix stack overflow.
* elf/Makefile (tst-big-note): New test.
* elf/tst-big-note-lib.S: New.
* elf/tst-big-note.c: New.

6 years agoIgnore absolute symbols in ABI tests.
Joseph Myers [Fri, 4 May 2018 15:46:32 +0000 (15:46 +0000)]
Ignore absolute symbols in ABI tests.

A recent binutils patch
<https://sourceware.org/ml/binutils/2018-04/msg00336.html> stops the
MIPS linker including the _gp_disp absolute symbol in dynamic symbol
tables.

With older binutils, it is included for MIPS o32 (despite the use of
symbol versioning), and this means that all the ABI test baselines for
MIPS o32 include "_gp_disp _gp_disp A".  This symbol is not
meaningfully part of the ABI for shared libraries, since it always has
to be resolved at static link time to the local definition for the
linked object.

All the other absolute symbols in ABI test baselines are the names of
symbol versions.  I don't think the mere existence of a symbol version
with a given name - as opposed to the contents of that version if
nonempty - is part of the ABI either.  Thus, this patch allows the ABI
tests to pass both before and after the binutils change by changing
abilist.awk not to include absolute symbols in its output, and
changing the baselines accordingly.

Tested for x86_64, and with build-many-glibcs.py.

* scripts/abilist.awk: Ignore absolute symbols.
* sysdeps/mach/hurd/i386/ld.abilist: Remove absolute symbols.
* sysdeps/mach/hurd/i386/libBrokenLocale.abilist: Likewise.
* sysdeps/mach/hurd/i386/libanl.abilist: Likewise.
* sysdeps/mach/hurd/i386/libc.abilist: Likewise.
* sysdeps/mach/hurd/i386/libcrypt.abilist: Likewise.
* sysdeps/mach/hurd/i386/libdl.abilist: Likewise.
* sysdeps/mach/hurd/i386/libm.abilist: Likewise.
* sysdeps/mach/hurd/i386/libnsl.abilist: Likewise.
* sysdeps/mach/hurd/i386/libpthread.abilist: Likewise.
* sysdeps/mach/hurd/i386/libresolv.abilist: Likewise.
* sysdeps/mach/hurd/i386/librt.abilist: Likewise.
* sysdeps/mach/hurd/i386/libutil.abilist: Likewise.
* sysdeps/unix/sysv/linux/aarch64/ld.abilist: Likewise.
* sysdeps/unix/sysv/linux/aarch64/libBrokenLocale.abilist: Likewise.
* sysdeps/unix/sysv/linux/aarch64/libanl.abilist: Likewise.
* sysdeps/unix/sysv/linux/aarch64/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/aarch64/libcrypt.abilist: Likewise.
* sysdeps/unix/sysv/linux/aarch64/libdl.abilist: Likewise.
* sysdeps/unix/sysv/linux/aarch64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/aarch64/libnsl.abilist: Likewise.
* sysdeps/unix/sysv/linux/aarch64/libpthread.abilist: Likewise.
* sysdeps/unix/sysv/linux/aarch64/libresolv.abilist: Likewise.
* sysdeps/unix/sysv/linux/aarch64/librt.abilist: Likewise.
* sysdeps/unix/sysv/linux/aarch64/libthread_db.abilist: Likewise.
* sysdeps/unix/sysv/linux/aarch64/libutil.abilist: Likewise.
* sysdeps/unix/sysv/linux/alpha/ld.abilist: Likewise.
* sysdeps/unix/sysv/linux/alpha/libBrokenLocale.abilist: Likewise.
* sysdeps/unix/sysv/linux/alpha/libanl.abilist: Likewise.
* sysdeps/unix/sysv/linux/alpha/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/alpha/libcrypt.abilist: Likewise.
* sysdeps/unix/sysv/linux/alpha/libdl.abilist: Likewise.
* sysdeps/unix/sysv/linux/alpha/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/alpha/libnsl.abilist: Likewise.
* sysdeps/unix/sysv/linux/alpha/libpthread.abilist: Likewise.
* sysdeps/unix/sysv/linux/alpha/libresolv.abilist: Likewise.
* sysdeps/unix/sysv/linux/alpha/librt.abilist: Likewise.
* sysdeps/unix/sysv/linux/alpha/libthread_db.abilist: Likewise.
* sysdeps/unix/sysv/linux/alpha/libutil.abilist: Likewise.
* sysdeps/unix/sysv/linux/arm/ld.abilist: Likewise.
* sysdeps/unix/sysv/linux/arm/libBrokenLocale.abilist: Likewise.
* sysdeps/unix/sysv/linux/arm/libanl.abilist: Likewise.
* sysdeps/unix/sysv/linux/arm/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/arm/libcrypt.abilist: Likewise.
* sysdeps/unix/sysv/linux/arm/libdl.abilist: Likewise.
* sysdeps/unix/sysv/linux/arm/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/arm/libnsl.abilist: Likewise.
* sysdeps/unix/sysv/linux/arm/libpthread.abilist: Likewise.
* sysdeps/unix/sysv/linux/arm/libresolv.abilist: Likewise.
* sysdeps/unix/sysv/linux/arm/librt.abilist: Likewise.
* sysdeps/unix/sysv/linux/arm/libthread_db.abilist: Likewise.
* sysdeps/unix/sysv/linux/arm/libutil.abilist: Likewise.
* sysdeps/unix/sysv/linux/hppa/ld.abilist: Likewise.
* sysdeps/unix/sysv/linux/hppa/libBrokenLocale.abilist: Likewise.
* sysdeps/unix/sysv/linux/hppa/libanl.abilist: Likewise.
* sysdeps/unix/sysv/linux/hppa/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/hppa/libcrypt.abilist: Likewise.
* sysdeps/unix/sysv/linux/hppa/libdl.abilist: Likewise.
* sysdeps/unix/sysv/linux/hppa/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/hppa/libnsl.abilist: Likewise.
* sysdeps/unix/sysv/linux/hppa/libpthread.abilist: Likewise.
* sysdeps/unix/sysv/linux/hppa/libresolv.abilist: Likewise.
* sysdeps/unix/sysv/linux/hppa/librt.abilist: Likewise.
* sysdeps/unix/sysv/linux/hppa/libthread_db.abilist: Likewise.
* sysdeps/unix/sysv/linux/hppa/libutil.abilist: Likewise.
* sysdeps/unix/sysv/linux/i386/ld.abilist: Likewise.
* sysdeps/unix/sysv/linux/i386/libBrokenLocale.abilist: Likewise.
* sysdeps/unix/sysv/linux/i386/libanl.abilist: Likewise.
* sysdeps/unix/sysv/linux/i386/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/i386/libcrypt.abilist: Likewise.
* sysdeps/unix/sysv/linux/i386/libdl.abilist: Likewise.
* sysdeps/unix/sysv/linux/i386/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/i386/libnsl.abilist: Likewise.
* sysdeps/unix/sysv/linux/i386/libpthread.abilist: Likewise.
* sysdeps/unix/sysv/linux/i386/libresolv.abilist: Likewise.
* sysdeps/unix/sysv/linux/i386/librt.abilist: Likewise.
* sysdeps/unix/sysv/linux/i386/libthread_db.abilist: Likewise.
* sysdeps/unix/sysv/linux/i386/libutil.abilist: Likewise.
* sysdeps/unix/sysv/linux/ia64/ld.abilist: Likewise.
* sysdeps/unix/sysv/linux/ia64/libBrokenLocale.abilist: Likewise.
* sysdeps/unix/sysv/linux/ia64/libanl.abilist: Likewise.
* sysdeps/unix/sysv/linux/ia64/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/ia64/libcrypt.abilist: Likewise.
* sysdeps/unix/sysv/linux/ia64/libdl.abilist: Likewise.
* sysdeps/unix/sysv/linux/ia64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/ia64/libnsl.abilist: Likewise.
* sysdeps/unix/sysv/linux/ia64/libpthread.abilist: Likewise.
* sysdeps/unix/sysv/linux/ia64/libresolv.abilist: Likewise.
* sysdeps/unix/sysv/linux/ia64/librt.abilist: Likewise.
* sysdeps/unix/sysv/linux/ia64/libthread_db.abilist: Likewise.
* sysdeps/unix/sysv/linux/ia64/libutil.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/coldfire/ld.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/coldfire/libBrokenLocale.abilist:
Likewise.
* sysdeps/unix/sysv/linux/m68k/coldfire/libanl.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/coldfire/libcrypt.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/coldfire/libdl.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/coldfire/libnsl.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/coldfire/libresolv.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/coldfire/librt.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/coldfire/libthread_db.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/coldfire/libutil.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/m680x0/ld.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/m680x0/libBrokenLocale.abilist:
Likewise.
* sysdeps/unix/sysv/linux/m68k/m680x0/libanl.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/m680x0/libcrypt.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/m680x0/libdl.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/m680x0/libnsl.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/m680x0/libresolv.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/m680x0/librt.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/m680x0/libthread_db.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/m680x0/libutil.abilist: Likewise.
* sysdeps/unix/sysv/linux/microblaze/ld.abilist: Likewise.
* sysdeps/unix/sysv/linux/microblaze/libBrokenLocale.abilist: Likewise.
* sysdeps/unix/sysv/linux/microblaze/libanl.abilist: Likewise.
* sysdeps/unix/sysv/linux/microblaze/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/microblaze/libcrypt.abilist: Likewise.
* sysdeps/unix/sysv/linux/microblaze/libdl.abilist: Likewise.
* sysdeps/unix/sysv/linux/microblaze/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/microblaze/libnsl.abilist: Likewise.
* sysdeps/unix/sysv/linux/microblaze/libpthread.abilist: Likewise.
* sysdeps/unix/sysv/linux/microblaze/libresolv.abilist: Likewise.
* sysdeps/unix/sysv/linux/microblaze/librt.abilist: Likewise.
* sysdeps/unix/sysv/linux/microblaze/libthread_db.abilist: Likewise.
* sysdeps/unix/sysv/linux/microblaze/libutil.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/ld.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/libBrokenLocale.abilist:
Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/libanl.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/libcidn.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/libcrypt.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/libdl.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/libnsl.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/libnss_compat.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/libnss_db.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/libnss_dns.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/libnss_files.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/libnss_hesiod.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/libnss_nis.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/libnss_nisplus.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/libresolv.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/librt.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/libthread_db.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/libutil.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/libBrokenLocale.abilist:
Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/libanl.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/libcrypt.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/libdl.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/libnsl.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/librt.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/libthread_db.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/libutil.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/n32/ld.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/n32/libresolv.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/n64/ld.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/n64/libresolv.abilist: Likewise.
* sysdeps/unix/sysv/linux/nios2/ld.abilist: Likewise.
* sysdeps/unix/sysv/linux/nios2/libBrokenLocale.abilist: Likewise.
* sysdeps/unix/sysv/linux/nios2/libanl.abilist: Likewise.
* sysdeps/unix/sysv/linux/nios2/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/nios2/libcrypt.abilist: Likewise.
* sysdeps/unix/sysv/linux/nios2/libdl.abilist: Likewise.
* sysdeps/unix/sysv/linux/nios2/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/nios2/libnsl.abilist: Likewise.
* sysdeps/unix/sysv/linux/nios2/libpthread.abilist: Likewise.
* sysdeps/unix/sysv/linux/nios2/libresolv.abilist: Likewise.
* sysdeps/unix/sysv/linux/nios2/librt.abilist: Likewise.
* sysdeps/unix/sysv/linux/nios2/libthread_db.abilist: Likewise.
* sysdeps/unix/sysv/linux/nios2/libutil.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/ld.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/libBrokenLocale.abilist:
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/libanl.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/libcrypt.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/libdl.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/libnsl.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist:
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/libresolv.abilist:
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/librt.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/libthread_db.abilist:
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/libutil.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist:
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist:
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/ld-le.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/ld.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libBrokenLocale-le.abilist:
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libBrokenLocale.abilist:
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libanl-le.abilist:
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libanl.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libcrypt-le.abilist:
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libcrypt.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libdl-le.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libdl.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libnsl-le.abilist:
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libnsl.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libpthread-le.abilist:
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libpthread.abilist:
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libresolv-le.abilist:
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libresolv.abilist:
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/librt-le.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/librt.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libthread_db-le.abilist:
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libthread_db.abilist:
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libutil-le.abilist:
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libutil.abilist: Likewise.
* sysdeps/unix/sysv/linux/riscv/rv64/ld.abilist: Likewise.
* sysdeps/unix/sysv/linux/riscv/rv64/libBrokenLocale.abilist:
Likewise.
* sysdeps/unix/sysv/linux/riscv/rv64/libanl.abilist: Likewise.
* sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/riscv/rv64/libcrypt.abilist: Likewise.
* sysdeps/unix/sysv/linux/riscv/rv64/libdl.abilist: Likewise.
* sysdeps/unix/sysv/linux/riscv/rv64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/riscv/rv64/libnsl.abilist: Likewise.
* sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist: Likewise.
* sysdeps/unix/sysv/linux/riscv/rv64/libresolv.abilist: Likewise.
* sysdeps/unix/sysv/linux/riscv/rv64/librt.abilist: Likewise.
* sysdeps/unix/sysv/linux/riscv/rv64/libthread_db.abilist: Likewise.
* sysdeps/unix/sysv/linux/riscv/rv64/libutil.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/libanl.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/ld.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/libBrokenLocale.abilist:
Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/libcrypt.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/libdl.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/libnsl.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/libresolv.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/librt.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/libthread_db.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/libutil.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/ld.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/libBrokenLocale.abilist:
Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/libcrypt.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/libdl.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/libnsl.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/libresolv.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/librt.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/libthread_db.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/libutil.abilist: Likewise.
* sysdeps/unix/sysv/linux/sh/ld.abilist: Likewise.
* sysdeps/unix/sysv/linux/sh/libBrokenLocale.abilist: Likewise.
* sysdeps/unix/sysv/linux/sh/libanl.abilist: Likewise.
* sysdeps/unix/sysv/linux/sh/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/sh/libcrypt.abilist: Likewise.
* sysdeps/unix/sysv/linux/sh/libdl.abilist: Likewise.
* sysdeps/unix/sysv/linux/sh/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/sh/libnsl.abilist: Likewise.
* sysdeps/unix/sysv/linux/sh/libpthread.abilist: Likewise.
* sysdeps/unix/sysv/linux/sh/libresolv.abilist: Likewise.
* sysdeps/unix/sysv/linux/sh/librt.abilist: Likewise.
* sysdeps/unix/sysv/linux/sh/libthread_db.abilist: Likewise.
* sysdeps/unix/sysv/linux/sh/libutil.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/ld.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/libBrokenLocale.abilist:
Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/libanl.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/libcrypt.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/libdl.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/libnsl.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/libresolv.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/librt.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/libthread_db.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/libutil.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/ld.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/libBrokenLocale.abilist:
Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/libanl.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/libcrypt.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/libdl.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/libnsl.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/libresolv.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/librt.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/libthread_db.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/libutil.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/64/ld.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/64/libBrokenLocale.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/64/libanl.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/64/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/64/libcrypt.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/64/libdl.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/64/libnsl.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/64/libresolv.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/64/librt.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/64/libthread_db.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/64/libutil.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/libmvec.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/x32/ld.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/x32/libBrokenLocale.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/x32/libanl.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/x32/libcrypt.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/x32/libdl.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/x32/libnsl.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/x32/libresolv.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/x32/librt.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/x32/libthread_db.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/x32/libutil.abilist: Likewise.

6 years agoFix blocking pthread_join. [BZ #23137]
Stefan Liebler [Fri, 4 May 2018 08:00:59 +0000 (10:00 +0200)]
Fix blocking pthread_join. [BZ #23137]

On s390 (31bit) if glibc is build with -Os, pthread_join sometimes
blocks indefinitely. This is e.g. observable with
testcase intl/tst-gettext6.

pthread_join is calling lll_wait_tid(tid), which performs the futex-wait
syscall in a loop as long as tid != 0 (thread is alive).

On s390 (and build with -Os), tid is loaded from memory before
comparing against zero and then the tid is loaded a second time
in order to pass it to the futex-wait-syscall.
If the thread exits in between, then the futex-wait-syscall is
called with the value zero and it waits until a futex-wake occurs.
As the thread is already exited, there won't be a futex-wake.

In lll_wait_tid, the tid is stored to the local variable __tid,
which is then used as argument for the futex-wait-syscall.
But unfortunately the compiler is allowed to reload the value
from memory.

With this patch, the tid is loaded with atomic_load_acquire.
Then the compiler is not allowed to reload the value for __tid from memory.

ChangeLog:

[BZ #23137]
* sysdeps/nptl/lowlevellock.h (lll_wait_tid):
Use atomic_load_acquire to load __tid.

6 years agox86-64/swapcontext: Restore the pointer into %rdx after syscall
H.J. Lu [Thu, 26 Apr 2018 12:01:20 +0000 (05:01 -0700)]
x86-64/swapcontext: Restore the pointer into %rdx after syscall

To prepare for shadow stack support, restore the pointer into %rdx after
syscall and use %rdx, instead of %rsi, to restore context.  There is no
functional change.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* sysdeps/unix/sysv/linux/x86_64/swapcontext.S (__swapcontext):
Restore the pointer into %rdx, after syscall and use %rdx,
instead of %rsi, to restore context.

6 years agocl
H.J. Lu [Wed, 2 May 2018 13:26:04 +0000 (06:26 -0700)]
cl

6 years agox86-64/setcontext: Pop the pointer into %rdx after syscall
H.J. Lu [Wed, 2 May 2018 13:21:09 +0000 (06:21 -0700)]
x86-64/setcontext: Pop the pointer into %rdx after syscall

To prepare for shadow stack support, pop the pointer into %rdx after
syscall and use %rdx, instead of %rsi, to restore context.  There is
no functional change.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* sysdeps/unix/sysv/linux/x86_64/setcontext.S (__setcontext):
Pop the pointer into %rdx after syscall and use %rdx, instead
of %rsi, to restore context.

6 years agox86: Use pad in pthread_unwind_buf to preserve shadow stack register
H.J. Lu [Wed, 2 May 2018 13:17:20 +0000 (06:17 -0700)]
x86: Use pad in pthread_unwind_buf to preserve shadow stack register

The pad array in struct pthread_unwind_buf is used by setjmp to save
shadow stack register.  We assert that size of struct pthread_unwind_buf
is no less than offset of shadow stack pointer + shadow stack pointer
size.

Since functions, like LIBC_START_MAIN, START_THREAD_DEFN as well as
these with thread cancellation, call setjmp, but never return after
__libc_unwind_longjmp, __libc_unwind_longjmp, which is defined as
__libc_longjmp on x86, doesn't need to restore shadow stack register.
__libc_longjmp, which is a private interface for thread cancellation
implementation in libpthread, is changed to call __longjmp_cancel,
instead of __longjmp.  __longjmp_cancel is a new internal function
in libc, which is similar to __longjmp, but doesn't restore shadow
stack register.

The compatibility longjmp and siglongjmp in libpthread.so are changed
to call __libc_siglongjmp, instead of __libc_longjmp, so that they will
restore shadow stack register.

Tested with build-many-glibcs.py.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* nptl/pthread_create.c (START_THREAD_DEFN): Clear previous
handlers after setjmp.
* setjmp/longjmp.c (__libc_longjmp): Don't define alias if
defined.
* sysdeps/unix/sysv/linux/x86/setjmpP.h: Include
<libc-pointer-arith.h>.
(_JUMP_BUF_SIGSET_BITS_PER_WORD): New.
(_JUMP_BUF_SIGSET_NSIG): Changed to 96.
(_JUMP_BUF_SIGSET_NWORDS): Changed to use ALIGN_UP and
_JUMP_BUF_SIGSET_BITS_PER_WORD.
* sysdeps/x86/Makefile (sysdep_routines): Add __longjmp_cancel.
* sysdeps/x86/__longjmp_cancel.S: New file.
* sysdeps/x86/longjmp.c: Likewise.
* sysdeps/x86/nptl/pt-longjmp.c: Likewise.

6 years agoFix ChangeLog from cf2478d53ad commit
Adhemerval Zanella [Wed, 2 May 2018 12:06:34 +0000 (09:06 -0300)]
Fix ChangeLog from cf2478d53ad commit

6 years agoDeprecate ustat syscall interface
Adhemerval Zanella [Sun, 18 Mar 2018 03:28:59 +0000 (11:28 +0800)]
Deprecate ustat syscall interface

As for sysctl, ustat has been deprecated in favor of {f}statfs.  Also
some newer ports which uses generic interface builds a stub version that
returns ENOSYS.

This patch deprecates ustat interface by removing ustat.h related headers,
adding a compatibility symbol, and avoiding new ports to build and provide
the symbol.

Checked on x86_64-linux-gnu and i686-linux-gnu.  Also checked with a
check-abi on all affected ABIs.

* NEWS: Add ustat.h deprecation entry.
* bits/ustat.h: Remove file.
* misc/sys/ustat.h: Likewise.
* misc/ustat.h: Likewise.
* sysdeps/unix/sysv/linux/generic/ustat.c: Likewise.
* misc/Makefile (headers): Remove ustat.h and sys/ustat.h.
* misc/ustat.c (__ustat): Rename to __old_ustat and export only in
compatibility mode.
* sysdeps/unix/sysv/linux/ustat.c (__ustat): Likewise.
* sysdeps/unix/sysv/linux/mips/ustat.c: Define DEV_TO_KDEV and use
generic Linux implementation.

6 years agoReplace hidden_def with libm_hidden_def in math
Tulio Magno Quites Machado Filho [Mon, 30 Apr 2018 14:45:42 +0000 (11:45 -0300)]
Replace hidden_def with libm_hidden_def in math

libm_hidden_def expand the parameters and do not require an extra layer
of macros.
These were the last 3 files in math/ still using hidden_def().

* math/w_exp_compat.c: Replace hidden_def with libm_hidden_def..
* math/w_expl_compat.c: Likewise.
* math/w_exp_template.c: Likewise.  Remove hidden_def_x.

Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
6 years agomanual/startup.texi (Aborting a Program): Remove inappropriate joke.
Raymond Nicholson [Mon, 30 Apr 2018 14:41:44 +0000 (10:41 -0400)]
manual/startup.texi (Aborting a Program): Remove inappropriate joke.

6 years agoConsolidate Linux readahead implementation
Adhemerval Zanella [Sun, 22 Apr 2018 20:55:11 +0000 (17:55 -0300)]
Consolidate Linux readahead implementation

This patch consolidate Linux readahead implementation on generic
sysdeps/unix/sysv/linux/readahead.c one.  The changes are:

  - Assume __NR_readahead existence with current minimum kernel of 3.2
    for all architectures.

  - Use INLINE_SYSCALL_CALL, __ALIGNMENT_ARG, and SYSCALL_LL64 to pass
    the 64 bit offset.  This allows architectures with different abis
    to use the same implementation.

  - Remove arch-specific readahead implementations.

Checked on x86_64-linux-gnu and i686-linux-gnu.

* sysdeps/unix/sysv/linux/arm/readahead.c: Remove file.
* sysdeps/unix/sysv/linux/mips/mips32/readahead.c: Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list (readahead):
Remove.
* sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/wordsize-64/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/readahead.c (__readahead): Assume
__NR_readahead existence, and use INLINE_SYSCALL_CALL, __ALIGNMENT_ARG,
and SYSCALL_LL64.

6 years agoReplace M_SUF (M_LN2) with M_MLIT (M_LN2)
Tulio Magno Quites Machado Filho [Fri, 27 Apr 2018 12:56:48 +0000 (09:56 -0300)]
Replace M_SUF (M_LN2) with M_MLIT (M_LN2)

According to math-type-macros.h, M_SUF should be used to paste the
suffix used by functions, while M_MLIT is used with macro constants.

* math/e_exp2_template.c: Replace M_SUF (M_LN2) with M_MLIT (M_LN2).

Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
6 years agoReplace M_SUF (fabs) with M_FABS
Tulio Magno Quites Machado Filho [Fri, 27 Apr 2018 12:56:35 +0000 (09:56 -0300)]
Replace M_SUF (fabs) with M_FABS

math-type-macros.h provides the macro M_FABS in order to reference
the correct fabs function for a specific type.
In most of the cases, M_FABS is identical to M_SUF (fabs), but that
may change in the future.

* math/w_acos_template.c: Replace M_SUF (fabs) with M_FABS.
* math/w_asin_template.c: Likewise.
* math/w_atanh_template.c: Likewise.

Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
6 years agopowerpc64*: fix the order of implied sysdeps directories
Gabriel F. T. Gomes [Fri, 9 Mar 2018 19:59:14 +0000 (16:59 -0300)]
powerpc64*: fix the order of implied sysdeps directories

The creation of the divergent sysdeps directory for powerpc64le

commit 2f7f3cd8cd302bb10908c86f3f7b349df0a78e6a
Author: Paul E. Murphy <murphyp@linux.vnet.ibm.com>
Date:   Fri Jul 15 18:04:40 2016 -0500

    powerpc64le: Create divergent sysdep directory for powerpc64le.

allowed float128 to be enabled for powerpc64le (little-endian) and not
for powerpc64 (big-endian).  Since the only intended difference between
them was the presence or absence of the float128 interface, the sysdeps
directory for powerpc64le explicitly reused the files from powerpc64
(through the use of Implies files).

Although this works, it also means that files under the powerpc64
directory might be preferred over files under powerpc64le.  For
instance, on a build for powerpc64le with target set to power9, a file
from powerpc64/power5 might get built, even though a file with the same
name exists in powerpc64le/power8.  That happens because the processor
hierarchy was only defined in the sysdeps directory for powerpc64 (and
borrowed by powerpc64le).

This patch fixes this behavior, by creating new subdirectories under
powerpc64 (i.e.: powerpc64/be and powerpc64/le) and creating new Implies
files to provide the hierarchy of processors for powerpc64 and
powerpc64le separately.  These changes have no effect on installed,
stripped binaries (which remain unchanged).

Tested that installed stripped binaries are unchanged and that there are
no regressions on powerpc64 and powerpc64le.

6 years agoRemove tilegx port.
Joseph Myers [Fri, 27 Apr 2018 19:11:24 +0000 (19:11 +0000)]
Remove tilegx port.

Since tile support has been removed from the Linux kernel for 4.17,
this patch removes the (unmaintained) port to tilegx from glibc (the
tilepro support having been previously removed).  This reflects the
general principle that a glibc port needs upstream support for the
architecture in all the components it build-depends on (so binutils,
GCC and the Linux kernel, for the normal case of a port supporting the
Linux kernel but no other OS), in order to be maintainable.

Apart from removal of sysdeps/tile and sysdeps/unix/sysv/linux/tile,
there are updates to various comments referencing tile for which
removal of those references seemed appropriate.  The configuration is
removed from README and from build-many-glibcs.py.  contrib.texi keeps
mention of removed contributions, but I updated Chris Metcalf's entry
to reflect that he also contributed the non-removed support for the
generic Linux kernel syscall interface.
__ASSUME_FADVISE64_64_NO_ALIGN support is removed, as it was only used
by tile.

* sysdeps/tile: Remove.
* sysdeps/unix/sysv/linux/tile: Likewise.
* README (tilegx-*-linux-gnu): Remove from list of supported
configurations.
* manual/contrib.texi (Contributors): Mention Chris Metcalf's
contribution of support for generic Linux kernel syscall
interface.
* scripts/build-many-glibcs.py (Context.add_all_configs): Remove
tilegx configurations.
(Config.install_linux_headers): Do not handle tile.
* sysdeps/unix/sysv/linux/aarch64/ldsodefs.h: Do not mention Tile
in comment.
* sysdeps/unix/sysv/linux/nios2/Makefile: Likewise.
* sysdeps/unix/sysv/linux/posix_fadvise.c: Likewise.
[__ASSUME_FADVISE64_64_NO_ALIGN] (__ALIGNMENT_ARG): Remove
conditional undefine and redefine.
* sysdeps/unix/sysv/linux/posix_fadvise64.c: Do not mention Tile
in comment.
[__ASSUME_FADVISE64_64_NO_ALIGN] (__ALIGNMENT_ARG): Remove
conditional undefine and redefine.

6 years agoAdd tst-sigaction.c to test BZ #23069
Aurelien Jarno [Thu, 26 Apr 2018 20:21:13 +0000 (22:21 +0200)]
Add tst-sigaction.c to test BZ #23069

This simple test uses sigaction to define a signal handler. It then
uses sigaction again to fetch the information about the same signal
handler, and check that they are consistent. This is enough to detect
mismatches between struct kernel_sigaction and the kernel version of
struct sigaction, like in BZ #23069.

Changelog:
       * signal/tst-sigaction.c: New file to test BZ #23069.
       * signal/Makefile (tests): Fix indentation. Add tst-sigaction.

6 years agoIncrease robustness of internal dlopen() by using RTLD_NOW [BZ #22766]
Tulio Magno Quites Machado Filho [Thu, 26 Apr 2018 13:41:43 +0000 (10:41 -0300)]
Increase robustness of internal dlopen() by using RTLD_NOW [BZ #22766]

Prevent random runtime crashes due to missing symbols caused by mixed
libnss_* versions.

[BZ #22766]
* include/dlfcn.h [__libc_dl_open]: Replace RTLD_LAZY with RTLD_NOW.
* sysdeps/gnu/unwind-resume.c (__lib_gcc_s_init): Replace
__libc_dlopen_mode() using RTLD_NOW with __libc_dlopen.
* sysdeps/nptl/unwind-forcedunwind.c: Likewise.

Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
6 years agoConsolidate getdirentries{64} implementation
Adhemerval Zanella [Thu, 1 Mar 2018 21:22:16 +0000 (18:22 -0300)]
Consolidate getdirentries{64} implementation

This patch consolidates Linux getdirentries{64} implementation on just
the default sysdeps/unix/sysv/linux/getdirentries{64} ones.  The default
implementation handles the Linux requirements:

  * getdirentries is only built for _DIRENT_MATCHES_DIRENT64 being 0.

  * getdirentries64 is always built and aliased to getdents for ABIs
    that define _DIRENT_MATCHES_DIRENT64 to 1.

Checked on aarch64-linux-gnu, x86_64-linux-gnu, i686-linux-gnu,
sparcv9-linux-gnu, sparc64-linux-gnu, powerpc-linux-gnu, and
powerpc64le-linux-gnu.

* sysdeps/unix/sysv/linux/getdirentries.c (getdirentries): Build iff
_DIRENT_MATCHES_DIRENT64 is not defined.
* sysdeps/unix/sysv/linux/getdirentries64.c (getdirentries64): Open
implementation and alias to getdirentries if _DIRENT_MATCHES_DIRENT64
is defined.
* sysdeps/unix/sysv/linux/wordsize-64/getdirentries.c: Remove file.
* sysdeps/unix/sysv/linux/wordsize-64/getdirentries64.c: Remove file.

6 years agoUse GCC 8 in build-many-glibcs.py by default.
Joseph Myers [Wed, 25 Apr 2018 15:05:01 +0000 (15:05 +0000)]
Use GCC 8 in build-many-glibcs.py by default.

Now that GCC 8 has branched, this patch makes build-many-glibcs.py
default to using GCC 8 branch instead of GCC 7.  The effect should be
that all builds complete cleanly and the compilation parts of the
glibc testsuite complete cleanly except for on i686-gnu (with GCC 7
there were testsuite failures for some other configurations as well).

I've replaced my bot building using GCC 6 branch with one using GCC 8
branch.  (Of course glibc should continue building with GCC 6 - and
for that matter GCC 5 and 4.9, which are no longer maintained, are
supported versions as well - but building with GCC 6 will no longer be
included in my bot testing.)

* scripts/build-many-glibcs.py (Context.checkout): Default GCC
version to GCC 8 branch.

6 years agoFix Hurd glibc build with GCC 8.
Joseph Myers [Tue, 24 Apr 2018 16:33:47 +0000 (16:33 +0000)]
Fix Hurd glibc build with GCC 8.

The build of glibc for Hurd has been failing with GCC mainline because
of the checks that aliases have the same type as the symbol aliased;
the Hurd dl-sysdep.c has a macro that defines aliases without using
the proper type.  When GCC 8 branches (soon), I intend to make it the
default version in build-many-glibcs.py, so these failures would mean
the default build-many-glibcs.py build fails for Hurd again.

This patch fixes the Hurd build with GCC 8 by changing the macro that
defines the problem aliases to use the correct type for them.  An
include of <not-errno.h> is needed to avoid this use of typeof
resulting in an error for __access_noerrno not being declared.

Tested compilation for i686-gnu with build-many-glibcs.py.

* sysdeps/mach/hurd/dl-sysdep.c: Include <not-errno.h>.
(check_no_hidden): Use type of original function when declaring
alias.

6 years agoFix tst-strfmon_l test for hr_HR locale
Mike FABIAN [Tue, 24 Apr 2018 13:04:43 +0000 (15:04 +0200)]
Fix tst-strfmon_l test for hr_HR locale

The test needs to be adapted for the change in the thousands separators:

“hr_HR locale: fix thousands_sep and mon_thousands_sep” [BZ #23094]

6 years agoAdd PTRACE_SECCOMP_GET_METADATA from Linux 4.16 to sys/ptrace.h.
Joseph Myers [Tue, 24 Apr 2018 12:11:35 +0000 (12:11 +0000)]
Add PTRACE_SECCOMP_GET_METADATA from Linux 4.16 to sys/ptrace.h.

This patch adds the PTRACE_SECCOMP_GET_METADATA constant from Linux
4.16 to all relevant sys/ptrace.h files.  A type struct
__ptrace_seccomp_metadata, analogous to other such types, is also
added.

Tested for x86_64, and with build-many-glibcs.py.

* sysdeps/unix/sysv/linux/sys/ptrace.h
(PTRACE_SECCOMP_GET_METADATA): New enum value and macro.
* sysdeps/unix/sysv/linux/bits/ptrace-shared.h
(struct __ptrace_seccomp_metadata): New type.
* sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h
(PTRACE_SECCOMP_GET_METADATA): Likewise.
* sysdeps/unix/sysv/linux/arm/sys/ptrace.h
(PTRACE_SECCOMP_GET_METADATA): Likewise.
* sysdeps/unix/sysv/linux/ia64/sys/ptrace.h
(PTRACE_SECCOMP_GET_METADATA): Likewise.
* sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h
(PTRACE_SECCOMP_GET_METADATA): Likewise.
* sysdeps/unix/sysv/linux/s390/sys/ptrace.h
(PTRACE_SECCOMP_GET_METADATA): Likewise.
* sysdeps/unix/sysv/linux/sparc/sys/ptrace.h
(PTRACE_SECCOMP_GET_METADATA): Likewise.
* sysdeps/unix/sysv/linux/tile/sys/ptrace.h
(PTRACE_SECCOMP_GET_METADATA): Likewise.
* sysdeps/unix/sysv/linux/x86/sys/ptrace.h
(PTRACE_SECCOMP_GET_METADATA): Likewise.

6 years agoConsolidate alphasort{64} and versionsort{64} implementation
Adhemerval Zanella [Thu, 1 Mar 2018 20:09:42 +0000 (17:09 -0300)]
Consolidate alphasort{64} and versionsort{64} implementation

This patch consolidates both alphasort{64} and versionsort{64}
implementation on just the default dirent/alphasort{64}c and
dirent/versionsort{64} respectively.  It changes the logic
to follow the conventions used on other code consolidation:

  * the non-LFS variant is only built for _DIRENT_MATCHES_DIRENT64 being 0.

  * the LFS variant is always built and aliased to getdents for ABIs
    that define _DIRENT_MATCHES_DIRENT64 to 1.

Also on Linux the compat symbol for old non-LFS dirent64 definition
requires a platform-specific scandir64.c.  For powerpc32 and sparcv9
it requires to add specific arch-implementation to override the
generic Linux one because neither ABI exports an compat symbol for
non-LFS alphasort64 and versionsort64 variant.  It is most likely a
bug and it is also not one that can be fixed (in that there would be
existing binaries expecting both meanings of that symbol at its single
existing version, with binaries expecting the new meaning probably much
more common than those expecting the original meaning of that symbol at
that version).

Checked on aarch64-linux-gnu, x86_64-linux-gnu, i686-linux-gnu,
sparcv9-linux-gnu, sparc64-linux-gnu, powerpc-linux-gnu, and
powerpc64le-linux-gnu.

* dirent/alphasort.c (alphasort): Build iff _DIRENT_MATCHES_DIRENT64 is
defined.
* dirent/versionsort.c (versionsort): Likewise.
* dirent/alphasort64.c (alphasort64): Build regardless and alias to
alphasort if _DIRENT_MATCHES_DIRENT64 is defined.
* dirent/versionsort64.c (versionsort64): Likewise.
* sysdeps/unix/sysv/linux/i386/alphasort64.c: Remove file.
* sysdeps/unix/sysv/linux/arm/alphasort64.c: Likewise.
* sysdeps/unix/sysv/linux/arm/versionsort64.c: Likewise.
* sysdeps/unix/sysv/linux/m68k/alphasort64.c: Likewise.
* sysdeps/unix/sysv/linux/m68k/versionsort64.c: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/alphasort64.c: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/versionsort64.c: Likewise.
* sysdeps/unix/sysv/linux/i386/versionsort64.c: Likewise.
* sysdeps/unix/sysv/linux/alphasort64.c: New file.
* sysdeps/unix/sysv/linux/versionsort64.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/alphasort64.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/versionsort64.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/alphasort64.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/versionsort64.c: Likewise.

6 years agoAdd NT_PPC_PKEY from Linux 4.16 to elf.h.
Joseph Myers [Mon, 23 Apr 2018 19:41:09 +0000 (19:41 +0000)]
Add NT_PPC_PKEY from Linux 4.16 to elf.h.

This patch adds the NT_PPC_PKEY macro from Linux 4.16 to elf.h.

Tested for x86_64.

* elf/elf.h (NT_PPC_PKEY): New macro.

6 years agoNEWS: Reindent and copyedit
Zack Weinberg [Mon, 23 Apr 2018 15:25:19 +0000 (11:25 -0400)]
NEWS: Reindent and copyedit

Make the indentation of the "Deprecated and removed features" section
for 2.28 consistent with the indentation of the "Major new features"
section above.  Also, consistently refer to "stdio functions" instead
of "stdio.h functions".

6 years agohr_HR locale: fix thousands_sep and mon_thousands_sep
Dragan Stanojevic - Nevidljivi [Mon, 23 Apr 2018 14:54:31 +0000 (16:54 +0200)]
hr_HR locale: fix thousands_sep and mon_thousands_sep

[BZ #23094]
* localedata/locales/hr_HR: fix thousands_sep and
mon_thousands_sep

6 years agoDefine XTABS to TAB3 on alpha to match Linux 4.16.
Joseph Myers [Fri, 20 Apr 2018 19:52:02 +0000 (19:52 +0000)]
Define XTABS to TAB3 on alpha to match Linux 4.16.

This patch makes the alpha bits/termios.h define XTABS to TAB3, so
matching a change made in Linux 4.16 as well as matching other
architectures where the values are already equal.

Tested with build-many-glibcs.py for alpha-linux-gnu.

* sysdeps/unix/sysv/linux/alpha/bits/termios.h [__USE_MISC]
(XTABS): Define to TAB3.

6 years agoUpdate hppa libm-test-ulps
Adhemerval Zanella [Fri, 20 Apr 2018 18:36:41 +0000 (15:36 -0300)]
Update hppa libm-test-ulps

* sysdeps/hppa/fpu/libm-test-ulps: Update.

6 years agoConsolidate scandir{at}{64} implementation
Adhemerval Zanella [Thu, 1 Mar 2018 12:04:41 +0000 (09:04 -0300)]
Consolidate scandir{at}{64} implementation

This patch consolidates scandir{at}{64} implementation on just
the default dirent/scandir{at}{64}{_r}.c ones.  It changes the logic
to follow the conventions used on other code consolidation:

  * scandir{at} is only built for _DIRENT_MATCHES_DIRENT64 being 0.

  * scandir{at}{64} is always built and aliased to getdents for ABIs
    that define _DIRENT_MATCHES_DIRENT64 to 1.

Also on Linux the compat symbol for old non-LFS dirent64 definition
requires a platform-specific scandir64.c.

Checked on aarch64-linux-gnu, x86_64-linux-gnu, i686-linux-gnu,
sparcv9-linux-gnu, sparc64-linux-gnu, powerpc-linux-gnu, and
powerpc64le-linux-gnu.

* dirent/scandir-tail-common.c: New file.
* dirent/scandir-tail.c: Use scandir-tail-common.c.
(__scandir_tail): Build iff _DIRENT_MATCHES_DIRENT64 is not defined.
* dirent/scandir.c: Use scandir-tail-common.c.
* dirent/scandirat.c: Likewise.
* dirent/scandir64-tail.c: Use scandir-tail-common.c.
* dirent/scandir64.c (scandir64): Always build and alias to scandir
if _DIRENT_MATCHES_DIRENT64 is defined.
* dirent/scandirat64.c (scandirat64): Likewise.
* include/dirent.h (__scandir_tail): Only define iff
_DIRENT_MATCHES_DIRENT64 is not defined.
(__scandir64_tail): Define regardless.
(__scandirat, scandirat64): Remove libc_hidden_proto.
* sysdeps/unix/sysv/linux/arm/scandir64.c: Remove file.
* sysdeps/unix/sysv/linux/m68k/scandir64.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/scandir64.c: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/scandir64.c: Likewise.
* sysdeps/unix/sysv/linux/i386/scandir64.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/scandir64.c: Likewise.
* sysdeps/unix/sysv/linux/scandir64.c: New file.

6 years agoUpdate aarch64 bits/hwcap.h, dl-procinfo.c for Linux 4.16 HWCAP_ASIMDFHM.
Joseph Myers [Fri, 20 Apr 2018 16:36:00 +0000 (16:36 +0000)]
Update aarch64 bits/hwcap.h, dl-procinfo.c for Linux 4.16 HWCAP_ASIMDFHM.

This patch updates the aarch64 bits/hwcap.h and dl-procinfo.c for the
new HWCAP_ASIMDFHM value in Linux 4.16.

Tested with build-many-glibcs.py for aarch64-linux-gnu.

* sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h (HWCAP_ASIMDFHM):
New macro.
* sysdeps/unix/sysv/linux/aarch64/dl-procinfo.c (_DL_HWCAP_COUNT):
Increase to 24.
(_dl_aarch64_cap_flags): Add asimdfhm.

6 years agohurd xfails: Add missing bug references
Samuel Thibault [Fri, 20 Apr 2018 15:14:13 +0000 (17:14 +0200)]
hurd xfails: Add missing bug references

6 years agohurd: XFAIL tests for signal features not implemented yet
Samuel Thibault [Thu, 19 Apr 2018 23:18:22 +0000 (01:18 +0200)]
hurd: XFAIL tests for signal features not implemented yet

* conform/data/signal.h-data (SA_SIGINFO, SA_NOCLDWAIT): XFAIL on
i386-gnu.
* conform/data/sys/wait.h-data (WIFCONTINUED, WEXITED, WSTOPPED,
WCONTINUED, WNOWAIT): XFAIL on i386-gnu.

6 years agohurd: XFAIL appearance of sched_param and sched_priority from <sys/types.h>
Samuel Thibault [Thu, 19 Apr 2018 20:05:13 +0000 (22:05 +0200)]
hurd: XFAIL appearance of sched_param and sched_priority from <sys/types.h>

Reported at BZ #23088.

* sysdeps/mach/hurd/i386/Makefile
(test-xfail-POSIX/fcntl.h/conform): Add.
(test-xfail-POSIX/signal.h/conform): Add.
(test-xfail-POSIX/semaphore.h/conform): Add.
(test-xfail-POSIX/regex.h/conform): Add.
(test-xfail-POSIX/aio.h/conform): Add.
(test-xfail-POSIX/mqueue.h/conform): Add.
(test-xfail-POSIX/sys/types.h/conform): Add.
(test-xfail-UNIX98/fcntl.h/conform): Add.
(test-xfail-UNIX98/netdb.h/conform): Add.
(test-xfail-UNIX98/signal.h/conform): Add.
(test-xfail-UNIX98/semaphore.h/conform): Add.
(test-xfail-UNIX98/regex.h/conform): Add.
(test-xfail-UNIX98/aio.h/conform): Add.
(test-xfail-UNIX98/ftw.h/conform): Add.
(test-xfail-UNIX98/mqueue.h/conform): Add.
(test-xfail-UNIX98/netinet/in.h/conform): Add.
(test-xfail-UNIX98/sys/wait.h/conform): Add.
(test-xfail-UNIX98/sys/sem.h/conform): Add.
(test-xfail-UNIX98/sys/uio.h/conform): Add.
(test-xfail-UNIX98/sys/socket.h/conform): Add.
(test-xfail-UNIX98/sys/types.h/conform): Add.
(test-xfail-UNIX98/stdlib.h/conform): Add.
(test-xfail-UNIX98/arpa/inet.h/conform): Add.
(test-xfail-POSIX2008/fcntl.h/conform): Add.
(test-xfail-POSIX2008/netdb.h/conform): Add.
(test-xfail-POSIX2008/signal.h/conform): Add.
(test-xfail-POSIX2008/semaphore.h/conform): Add.
(test-xfail-POSIX2008/regex.h/conform): Add.
(test-xfail-POSIX2008/aio.h/conform): Add.
(test-xfail-POSIX2008/mqueue.h/conform): Add.
(test-xfail-POSIX2008/netinet/in.h/conform): Add.
(test-xfail-POSIX2008/sys/wait.h/conform): Add.
(test-xfail-POSIX2008/sys/socket.h/conform): Add.
(test-xfail-POSIX2008/sys/types.h/conform): Add.
(test-xfail-POSIX2008/arpa/inet.h/conform): Add.
(test-xfail-XOPEN2K/fcntl.h/conform): Add.
(test-xfail-XOPEN2K/netdb.h/conform): Add.
(test-xfail-XOPEN2K/signal.h/conform): Add.
(test-xfail-XOPEN2K/semaphore.h/conform): Add.
(test-xfail-XOPEN2K/regex.h/conform): Add.
(test-xfail-XOPEN2K/aio.h/conform): Add.
(test-xfail-XOPEN2K/ftw.h/conform): Add.
(test-xfail-XOPEN2K/mqueue.h/conform): Add.
(test-xfail-XOPEN2K/netinet/in.h/conform): Add.
(test-xfail-XOPEN2K/sys/wait.h/conform): Add.
(test-xfail-XOPEN2K/sys/sem.h/conform): Add.
(test-xfail-XOPEN2K/sys/uio.h/conform): Add.
(test-xfail-XOPEN2K/sys/socket.h/conform): Add.
(test-xfail-XOPEN2K/sys/types.h/conform): Add.
(test-xfail-XOPEN2K/stdlib.h/conform): Add.
(test-xfail-XOPEN2K/arpa/inet.h/conform): Add.
(test-xfail-XOPEN2K8/fcntl.h/conform): Add.
(test-xfail-XOPEN2K8/netdb.h/conform): Add.
(test-xfail-XOPEN2K8/signal.h/conform): Add.
(test-xfail-XOPEN2K8/semaphore.h/conform): Add.
(test-xfail-XOPEN2K8/regex.h/conform): Add.
(test-xfail-XOPEN2K8/aio.h/conform): Add.
(test-xfail-XOPEN2K8/ftw.h/conform): Add.
(test-xfail-XOPEN2K8/mqueue.h/conform): Add.
(test-xfail-XOPEN2K8/netinet/in.h/conform): Add.
(test-xfail-XOPEN2K8/sys/wait.h/conform): Add.
(test-xfail-XOPEN2K8/sys/sem.h/conform): Add.
(test-xfail-XOPEN2K8/sys/uio.h/conform): Add.
(test-xfail-XOPEN2K8/sys/socket.h/conform): Add.
(test-xfail-XOPEN2K8/sys/types.h/conform): Add.
(test-xfail-XOPEN2K8/stdlib.h/conform): Add.
(test-xfail-XOPEN2K8/arpa/inet.h/conform): Add.

6 years agoRevert "hurd: Fix mach installed headers test"
Samuel Thibault [Thu, 19 Apr 2018 22:54:18 +0000 (00:54 +0200)]
Revert "hurd: Fix mach installed headers test"

This reverts commit d4379e0216d01fd1395b1f3b37255e3486760135: the proper
headers are actually already getting installed.

6 years agoDrop fpregset unused symbol exposition
Samuel Thibault [Thu, 19 Apr 2018 22:10:55 +0000 (00:10 +0200)]
Drop fpregset unused symbol exposition

* sysdeps/arm/sys/ucontext.h: Remove fpregset struct name, unused and
non-compliant.
* sysdeps/i386/sys/ucontext.h: Likewise.
* sysdeps/m68k/sys/ucontext.h: Likewise.
* sysdeps/mips/sys/ucontext.h: Likewise.
* sysdeps/unix/sysv/linux/hppa/sys/ucontext.h: Likewise.