View Bazaar branches
Get this repository:
git clone https://git.launchpad.net/glibc

Branches

Name Last Modified Last Commit
master 2017-08-17 22:00:51 UTC 6 hours ago
Update nss tests to new skeleton

Author: DJ Delorie
Author Date: 2017-08-17 21:58:25 UTC

Update nss tests to new skeleton

* bug17079.c: Update to new test harness.
* test-digits-dots.c: Likewise.
* test-netdb.c: Likewise.
* tst-field.c: Likewise.
* tst-nss-getpwent.c: Likewise.
* tst-nss-static.c: Likewise.
* tst-nss-test1.c: Likewise.
* tst-nss-test2.c: Likewise.
* tst-nss-test3.c: Likewise.
* tst-nss-test4.c: Likewise.
* tst-nss-test5.c: Likewise.

hjl/pie/static 2017-08-16 18:35:34 UTC 2017-08-16
Add _dl_relocate_static_pie

Author: H.J. Lu
Author Date: 2017-07-17 20:53:52 UTC

Add _dl_relocate_static_pie

hjl/pie/hidden 2017-08-16 18:34:53 UTC 2017-08-16
Add hidden visibility to internal function prototypes

Author: H.J. Lu
Author Date: 2017-08-13 14:37:34 UTC

Add hidden visibility to internal function prototypes

Add hidden visibility to internal function prototypes to allow direct
access to internal functions within libc.a without using GOT when the
compiler defaults to -fPIE.

Size comparison of elf/ldconfig when the compiler defaults to -fPIE:

On x86-64:
        text data bss dec hex
Before: 619646 20132 5488 645266 9d892
After : 619502 20132 5488 645122 9d802
On i686:
        text data bss dec hex
Before: 550333 10748 3060 564141 89bad
After : 546453 10732 3060 560245 88c75

 * include/libc-symbols.h (__hidden_proto_hiddenattr): New for
 the compiler defaulting to -fPIE.
 (hidden_proto): Likewise.
 (hidden_tls_proto): Likewise.
 (__hidden_proto): Likewise.

hjl/fma/2.26 2017-08-16 15:46:05 UTC 2017-08-16
x86-64: Optimize e_expf with FMA [BZ #21912]

Author: H.J. Lu
Author Date: 2017-08-16 15:43:35 UTC

x86-64: Optimize e_expf with FMA [BZ #21912]

FMA optimized e_expf improves performance by more than 50% on Skylake.

 [BZ #21912]
 * sysdeps/x86_64/fpu/multiarch/Makefile (libm-sysdep_routines):
 Add e_expf-fma.
 * sysdeps/x86_64/fpu/multiarch/e_expf-fma.S: New file.
 * sysdeps/x86_64/fpu/multiarch/e_expf.c: Likewise.
 * sysdeps/x86_64/fpu/multiarch/ifunc-fma.h: Likewise.

(cherry picked from commit 24a2e6588d2e0c91b4003878b0625d4a9360e8f3)

hjl/expf/master 2017-08-16 15:31:02 UTC 2017-08-16
x86-64: Optimize e_expf with FMA [BZ #21912]

Author: H.J. Lu
Author Date: 2017-08-15 15:45:34 UTC

x86-64: Optimize e_expf with FMA [BZ #21912]

FMA optimized e_expf improves performance by more than 50% on Skylake.

 [BZ #21912]
 * sysdeps/x86_64/fpu/multiarch/Makefile (libm-sysdep_routines):
 Add and e_expf-fma.
 * sysdeps/x86_64/fpu/multiarch/e_expf-fma.S: New file.
 * sysdeps/x86_64/fpu/multiarch/e_expf.c: Likewise.
 * sysdeps/x86_64/fpu/multiarch/ifunc-fma.h: Likewise.

hjl/cet/property 2017-08-15 12:56:22 UTC 2017-08-15
i386: Add _dl_runtime_resolve_shstk/_dl_runtime_profile_shstk [BZ #21598]

Author: H.J. Lu
Author Date: 2017-06-28 22:16:46 UTC

i386: Add _dl_runtime_resolve_shstk/_dl_runtime_profile_shstk [BZ #21598]

Add SHSTK compatible symbol resolvers to support Shadow Stack in Intel
Control-flow Enforcement Technology (CET) instructions:

https://software.intel.com/sites/default/files/managed/4d/2a/control-flow-enforcement-technology-preview.pdf

Replace _dl_runtime_resolve and _dl_runtime_profile with
_dl_runtime_resolve_shstk and _dl_runtime_profile_shstk, respectively if
SHSTK is enabled.

  [BZ #21598]
  * sysdeps/i386/dl-trampoline.S (_dl_runtime_resolve_shstk): New.
  (_dl_runtime_profile_shstk): Likewise.
  * sysdeps/unix/sysv/linux/i386/dl-cet.c: New file.

fw/tst-gmon 2017-08-15 11:44:56 UTC 2017-08-15
gmon: Add test for basic mcount/gprof functionality

Author: Florian Weimer
Author Date: 2017-08-15 11:44:56 UTC

gmon: Add test for basic mcount/gprof functionality

release/2.25/master 2017-08-15 08:47:08 UTC 2017-08-15
resolv: Reduce EDNS payload size to 1200 bytes [BZ #21361]

Author: Florian Weimer
Author Date: 2017-04-13 11:09:38 UTC

resolv: Reduce EDNS payload size to 1200 bytes [BZ #21361]

This hardens the stub resolver against fragmentation-based attacks.

(cherry picked from commit e14a27723cc3a154d67f3f26e719d08c0ba9ad25)

hjl/pr21864/master 2017-08-13 16:58:33 UTC 2017-08-13
Don't compile non-lib modules as lib modules [BZ #21864]

Author: H.J. Lu
Author Date: 2017-07-30 04:04:09 UTC

Don't compile non-lib modules as lib modules [BZ #21864]

Some programs have more than one source files. These non-lib modules
should not be compiled with -DMODULE_NAME=libc. This patch puts these
non-lib modules in $(others-extras) and adds $(others-extras) to
all-nonlib.

 [BZ #21864]
 * Makerules (all-nonlib): Add $(others-extras).
 * catgets/Makefile (others-extras): New.
 * elf/Makefile (others-extras): Likewise.
 * nss/Makefile (others-extras): Likewise.

release/2.26/master 2017-08-11 13:48:14 UTC 2017-08-11
assert: Suppress pedantic warning caused by statement expression [BZ #21242]

Author: Florian Weimer
Author Date: 2017-08-11 13:48:14 UTC

assert: Suppress pedantic warning caused by statement expression [BZ #21242]

(cherry picked from commit 8b2c63e4e2ad1fd161f80004ed30624f2a37b57b)

hjl/pr21913/master 2017-08-07 20:05:12 UTC 2017-08-07
i386: Add <startup.h> [BZ #21913]

Author: H.J. Lu
Author Date: 2017-07-19 21:32:42 UTC

i386: Add <startup.h> [BZ #21913]

On Linux/i386, there are 3 ways to make a system call:

1. call *%gs:SYSINFO_OFFSET. This requires TLS initialization.
2. call *_dl_sysinfo. This requires relocation of _dl_sysinfo.
3. int $0x80. This is slower than #2 and #3, but works everywhere.

When an object file is compiled with PIC, #1 is prefered since it is
faster than #3 and doesn't require relocation of _dl_sysinfo. For
dynamic executables, ld.so initializes TLS. However, for static
executables, before TLS is initialized by __libc_setup_tls, #3 should
be used for syscalls.

This patch adds <startup.h> which defines _startup_fatal and defaults
it to __libc_fatal. It replaces __libc_fatal with _startup_fatal in
static executables where it is called before __libc_setup_tls is called.
This header file is included in all files containing functions which are
called before __libc_setup_tls is called. On Linux/i386, when PIE is
enabled by default, _startup_fatal is turned into ABORT_INSTRUCTION and
I386_USE_SYSENTER is defined to 0 so that "int $0x80" is used for system
calls before __libc_setup_tls is called.

 [BZ #21913]
 * config.h.in (BUILD_PIE_DEFAULT): New.
 * csu/libc-tls.c: Include <startup.h>.
 * elf/dl-tunables.c: Likewise.
 * sysdeps/unix/sysv/linux/i386/brk.c: Likewise.
 * csu/libc-tls.c: Include <startup.h>.
 (__libc_setup_tls): Call _startup_fatal instead of __libc_fatal.
 * sysdeps/generic/startup.h: New file.
 * sysdeps/unix/sysv/linux/i386/startup.h: Likewise.

hjl/fma/master 2017-08-07 15:20:56 UTC 2017-08-07
x86-64: Add FMA multiarch functions to libm

Author: H.J. Lu
Author Date: 2017-08-07 15:19:59 UTC

x86-64: Add FMA multiarch functions to libm

This patch adds multiarch functions optimized with -mfma -mavx2 to libm.
e_pow-fma.c is compiled with $(config-cflags-nofma) due to PR 19003.

 * sysdeps/x86_64/fpu/multiarch/Makefile (libm-sysdep_routines):
 Add e_exp-fma, e_log-fma, e_pow-fma, s_atan-fma, e_asin-fma,
 e_atan2-fma, s_sin-fma, s_tan-fma, mplog-fma, mpa-fma,
 slowexp-fma, slowpow-fma, sincos32-fma, doasin-fma, dosincos-fma,
 halfulp-fma, mpexp-fma, mpatan2-fma, mpatan-fma, mpsqrt-fma,
 and mptan-fma.
 (CFLAGS-doasin-fma.c): New.
 (CFLAGS-dosincos-fma.c): Likewise.
 (CFLAGS-e_asin-fma.c): Likewise.
 (CFLAGS-e_atan2-fma.c): Likewise.
 (CFLAGS-e_exp-fma.c): Likewise.
 (CFLAGS-e_log-fma.c): Likewise.
 (CFLAGS-e_pow-fma.c): Likewise.
 (CFLAGS-halfulp-fma.c): Likewise.
 (CFLAGS-mpa-fma.c): Likewise.
 (CFLAGS-mpatan-fma.c): Likewise.
 (CFLAGS-mpatan2-fma.c): Likewise.
 (CFLAGS-mpexp-fma.c): Likewise.
 (CFLAGS-mplog-fma.c): Likewise.
 (CFLAGS-mpsqrt-fma.c): Likewise.
 (CFLAGS-mptan-fma.c): Likewise.
 (CFLAGS-s_atan-fma.c): Likewise.
 (CFLAGS-sincos32-fma.c): Likewise.
 (CFLAGS-slowexp-fma.c): Likewise.
 (CFLAGS-slowpow-fma.c): Likewise.
 (CFLAGS-s_sin-fma.c): Likewise.
 (CFLAGS-s_tan-fma.c): Likewise.
 * sysdeps/x86_64/fpu/multiarch/doasin-fma.c: New file.
 * sysdeps/x86_64/fpu/multiarch/dosincos-fma.c: Likewise.
 * sysdeps/x86_64/fpu/multiarch/e_asin-fma.c: Likewise.
 * sysdeps/x86_64/fpu/multiarch/e_atan2-fma.c: Likewise.
 * sysdeps/x86_64/fpu/multiarch/e_exp-fma.c: Likewise.
 * sysdeps/x86_64/fpu/multiarch/e_log-fma.c: Likewise.
 * sysdeps/x86_64/fpu/multiarch/e_pow-fma.c: Likewise.
 * sysdeps/x86_64/fpu/multiarch/halfulp-fma.c: Likewise.
 * sysdeps/x86_64/fpu/multiarch/ifunc-avx-fma4.h: Likewise.
 * sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h: Likewise.
 * sysdeps/x86_64/fpu/multiarch/mpa-fma.c: Likewise.
 * sysdeps/x86_64/fpu/multiarch/mpatan-fma.c: Likewise.
 * sysdeps/x86_64/fpu/multiarch/mpatan2-fma.c: Likewise.
 * sysdeps/x86_64/fpu/multiarch/mpexp-fma.c: Likewise.
 * sysdeps/x86_64/fpu/multiarch/mplog-fma.c: Likewise.
 * sysdeps/x86_64/fpu/multiarch/mpsqrt-fma.c: Likewise.
 * sysdeps/x86_64/fpu/multiarch/mptan-fma.c: Likewise.
 * sysdeps/x86_64/fpu/multiarch/s_atan-fma.c: Likewise.
 * sysdeps/x86_64/fpu/multiarch/s_sin-fma.c: Likewise.
 * sysdeps/x86_64/fpu/multiarch/s_tan-fma.c: Likewise.
 * sysdeps/x86_64/fpu/multiarch/sincos32-fma.c: Likewise.
 * sysdeps/x86_64/fpu/multiarch/slowexp-fma.c: Likewise.
 * sysdeps/x86_64/fpu/multiarch/slowpow-fma.c: Likewise.
 * sysdeps/x86_64/fpu/multiarch/e_asin.c: Rewrite.
 * sysdeps/x86_64/fpu/multiarch/e_atan2.c: Likewise.
 * sysdeps/x86_64/fpu/multiarch/e_exp.c: Likewise.
 * sysdeps/x86_64/fpu/multiarch/e_log.c: Likewise.
 * sysdeps/x86_64/fpu/multiarch/e_pow.c: Likewise.
 * sysdeps/x86_64/fpu/multiarch/s_atan.c: Likewise.
 * sysdeps/x86_64/fpu/multiarch/s_sin.c: Likewise.
 * sysdeps/x86_64/fpu/multiarch/s_tan.c: Likewise.

release/2.24/master 2017-08-06 18:55:44 UTC 2017-08-06
x86-64: Use _dl_runtime_resolve_opt only with AVX512F [BZ #21871]

Author: H.J. Lu
Author Date: 2017-08-06 17:44:30 UTC

x86-64: Use _dl_runtime_resolve_opt only with AVX512F [BZ #21871]

On AVX machines with XGETBV (ECX == 1) like Skylake processors,

(gdb) disass _dl_runtime_resolve_avx_opt
Dump of assembler code for function _dl_runtime_resolve_avx_opt:
   0x0000000000015890 <+0>: push %rax
   0x0000000000015891 <+1>: push %rcx
   0x0000000000015892 <+2>: push %rdx
   0x0000000000015893 <+3>: mov $0x1,%ecx
   0x0000000000015898 <+8>: xgetbv
   0x000000000001589b <+11>: mov %eax,%r11d
   0x000000000001589e <+14>: pop %rdx
   0x000000000001589f <+15>: pop %rcx
   0x00000000000158a0 <+16>: pop %rax
   0x00000000000158a1 <+17>: and $0x4,%r11d
   0x00000000000158a5 <+21>: bnd je 0x16200 <_dl_runtime_resolve_sse_vex>
End of assembler dump.

is slower than:

(gdb) disass _dl_runtime_resolve_avx_slow
Dump of assembler code for function _dl_runtime_resolve_avx_slow:
   0x0000000000015850 <+0>: vorpd %ymm0,%ymm1,%ymm8
   0x0000000000015854 <+4>: vorpd %ymm2,%ymm3,%ymm9
   0x0000000000015858 <+8>: vorpd %ymm4,%ymm5,%ymm10
   0x000000000001585c <+12>: vorpd %ymm6,%ymm7,%ymm11
   0x0000000000015860 <+16>: vorpd %ymm8,%ymm9,%ymm9
   0x0000000000015865 <+21>: vorpd %ymm10,%ymm11,%ymm10
   0x000000000001586a <+26>: vpcmpeqd %xmm8,%xmm8,%xmm8
   0x000000000001586f <+31>: vorpd %ymm9,%ymm10,%ymm10
   0x0000000000015874 <+36>: vptest %ymm10,%ymm8
   0x0000000000015879 <+41>: bnd jae 0x158b0 <_dl_runtime_resolve_avx>
   0x000000000001587c <+44>: vzeroupper
   0x000000000001587f <+47>: bnd jmpq 0x16200 <_dl_runtime_resolve_sse_vex>
End of assembler dump.
(gdb)

since xgetbv takes much more cycles than single cycle operations like
vpord/vvpcmpeq/ptest. _dl_runtime_resolve_opt should be used only with
AVX512 where AVX512 instructions lead to lower CPU frequency on Skylake
server.

 [BZ #21871]
 * sysdeps/x86/cpu-features.c (init_cpu_features): Set
 bit_arch_Use_dl_runtime_resolve_opt only with AVX512F.

(cherry picked from commit d2cf37c0a2a375cf2fde69f1afbcc49e45368fc4)

hjl/xgetbv/2.25 2017-08-04 18:15:17 UTC 2017-08-04
x86-64: Use _dl_runtime_resolve_opt only with AVX512F [BZ #21871]

Author: H.J. Lu
Author Date: 2017-07-28 22:13:40 UTC

x86-64: Use _dl_runtime_resolve_opt only with AVX512F [BZ #21871]

On AVX machines with XGETBV (ECX == 1) like Skylake processors,

(gdb) disass _dl_runtime_resolve_avx_opt
Dump of assembler code for function _dl_runtime_resolve_avx_opt:
   0x0000000000015890 <+0>: push %rax
   0x0000000000015891 <+1>: push %rcx
   0x0000000000015892 <+2>: push %rdx
   0x0000000000015893 <+3>: mov $0x1,%ecx
   0x0000000000015898 <+8>: xgetbv
   0x000000000001589b <+11>: mov %eax,%r11d
   0x000000000001589e <+14>: pop %rdx
   0x000000000001589f <+15>: pop %rcx
   0x00000000000158a0 <+16>: pop %rax
   0x00000000000158a1 <+17>: and $0x4,%r11d
   0x00000000000158a5 <+21>: bnd je 0x16200 <_dl_runtime_resolve_sse_vex>
End of assembler dump.

is slower than:

(gdb) disass _dl_runtime_resolve_avx_slow
Dump of assembler code for function _dl_runtime_resolve_avx_slow:
   0x0000000000015850 <+0>: vorpd %ymm0,%ymm1,%ymm8
   0x0000000000015854 <+4>: vorpd %ymm2,%ymm3,%ymm9
   0x0000000000015858 <+8>: vorpd %ymm4,%ymm5,%ymm10
   0x000000000001585c <+12>: vorpd %ymm6,%ymm7,%ymm11
   0x0000000000015860 <+16>: vorpd %ymm8,%ymm9,%ymm9
   0x0000000000015865 <+21>: vorpd %ymm10,%ymm11,%ymm10
   0x000000000001586a <+26>: vpcmpeqd %xmm8,%xmm8,%xmm8
   0x000000000001586f <+31>: vorpd %ymm9,%ymm10,%ymm10
   0x0000000000015874 <+36>: vptest %ymm10,%ymm8
   0x0000000000015879 <+41>: bnd jae 0x158b0 <_dl_runtime_resolve_avx>
   0x000000000001587c <+44>: vzeroupper
   0x000000000001587f <+47>: bnd jmpq 0x16200 <_dl_runtime_resolve_sse_vex>
End of assembler dump.
(gdb)

since xgetbv takes much more cycles than single cycle operations like
vpord/vvpcmpeq/ptest. _dl_runtime_resolve_opt should be used only with
AVX512 where AVX512 instructions lead to lower CPU frequency on Skylake
server.

 [BZ #21871]
 * sysdeps/x86/cpu-features.c (init_cpu_features): Set
 bit_arch_Use_dl_runtime_resolve_opt only with AVX512F.

(cherry picked from commit d2cf37c0a2a375cf2fde69f1afbcc49e45368fc4)

ibm/2.26/master 2017-08-02 21:18:07 UTC 2017-08-02
Let ld.so have flags DT_RPATH and DT_RUNPATH

Author: Tulio Magno Quites Machado Filho
Author Date: 2015-02-20 12:27:13 UTC

Let ld.so have flags DT_RPATH and DT_RUNPATH

2015-02-20 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>

 * elf/get-dynamic-info.h: Remove asserts that prevent ld.so from
          having the flags DT_RPATH and DT_RUNPATH.

hjl/ifunc/x86 2017-08-02 15:35:33 UTC 2017-08-02
x86: Remove assembly versions of HAS_CPU_FEATURE/HAS_ARCH_FEATURE

Author: H.J. Lu
Author Date: 2017-07-18 22:36:20 UTC

x86: Remove assembly versions of HAS_CPU_FEATURE/HAS_ARCH_FEATURE

Since all x86 IFUNC selectors are implemented in C, assembly versions of
HAS_CPU_FEATURE and HAS_ARCH_FEATURE can be removed.

 * sysdeps/x86/cpu-features.h [__ASSEMBLER__]
 (LOAD_RTLD_GLOBAL_RO_RDX, HAS_FEATURE, LOAD_FUNC_GOT_EAX,
 HAS_CPU_FEATURE, HAS_ARCH_FEATURE): Removed.

hjl/xgetbv/master 2017-08-02 15:12:41 UTC 2017-08-02
x86-64: Use _dl_runtime_resolve_opt only with AVX512F [BZ #21871]

Author: H.J. Lu
Author Date: 2017-07-28 22:13:40 UTC

x86-64: Use _dl_runtime_resolve_opt only with AVX512F [BZ #21871]

On AVX machines with XGETBV (ECX == 1) like Skylake processors,

(gdb) disass _dl_runtime_resolve_avx_opt
Dump of assembler code for function _dl_runtime_resolve_avx_opt:
   0x0000000000015890 <+0>: push %rax
   0x0000000000015891 <+1>: push %rcx
   0x0000000000015892 <+2>: push %rdx
   0x0000000000015893 <+3>: mov $0x1,%ecx
   0x0000000000015898 <+8>: xgetbv
   0x000000000001589b <+11>: mov %eax,%r11d
   0x000000000001589e <+14>: pop %rdx
   0x000000000001589f <+15>: pop %rcx
   0x00000000000158a0 <+16>: pop %rax
   0x00000000000158a1 <+17>: and $0x4,%r11d
   0x00000000000158a5 <+21>: bnd je 0x16200 <_dl_runtime_resolve_sse_vex>
End of assembler dump.

is slower than:

(gdb) disass _dl_runtime_resolve_avx_slow
Dump of assembler code for function _dl_runtime_resolve_avx_slow:
   0x0000000000015850 <+0>: vorpd %ymm0,%ymm1,%ymm8
   0x0000000000015854 <+4>: vorpd %ymm2,%ymm3,%ymm9
   0x0000000000015858 <+8>: vorpd %ymm4,%ymm5,%ymm10
   0x000000000001585c <+12>: vorpd %ymm6,%ymm7,%ymm11
   0x0000000000015860 <+16>: vorpd %ymm8,%ymm9,%ymm9
   0x0000000000015865 <+21>: vorpd %ymm10,%ymm11,%ymm10
   0x000000000001586a <+26>: vpcmpeqd %xmm8,%xmm8,%xmm8
   0x000000000001586f <+31>: vorpd %ymm9,%ymm10,%ymm10
   0x0000000000015874 <+36>: vptest %ymm10,%ymm8
   0x0000000000015879 <+41>: bnd jae 0x158b0 <_dl_runtime_resolve_avx>
   0x000000000001587c <+44>: vzeroupper
   0x000000000001587f <+47>: bnd jmpq 0x16200 <_dl_runtime_resolve_sse_vex>
End of assembler dump.
(gdb)

since xgetbv takes much more cycles than single cycle operations like
vpord/vvpcmpeq/ptest. _dl_runtime_resolve_opt should be used only with
AVX512 where AVX512 instructions lead to lower CPU frequency on Skylake
server.

 [BZ #21871]
 * sysdeps/x86/cpu-features.c (init_cpu_features): Set
 bit_arch_Use_dl_runtime_resolve_opt only with AVX512F.

hjl/pr21815/master 2017-08-02 14:50:15 UTC 2017-08-02
Compile tst-prelink.c without PIE [BZ #21815]

Author: H.J. Lu
Author Date: 2017-07-19 19:04:14 UTC

Compile tst-prelink.c without PIE [BZ #21815]

tst-prelink.c checks for conflict with GLOB_DAT relocation against
stdout. On i386, there is no GLOB_DAT relocation against stdout with
PIE. Compile tst-prelink.c without PIE to generate GLOB_DAT relocation.

 [BZ #21815]
 * elf/Makefile (CFLAGS-tst-prelink.c): New.
 (LDFLAGS-tst-prelink): Likewise.

aaribaud/y2038-2.25 2017-08-02 10:56:01 UTC 2017-08-02
Y2038: add Y2038-ready getrusage

Author: Albert ARIBAUD (3ADEV)
Author Date: 2017-08-02 10:56:01 UTC

Y2038: add Y2038-ready getrusage

hjl/ifunc/master 2017-07-30 00:06:08 UTC 2017-07-30
x86-64: Use IFUNC memcpy and mempcpy in libc.a

Author: H.J. Lu
Author Date: 2017-07-09 13:42:29 UTC

x86-64: Use IFUNC memcpy and mempcpy in libc.a

Since apply_irel is called before memcpy and mempcpy are called, we
can use IFUNC memcpy and mempcpy in libc.a.

 * sysdeps/x86_64/memmove.S (MEMCPY_SYMBOL): Don't check SHARED.
 (MEMPCPY_SYMBOL): Likewise.
 * sysdeps/x86_64/multiarch/ifunc-impl-list.c
 (__libc_ifunc_impl_list): Test memcpy and mempcpy in libc.a.
 * sysdeps/x86_64/multiarch/memcpy-ssse3-back.S: Also include
 in libc.a.
 * sysdeps/x86_64/multiarch/memcpy-ssse3.S: Likewise.
 * sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S:
 Likewise.
 * sysdeps/x86_64/multiarch/memcpy.c: Also include in libc.a.
 (__hidden_ver1): Don't use in libc.a.
 * sysdeps/x86_64/multiarch/memmove-sse2-unaligned-erms.S
 (__mempcpy): Don't create a weak alias in libc.a.
 * sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S: Support
 libc.a.
 * sysdeps/x86_64/multiarch/mempcpy.c: Also include in libc.a.
 (__hidden_ver1): Don't use in libc.a.

azanella/glob-fixes 2017-07-26 20:09:31 UTC 2017-07-26
posix: Fix glob with GLOB_NOCHECK returning modified patterns (BZ#10246)

Author: Adhemerval Zanella
Author Date: 2017-07-26 19:09:26 UTC

posix: Fix glob with GLOB_NOCHECK returning modified patterns (BZ#10246)

Acconding to POSIX glob with GLOB_NOCHECK should return a list consisting
of only of the input pattern in case of no match. However GLIBC does not
honor in case of '//<something'. This is due internally this is handled
and special case and prefix_array (responsable to prepend the directory
name) does not know if the input already contains a slash or not since
either '/<something>' or '//<something>' will be handle in same way.

This patch fix it by using a empty directory name for the latter (since
prefix_array already adds a slash as default for each entry).

Checked on x86_64-linux-gnu.

 [BZ #10246]
 * posix/glob.c (glob): Handle pattern that do not match and
 start with '/' correctly.
 * posix/globtest.sh: New tests for NOCHECK.

hjl/pr21752/master 2017-07-19 18:10:31 UTC 2017-07-19
Avoid accessing corrupted stack from __stack_chk_fail [BZ #21752]

Author: H.J. Lu
Author Date: 2017-07-19 17:56:19 UTC

Avoid accessing corrupted stack from __stack_chk_fail [BZ #21752]

__libc_argv[0] points to address on stack and __libc_secure_getenv
accesses environment variables which are on stack. We should avoid
accessing stack when stack is corrupted.

This patch also renames function argument in __fortify_fail_abort
from do_backtrace to need_backtrace to avoid confusion with do_backtrace
from enum __libc_message_action.

 [BZ #21752]
 * debug/fortify_fail.c (__fortify_fail_abort): Don't pass down
 __libc_argv[0] if we aren't doing backtrace. Rename do_backtrace
 to need_backtrace.
 * sysdeps/posix/libc_fatal.c (__libc_message): Don't call
 __libc_secure_getenv if we aren't doing backtrace.

hjl/pr21666/2.25 2017-07-19 10:39:49 UTC 2017-07-19
Avoid .symver on common symbols [BZ #21666]

Author: H.J. Lu
Author Date: 2017-06-23 21:38:46 UTC

Avoid .symver on common symbols [BZ #21666]

The .symver directive on common symbol just creates a new common symbol,
not an alias and the newer assembler with the bug fix for

https://sourceware.org/bugzilla/show_bug.cgi?id=21661

will issue an error. Before the fix, we got

$ readelf -sW libc.so | grep "loc[12s]"
  5109: 00000000003a0608 8 OBJECT LOCAL DEFAULT 36 loc1
  5188: 00000000003a0610 8 OBJECT LOCAL DEFAULT 36 loc2
  5455: 00000000003a0618 8 OBJECT LOCAL DEFAULT 36 locs
  6575: 00000000003a05f0 8 OBJECT GLOBAL DEFAULT 36 locs@GLIBC_2.2.5
  7156: 00000000003a05f8 8 OBJECT GLOBAL DEFAULT 36 loc1@GLIBC_2.2.5
  7312: 00000000003a0600 8 OBJECT GLOBAL DEFAULT 36 loc2@GLIBC_2.2.5

in libc.so. The versioned loc1, loc2 and locs have the wrong addresses.
After the fix, we got

$ readelf -sW libc.so | grep "loc[12s]"
  6570: 000000000039e3b8 8 OBJECT GLOBAL DEFAULT 34 locs@GLIBC_2.2.5
  7151: 000000000039e3c8 8 OBJECT GLOBAL DEFAULT 34 loc1@GLIBC_2.2.5
  7307: 000000000039e3c0 8 OBJECT GLOBAL DEFAULT 34 loc2@GLIBC_2.2.5

 [BZ #21666]
 * misc/regexp.c (loc1): Add __attribute__ ((nocommon));
 (loc2): Likewise.
 (locs): Likewise.

(cherry picked from commit 388b4f1a02f3a801965028bbfcd48d905638b797)

linaro/2.23/master 2017-07-13 14:36:20 UTC 2017-07-13
Ignore and remove LD_HWCAP_MASK for AT_SECURE programs (bug #21209)

Author: Siddhesh Poyarekar
Author Date: 2017-03-07 15:22:04 UTC

Ignore and remove LD_HWCAP_MASK for AT_SECURE programs (bug #21209)

The LD_HWCAP_MASK environment variable may alter the selection of
function variants for some architectures. For AT_SECURE process it
means that if an outdated routine has a bug that would otherwise not
affect newer platforms by default, LD_HWCAP_MASK will allow that bug
to be exploited.

To be on the safe side, ignore and disable LD_HWCAP_MASK for setuid
binaries.

 [BZ #21209]
 * elf/rtld.c (process_envvars): Ignore LD_HWCAP_MASK for
 AT_SECURE processes.
 * sysdeps/generic/unsecvars.h: Add LD_HWCAP_MASK.

(cherry picked from commit 1c1243b6fc33c029488add276e56570a07803bfd)

hjl/pr12189 2017-07-10 21:14:27 UTC 2017-07-10
Replace int with bool in __fortify_fail_abort

Author: H.J. Lu
Author Date: 2017-07-10 21:14:27 UTC

Replace int with bool in __fortify_fail_abort

 * debug/fortify_fail.c (__fortify_fail_abort): Replace int with
 bool.
 (__fortify_fail): Pass false to __fortify_fail_abort.
 * debug/stack_chk_fail.c (__stack_chk_fail): Pass true to
 __fortify_fail_abort.
 * include/stdio.h: Include <stdbool.h>l
 (__fortify_fail_abort): Replace int with bool.

zack/build-many-improvements 2017-07-09 14:04:55 UTC 2017-07-09
build-many-glibcs: Impose a memory limit on build processes.

Author: Zack Weinberg
Author Date: 2017-07-07 14:45:37 UTC

build-many-glibcs: Impose a memory limit on build processes.

There are sometimes bugs in the compiler
(e.g. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78460) that cause
it to consume all available memory. To limit the impact of this on
automated test robots, impose memory limits on all subprocesses in
build-many-glibcs.py. When the bug hits, the compiler will still run
out of memory and crash, but that should not affect any other
simultaneous task.

The limit can be configured with the --memory-limit command line switch.
The default is 1.5 gigabytes or physical RAM divided by the number of
jobs to run in parallel, whichever is larger. (Empirically, 1.5 gigs
per process is enough for everything but the files affected by GCC
bug 78640, but 1 gig per process is insufficient for some of the math
tests and also for the "genautomata" step when building compilers for
powerpc64.)

Rather than continue to lengthen the argument list of the Context
constructor, it now takes the entire 'opts' object as its sole argument.

 * scripts/build-many-glibcs.py (total_ram): New function.
 (Context.set_memory_limits): New function.
 (Context.run_builds): Call set_memory_limits immediately before
 do_build.
 (get_parser): Add --memory-limit command-line switch.
 (Context.__init__): Take 'opts' object as sole argument.
 Add 'memory_limit' attribute to self. Make topdir absolute here.
 (main): Update to match.

zack/jda-hppa-patch 2017-07-09 14:03:38 UTC 2017-07-09
JDA's patches for HPPA

Author: Zack Weinberg
Author Date: 2017-06-01 12:50:10 UTC

JDA's patches for HPPA

hjl/pr21609/master 2017-07-05 13:18:48 UTC 2017-07-05
x86-64: Redirect __tls_get_addr to ___tls_get_addr

Author: H.J. Lu
Author Date: 2017-07-05 11:46:45 UTC

x86-64: Redirect __tls_get_addr to ___tls_get_addr

On x86-64, __tls_get_addr realigns stack to support GCC older than GCC
4.9.4:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58066

___tls_get_addr is the alternative x86-64 runtime interface to TLS with
aligned stack. If linker treats ___tls_get_addr just like __tls_get_addr
and the weakref assembly directive is extended to redirect __tls_get_addr
to ___tls_get_addr, we can replace reference to __tls_get_addr with
___tls_get_addr if GCC aligns stack for __tls_get_addr, but doesn't
support ___tls_get_addr.

 * sysdeps/x86_64/Makefile (+cflags): New. Add
 -include $(..)sysdeps/x86_64/tls_get_addr.h if __tls_get_addr
 can be redireted to ___tls_get_addr.
 * sysdeps/x86_64/configure.ac: Check if GCC supports
 ___tls_get_addr. If not, check if __tls_get_addr to
 ___tls_get_addr redirection works.
 * sysdeps/x86_64/configure: Regenerated.
 * sysdeps/x86_64/tls_get_addr.h: New file.

azanella/master-not-cancel 2017-07-04 19:50:08 UTC 2017-07-04
Remove cancellation support for syscall generation

Author: Adhemerval Zanella
Author Date: 2015-11-12 16:01:36 UTC

Remove cancellation support for syscall generation

This patch removes the cancellation mark from the auto-generation syscall
script. Now all the cancellable syscalls are done throught C code using
the SYSCALL_CANCEL macro. It simplifies the assembly required to each
architecture port, since the SYSCALL_CANCEL uses the already defined
INLINE_SYSCALL macros, and allows a more straigh fix on cancellation
machanism (since no more specific assembly fixes will be required).

Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32,
aarch64-linux-gnu, arm-linux-gnueabihf, and powerpc64le-linux-gnu.

 * sysdeps/unix/make-syscalls.sh: Remove cancellable tagging for
 syscall definitions.
 * sysdeps/unix/syscall-template.S (SYSCALL_CANCELLABLE): Remove
 definition.
 * sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h (PSEUDO): Remove
 definition.
 (PSEUDO_END): Likewise.
 [IS_IN (libpthread)] (CENABLE): Likewise.
 [IS_IN (libpthread)] (CDISABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Remove
 definition.
 (PSEUDO_END): Likewise.
 [IS_IN (libpthread)] (__local_enable_asynccancel): Likewise.
 [IS_IN (libpthread)] (__local_disable_asynccancel): Likewise.
 [IS_IN (libc)] (__local_enable_asynccancel): Likewise.
 [IS_IN (libc)] (__local_enable_asynccancel): Likewise.
 [IS_IN (librt)] (__local_disable_asynccancel): Likewise.
 [IS_IN (librt)] (__local_disable_asynccancel): Likewise.
 (CENABLE): Likewise.
 (CDISABLE): Likewise.
 [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO): Remove
 defintion.
 (PSEUDO_END): Likewise.
 [IS_IN (libpthread)] (CENABLE): Likewise.
 [IS_IN (libpthread)] (CDISABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
 * sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h (PSEUDO): Remove
 definition.
 (PSEUDO_END): Likewise.
 [IS_IN (libpthread)] (CENABLE): Likewise.
 [IS_IN (libpthread)] (CDISABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Remove
 definition.
 (PSEUDO_END): Likewise.
 [IS_IN (libpthread)] (CENABLE): Likewise.
 [IS_IN (libpthread)] (CDISABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Remove
 definition.
 (PSEUDO_END): Likewise.
 [IS_IN (libpthread)] (CENABLE): Likewise.
 [IS_IN (libpthread)] (CDISABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (PSEUDO): Remove
 definition.
 (PSEUDO_END): Likewise.
 [IS_IN (libpthread)] (CENABLE): Likewise.
 [IS_IN (libpthread)] (CDISABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
 * sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h (PSEUDO): Remove
 definition.
 (PSEUDO_END): Likewise.
 [IS_IN (libpthread)] (CENABLE): Likewise.
 [IS_IN (libpthread)] (CDISABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
 * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h (PSEUDO):
 Remove definition.
 (PSEUDO_END): Likewise.
 [IS_IN (libpthread)] (CENABLE): Likewise.
 [IS_IN (libpthread)] (CDISABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 (SINGLE_THREAD_P): Likewise.
 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h (PSEUDO): Remove
 definition.
 (PSEUDO_END): Likewise.
 [IS_IN (libpthread)] (CENABLE): Likewise.
 [IS_IN (libpthread)] (CDISABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
 * sysdeps/unix/sysv/linux/nios2/sysdep-cancel.h (PSEUDO): Remove
 definition.
 (PSEUDO_END): Likewise.
 [IS_IN (libpthread)] (CENABLE): Likewise.
 [IS_IN (libpthread)] (CDISABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
 * sysdeps/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Remove file.
 * sysdeps/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
 * sysdeps/unix/sysv/linux/powerpc/sysdep-cancel.h: New file.
 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Remove
 definition.
 (PSEUDO_END): Likewise.
 [IS_IN (libpthread)] (CENABLE): Likewise.
 [IS_IN (libpthread)] (CDISABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Remove
 definition.
 (PSEUDO_END): Likewise.
 [IS_IN (libpthread)] (CENABLE): Likewise.
 [IS_IN (libpthread)] (CDISABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Remove
 definition.
 (PSEUDO_END): Likewise.
 [IS_IN (libpthread)] (CENABLE): Likewise.
 [IS_IN (libpthread)] (CDISABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Remove file.
 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
 * sysdeps/unix/sysv/linux/sparc/sysdep-cancel.h: New file.
 * sysdeps/unix/sysv/linux/tile/sysdep-cancel.h (PSEUDO): Remove
 definition.
 (PSEUDO_END): Likewise.
 [IS_IN (libpthread)] (CENABLE): Likewise.
 [IS_IN (libpthread)] (CDISABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Remove
 definition.
 (PSEUDO_END): Likewise.
 [IS_IN (libpthread)] (CENABLE): Likewise.
 [IS_IN (libpthread)] (CDISABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.

hjl/pr21120/2.24 2017-06-30 16:53:31 UTC 2017-06-30
i386: Increase MALLOC_ALIGNMENT to 16 [BZ #21120]

Author: H.J. Lu
Author Date: 2017-06-30 16:11:08 UTC

i386: Increase MALLOC_ALIGNMENT to 16 [BZ #21120]

GCC 7 changed the definition of max_align_t on i386:

https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=9b5c49ef97e63cc63f1ffa13baf771368105ebe2

As a result, glibc malloc no longer returns memory blocks which are as
aligned as max_align_t requires.

This causes malloc/tst-malloc-thread-fail to fail with an error like this
one:

error: allocation function 0, size 144 not aligned to 16

This patch moves the MALLOC_ALIGNMENT definition to <malloc-alignment.h>
and increases the malloc alignment to 16 for i386.

 [BZ #21120]
 * malloc/malloc.c (MALLOC_ALIGNMENT): Moved to ...
 * sysdeps/generic/malloc-alignment.h: Here. New file.
 * sysdeps/i386/malloc-alignment.h: Likewise.
 * sysdeps/generic/malloc-machine.h: Include <malloc-alignment.h>.

(cherry picked from commit 4e61a6be446026c327aa70cef221c9082bf0085d)

hjl/pr21120/2.25 2017-06-30 16:19:29 UTC 2017-06-30
i386: Increase MALLOC_ALIGNMENT to 16 [BZ #21120]

Author: H.J. Lu
Author Date: 2017-06-30 16:11:08 UTC

i386: Increase MALLOC_ALIGNMENT to 16 [BZ #21120]

GCC 7 changed the definition of max_align_t on i386:

https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=9b5c49ef97e63cc63f1ffa13baf771368105ebe2

As a result, glibc malloc no longer returns memory blocks which are as
aligned as max_align_t requires.

This causes malloc/tst-malloc-thread-fail to fail with an error like this
one:

error: allocation function 0, size 144 not aligned to 16

This patch moves the MALLOC_ALIGNMENT definition to <malloc-alignment.h>
and increases the malloc alignment to 16 for i386.

 [BZ #21120]
 * malloc/malloc-internal.h (MALLOC_ALIGNMENT): Moved to ...
 * sysdeps/generic/malloc-alignment.h: Here. New file.
 * sysdeps/i386/malloc-alignment.h: Likewise.
 * sysdeps/generic/malloc-machine.h: Include <malloc-alignment.h>.

(cherry picked from commit 4e61a6be446026c327aa70cef221c9082bf0085d)

hjl/pr21120/master 2017-06-30 14:43:58 UTC 2017-06-30
i386: Increase MALLOC_ALIGNMENT to 16 [BZ #21120]

Author: H.J. Lu
Author Date: 2017-06-29 17:26:04 UTC

i386: Increase MALLOC_ALIGNMENT to 16 [BZ #21120]

GCC 7 changed the definition of max_align_t on i386:

https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=9b5c49ef97e63cc63f1ffa13baf771368105ebe2

As a result, glibc malloc no longer returns memory blocks which are as
aligned as max_align_t requires.

This causes malloc/tst-malloc-thread-fail to fail with an error like this
one:

error: allocation function 0, size 144 not aligned to 16

This patch moves the MALLOC_ALIGNMENT definition to <malloc-alignment.h>
and increases the malloc alignment to 16 for i386.

 [BZ #21120]
 * malloc/malloc-internal.h (MALLOC_ALIGNMENT): Moved to ...
 * sysdeps/generic/malloc-alignment.h: Here. New file.
 * sysdeps/i386/malloc-alignment.h: Likewise.
 * sysdeps/generic/malloc-machine.h: Include <malloc-alignment.h>.

hjl/pr14995 2017-06-28 18:13:24 UTC 2017-06-28
Check linker support for INSERT in linker script

Author: H.J. Lu
Author Date: 2017-06-26 19:46:08 UTC

Check linker support for INSERT in linker script

Since gold doesn't support INSERT in linker script:

https://sourceware.org/bugzilla/show_bug.cgi?id=15373

tst-split-dynreloc fails to link with gold. Check if linker supports
INSERT in linker script before using it.

 * config.make.in (have-insert): New.
 * configure.ac (libc_cv_insert): New. Set to yes if linker
 supports INSERT in linker script.
 (AC_SUBST(libc_cv_insert): New.
 * configure: Regenerated.
 * sysdeps/x86_64/Makefile (tests): Add tst-split-dynreloc only
 if $(have-insert) == yes.

hjl/pr21666/master 2017-06-23 18:29:38 UTC 2017-06-23
x86-64: Optimize L(between_2_3) in memcmp-avx2-movbe.S

Author: H.J. Lu
Author Date: 2017-06-23 18:29:38 UTC

x86-64: Optimize L(between_2_3) in memcmp-avx2-movbe.S

Turn

 movzbl -1(%rdi, %rdx), %edi
 movzbl -1(%rsi, %rdx), %esi
 orl %edi, %eax
 orl %esi, %ecx

into

 movb -1(%rdi, %rdx), %al
 movb -1(%rsi, %rdx), %cl

 * sysdeps/x86_64/multiarch/memcmp-avx2-movbe.S (between_2_3):
 Replace movzbl and orl with movb.

zack/dont-install-libio-h 2017-06-22 22:39:29 UTC 2017-06-22
Don't install libio.h or _G_config.h.

Author: Zack Weinberg
Author Date: 2017-04-20 15:21:30 UTC

Don't install libio.h or _G_config.h.

This is an experimental patch which removes libio.h (and _G_config.h)
from the set of application-exposed headers. After this change, the
public stdio.h does not define any symbols whose names begin with _G_
nor _IO_, except that when optimizing, the guts of struct _IO_FILE and
three of the flag constants are visible (see bits/stdio.h and
bits/types/FILE_internals.h). There is a small amount of code
duplication in bits/stdio.h, of macro bodies from libio.h that are no
longer available. A number of internal .c files that were manually
doing PLT bypass for flockfile/funlockfile can now rely on
include/stdio.h to do it for them.

It passes the testsuite on x86_64-linux, but it needs a great deal of
additional testing; in particular I'm almost certain I broke the
support for old-format (GLIBC_2.0) struct _IO_FILE, which is
configured out on this target. Testing this properly would require
someone to get their hands on _really_ old binaries, compiled against
glibc 2.0, possibly statically-linked-but-using-NSS. Unfortunately,
libc.so cannot be expected to be binary identical.

However, this should be ready to feed into archive rebuilds to find
out what applications break.

Substantial clean-ups to the libio implementation are possible if this
sticks, but I haven't done 'em; this is intended to be minimal.

 * libio/Makefile: Don't install libio.h or _G_config.h. Do install
 bits/types/FILE_internals.h, bits/types/cookie_io_functions_t.h,
 and bits/types/__fpos_t.h.

 * libio/stdio.h: Don't include libio.h. Get __gnuc_va_list
 directly from stdarg.h, __fpos_t and __fpos64_t from
 bits/types/__fpos_t.h, and the cookie types from
 bits/types/cookie_io_functions_t.h. Change all uses of
 _G_va_list, _G_fpos_t, _G_fpos64_t, _IO_FILE,
 _IO_cookie_io_functions_t, and _IO_ssize_t to __gnuc_va_list,
 __fpos_t, __fpos64_t, FILE, cookie_io_functions_t, and __ssize_t
 respectively.
 Do not define getc nor putc as macros.
 Define BUFSIZ as literal 8192.

 * libio/bits/types/FILE_internals.h: New header. Provide complete
 definition of struct _IO_FILE (the complete version) here.
 Duplicate definitions of _IO_EOF_SEEN, _IO_ERR_SEEN, and _IO_USER_LOCK
 here, with value assertions if they are already defined.
 * libio/bits/types/__fpos_t.h: New header. Define __fpos_t and
 __fpos64_t here.
 * libio/bits/types/cookie_io_functions_t.h: New header. Define
 cookie_read_function_t, cookie_write_function_t,
 cookie_seek_function_t, cookie_close_function_t, and
 cookie_io_functions_t here.

 * libio/libio.h: Include features.h first thing, then error out if
 either _LIBC or __USE_GNU is not defined, or if _ISOMAC is
 defined. Inline all of _G_config.h except _G_HAVE_MREMAP here.
 Get definitions of __mbstate_t, __fpos_t, __fpos64_t, struct
 _IO_FILE, and the cookie-related types from the relevant
 bits/types headers. Get definition of NULL from stddef.h.
 Make all #ifdef _LIBC and #if __GNUC__ >= (2,3) blocks
 unconditional. Remove all #if 0 and #ifdef __cplusplus blocks.
 Change all uses of _G_va_list, _G_fpos_t, and _G_fpos64_t to
 __gnuc_va_list, __fpos_t, __fpos64_t respectively. Provide
 definitions of _STDIO_USES_IOSTREAM, __HAVE_COLUMN,
 _IO_file_flags, __io_read_fn, __io_write_fn, __io_seek_fn,
 __io_close_fn, _IO_cookie_io_functions_t for the sake of the
 implementation. When _IO_USE_OLD_IO_FILE is defined, define
 struct _IO_FILE_old.
 * libio/libioP.h: When _IO_USE_OLD_IO_FILE is defined, define
 struct _IO_FILE_old_plus. Only declare _IO_old_file_init_internal
 when _IO_USE_OLD_IO_FILE is defined, and have it take an
 argument of type struct _IO_FILE_old_plus.
 * libio/oldfileops.c: Change all uses of _IO_FILE to _IO_FILE_old,
 _IO_FILE_plus to _IO_FILE_old_plus, _IO_FILE_complete to _IO_FILE,
 and _IO_FILE_complete_plus to _IO_FILE_plus. Then adjust types
 to match caller/callee's expectations.
 * libio/oldiofdopen.c, libio/oldiofopen.c, libio/oldiopopen.c
 * libio/oldstdfiles.c: Likewise.
 * sysdeps/generic/_G_config.h, sysdeps/unix/sysv/linux/_G_config.h:
 Only provide definition or non-definition of _G_HAVE_MREMAP.

 * sysdeps/ieee754/ldbl-opt/nldbl-iovfscanf.c: Delete file.
 * sysdeps/ieee754/ldbl-opt/Makefile (libnldbl-calls): Remove iovfscanf.
 * sysdeps/ieee754/ldbl-opt/nldbl-compat.c: Define
 __nldbl__IO_vsprintf as alias to __nldbl_vsprintf instead of
 the other way around.
 * sysdeps/ieee754/ldbl-opt/nldbl-compat.h:
 Change all uses of _G_va_list to __gnuc_va_list. Remove
 NLDBL_DECL for _IO_vfscanf.
 * sysdeps/ieee754/ldbl-opt/nldbl-fscanf.c
 * sysdeps/ieee754/ldbl-opt/nldbl-scanf.c
 * sysdeps/ieee754/ldbl-opt/nldbl-vfscanf.c
 * sysdeps/ieee754/ldbl-opt/nldbl-vscanf.c:
 Use __nldbl_vfscanf, not __nldbl__IO_vfscanf.

 * libio/bits/stdio.h: Add multiple-inclusion guard. Include
 bits/types/FILE_internals.h. Declare __uflow and __overflow here.
 Remove redundant __USE_EXTERN_INLINES ifdef. Change all uses of
 _G_va_list to __gnuc_va_list and _IO_ssize_t to __ssize_t.
 (getchar): Use getc, not _IO_getc.
 (__getc_unlocked, __putc_unlocked): New inlines, duplicating the
 bodies of _IO_getc_unlocked and _IO_putc_unlocked.
 (fgetc_unlocked, getc_unlocked, getchar_unlocked, fread_unlocked):
 Use __getc_unlocked.
 (fputc_unlocked, putc_unlocked, putchar_unlocked, fwrite_unlocked):
 Use __putc_unlocked.
 (feof_unlocked): Duplicate the body of _IO_feof_unlocked here.
 (ferror_unlocked): Duplicate the body of _IO_ferror_unlocked here.
 * libio/bits/stdio2.h: Change all uses of _G_va_list to __gnuc_va_list.
 (fread_unlocked): Use __getc_unlocked.
 * libio/bits/types/FILE.h, libio/bits/types/__FILE.h: Explain in
 comments why the name _IO_FILE is used.

 * include/stdio.h: Change all uses of _G_va_list to __gnuc_va_list,
 _IO_ssize_t to __size_t, _IO_FILE to FILE, and _IO_fpos_t to __fpos_t.
 When IS_IN (libc), redirect flockfile and funlockfile to
 __flockfile and __funlockfile respectively.
 When _IO_MTSAFE_IO and not _ISOMAC, include stdio-lock.h before
 stdio.h proper.
 * include/stdio_ext.h: Include bits/types/FILE_internals.h for the
 sake of the inline definition of __fsetlocking.
 * include/libio.h: Adjust #ifdef nest to activate multiple-include
 optimization.
 * include/bits/types/FILE_internals.h, include/bits/types/__fpos_t.h
 * include/bits/types/cookie_io_functions_t.h: New trivial wrappers.
 * include/bits/stdio.h: New wrapper; mark __uflow and __overflow
 as hidden for intra-libc callers.

 * csu/init.c: Include libio.h, not _G_config.h.

 * grp/fgetgrent_r.c, grp/putgrent.c, gshadow/fgetsgent_r.c
 * gshadow/putsgent.c, misc/getpass.c, misc/getttyent.c
 * misc/mntent_r.c, posix/getopt.c, pwd/fgetpwent_r.c
 * shadow/fgetspent_r.c, shadow/putspent.c:
 Don't include libio/iolibio.h. Don't redefine flockfile or
 funlockfile. Don't use _IO_flockfile or _IO_funlockfile.

 * libio/__fbufsize.c, libio/__flbf.c, libio/__fpending.c
 * libio/__freadable.c, libio/__freading.c, libio/__fwritable.c
 * libio/__fwriting.c, malloc/malloc.c: Include libio.h.
 * misc/err.c: Include libio.h. Don't redefine flockfile or funlockfile.

 * stdio-common/tstgetln.c: Include sys/types.h. Don't redefine ssize_t.
 * conform/data/stdio.h-data: va_list may be defined as __gnuc_va_list,
 not _G_va_list.
 * benchtests/strcoll-inputs/filelist#en_US.UTF-8: Remove _G_config.h.

zack/errno-prettyprint 2017-06-22 22:28:45 UTC 2017-06-22
Add pretty-printer for errno.

Author: Zack Weinberg
Author Date: 2017-06-22 22:28:45 UTC

Add pretty-printer for errno.

This patch adds the actual pretty-printer for errno. I could have
used Python's built-in errno module to get the symbolic names for the
constants, but it seemed better to do something entirely under our
control, so there's a .pysym file generated from errnos.texi, with a
hook that allows the Hurd to add additional constants. Then a .py
module is generated from that plus errno.h in the usual manner; many
thanks to the authors of the .pysym mechanism.

There is also a test which verifies that the .py file (not the .pysym
file) covers all of the constants defined in errno.h.

hurd-add-errno-constants.awk has been manually tested, but the
makefile logic that runs it has not been tested.

 * stdlib/errno-printer.py: New pretty-printer.
 * stdlib/test-errno-constants.py: New special test.
 * stdlib/test-errno-printer.c, stdlib/test-errno-printer.py:
 New pretty-printer test.
 * stdlib/make-errno-constants.awk: New script to generate the
 .pysym file needed by errno-printer.py.
 * stdlib/Makefile: Install, run, and test all of the above, as
 appropriate.

 * sysdeps/mach/hurd/hurd-add-errno-constants.awk: New script to
 add Mach/Hurd-specific errno constants to the .pysym file used by
 stdlib/errno-printer.py.
 * sysdeps/mach/hurd/Makefile: Hook hurd-add-errno-constants.awk
 into the generation of that .pysym file.

hjl/cet/setjmp 2017-06-21 19:06:57 UTC 2017-06-21
Add bits/setjmp3.h

Author: H.J. Lu
Author Date: 2017-06-11 00:23:06 UTC

Add bits/setjmp3.h

hjl/memcmp/avx2 2017-06-21 17:16:07 UTC 2017-06-21
Add do_test2

Author: H.J. Lu
Author Date: 2017-06-21 17:16:07 UTC

Add do_test2

ibm/2.24/master 2017-06-21 14:18:55 UTC 2017-06-21
Merge branch 'release/2.24/master' into ibm/2.24/master

Author: Tulio Magno Quites Machado Filho
Author Date: 2017-06-21 14:18:55 UTC

Merge branch 'release/2.24/master' into ibm/2.24/master

hjl/tunables/master 2017-06-21 13:09:43 UTC 2017-06-21
x86: Rename glibc.tune.ifunc to glibc.tune.hwcaps

Author: H.J. Lu
Author Date: 2017-06-21 12:38:03 UTC

x86: Rename glibc.tune.ifunc to glibc.tune.hwcaps

Rename glibc.tune.ifunc to glibc.tune.hwcaps and move it to
sysdeps/x86/dl-tunables.list since it is x86 specicifc. Also
change type of data_cache_size, data_cache_size and
non_temporal_threshold to unsigned long int to match size_t.
Remove usage DEFAULT_STRLEN from cpu-tunables.c.

 * elf/dl-tunables.list (glibc.tune.ifunc): Removed.
 * sysdeps/x86/dl-tunables.list (glibc.tune.hwcaps): New.
 Remove security_level on all fields.
 * manual/tunables.texi: Replace ifunc with hwcaps.
 * sysdeps/x86/cpu-features.c (TUNABLE_CALLBACK (set_ifunc)):
 Renamed to ..
 (TUNABLE_CALLBACK (set_hwcaps)): This.
 (init_cpu_features): Updated.
 * sysdeps/x86/cpu-features.h (cpu_features): Change type of
 data_cache_size, data_cache_size and non_temporal_threshold to
 unsigned long int.
 * sysdeps/x86/cpu-tunables.c (DEFAULT_STRLEN): Removed.
 (TUNABLE_CALLBACK (set_ifunc)): Renamed to ...
 (TUNABLE_CALLBACK (set_hwcaps)): This. Update comments. Don't
 use DEFAULT_STRLEN.

release/2.23/master 2017-06-20 04:28:29 UTC 2017-06-20
i686: Add missing IS_IN (libc) guards to vectorized strcspn

Author: Florian Weimer
Author Date: 2017-06-14 06:11:22 UTC

i686: Add missing IS_IN (libc) guards to vectorized strcspn

Since commit d957c4d3fa48d685ff2726c605c988127ef99395 (i386: Compile
rtld-*.os with -mno-sse -mno-mmx -mfpmath=387), vector intrinsics can
no longer be used in ld.so, even if the compiled code never makes it
into the final ld.so link. This commit adds the missing IS_IN (libc)
guard to the SSE 4.2 strcspn implementation, so that it can be used from
ld.so in the future.

(cherry picked from commit 69052a3a95da37169a08f9e59b2cc1808312753c)

zack/build-layout-experiment 2017-06-08 19:39:03 UTC 2017-06-08
Prepare for radical source tree reorganization.

Author: Zack Weinberg
Author Date: 2017-06-08 19:39:03 UTC

Prepare for radical source tree reorganization.

All top-level files and directories are moved into a temporary storage
directory, REORG.TODO, except for files that will certainly still
exist in their current form at top level when we're done (COPYING,
COPYING.LIB, LICENSES, NEWS, README), all old ChangeLog files (which
are moved to the new directory OldChangeLogs, instead), and the
generated file INSTALL (which is just deleted; in the new order, there
will be no generated files checked into version control).

hjl/avx2/master 2017-06-08 12:07:18 UTC 2017-06-08
x86-64: Optimize strrchr/wcsrchr with AVX2

Author: H.J. Lu
Author Date: 2017-05-26 19:21:55 UTC

x86-64: Optimize strrchr/wcsrchr with AVX2

Optimize strrchr/wcsrchr with AVX2 to check 32 bytes with vector
instructions. It is as fast as SSE2 version for small data sizes
and up to 1X faster for large data sizes on Haswell. Select AVX2
version on AVX2 machines where vzeroupper is preferred and AVX
unaligned load is fast.

 * sysdeps/x86_64/multiarch/Makefile (sysdep_routines): Add
 strrchr-sse2, strrchr-avx2, wcsrchr-sse2 and wcsrchr-avx2.
 * sysdeps/x86_64/multiarch/ifunc-impl-list.c
 (__libc_ifunc_impl_list): Add tests for __strrchr_avx2,
 __strrchr_sse2, __wcsrchr_avx2 and __wcsrchr_sse2.
 * sysdeps/x86_64/multiarch/strrchr-avx2.S: New file.
 * sysdeps/x86_64/multiarch/strrchr-sse2.S: Likewise.
 * sysdeps/x86_64/multiarch/strrchr.c: Likewise.
 * sysdeps/x86_64/multiarch/wcsrchr-avx2.S: Likewise.
 * sysdeps/x86_64/multiarch/wcsrchr-sse2.S: Likewise.
 * sysdeps/x86_64/multiarch/wcsrchr.c: Likewise.

hjl/avx2/fix 2017-06-06 12:31:48 UTC 2017-06-06
x86-64: Move wcsnlen.S to multiarch/wcsnlen-sse4_1.S

Author: H.J. Lu
Author Date: 2017-06-06 12:31:48 UTC

x86-64: Move wcsnlen.S to multiarch/wcsnlen-sse4_1.S

Since wcsnlen.S uses pminud which is the part of SSE4.1, move wcsnlen.S
to multiarch/wcsnlen-sse4_1.S.

 * sysdeps/x86_64/multiarch/Makefile (sysdep_routines): Add
 wcsnlen-sse4_1 and wcsnlen-c.
 * sysdeps/x86_64/multiarch/ifunc-impl-list.c
 (__libc_ifunc_impl_list): Test __wcsnlen_sse4_1 and
 __wcsnlen_sse2.
 * sysdeps/x86_64/multiarch/ifunc-sse4_1.h: New file.
 * sysdeps/x86_64/multiarch/wcsnlen-c.c: Likewise.
 * sysdeps/x86_64/multiarch/wcsnlen-sse4_1.S: Likewise.
 * sysdeps/x86_64/multiarch/wcsnlen.c: Likewise.
 * sysdeps/x86_64/wcsnlen.S: Removed.

hjl/avx2/c 2017-06-05 22:09:59 UTC 2017-06-05
x86-64: Optimize strrchr/wcsrchr with AVX2

Author: H.J. Lu
Author Date: 2017-05-26 19:21:55 UTC

x86-64: Optimize strrchr/wcsrchr with AVX2

Optimize strrchr/wcsrchr with AVX2 to check 32 bytes with vector
instructions. It is as fast as SSE2 version for small data sizes
and up to 1X faster for large data sizes on Haswell. Select AVX2
version on AVX2 machines where vzeroupper is preferred and AVX
unaligned load is fast.

 * sysdeps/x86_64/multiarch/Makefile (sysdep_routines): Add
 strrchr-sse2, strrchr-avx2, wcsrchr-sse2 and wcsrchr-avx2.
 * sysdeps/x86_64/multiarch/ifunc-impl-list.c
 (__libc_ifunc_impl_list): Add tests for __strrchr_avx2,
 __strrchr_sse2, __wcsrchr_avx2 and __wcsrchr_sse2.
 * sysdeps/x86_64/multiarch/strrchr-avx2.S: New file.
 * sysdeps/x86_64/multiarch/strrchr-sse2.S: Likewise.
 * sysdeps/x86_64/multiarch/strrchr.c: Likewise.
 * sysdeps/x86_64/multiarch/wcsrchr-avx2.S: Likewise.
 * sysdeps/x86_64/multiarch/wcsrchr-sse2.S: Likewise.
 * sysdeps/x86_64/multiarch/wcsrchr.c: Likewise.

zack/build-experiments 2017-06-01 12:47:44 UTC 2017-06-01
Experimenting with alternatives to VPATH.

Author: Zack Weinberg
Author Date: 2017-06-01 12:47:44 UTC

Experimenting with alternatives to VPATH.

hjl/master 2017-05-29 13:47:22 UTC 2017-05-29
x86: Update __x86_shared_non_temporal_threshold

Author: H.J. Lu
Author Date: 2017-05-12 20:38:04 UTC

x86: Update __x86_shared_non_temporal_threshold

__x86_shared_non_temporal_threshold was set to 6 times of per-core
shared cache size, based on the large memcpy micro benchmark in glibc
on a 8-core processor. For a processor with more than 8 cores, the
threshold is too low. Set __x86_shared_non_temporal_threshold to the
3/4 of the total shared cache size so that it is unchanged on 8-core
processors. On processors with less than 8 cores, the threshold is
lower.

 * sysdeps/x86/cacheinfo.c (__x86_shared_non_temporal_threshold):
 Set to the 3/4 of the total shared cache size.

tuliom/float128 2017-05-25 19:14:47 UTC 2017-05-25
powerpc64le: Enable float128

Author: Paul E. Murphy
Author Date: 2016-08-09 21:48:54 UTC

powerpc64le: Enable float128

Add ulps for the float128 type, bits/floatn.h, and float128-abi.h.

Likewise, sqrt is not implemented in libgcc. The sfp-machine.h
header is taken from libgcc, and used to build a P7/P8 soft-fp
sqrtf128.

 * sysdeps/powerpc/fpu/libm-test-ulps: Regenerated.
 * sysdeps/powerpc/fpu/math_private.h:
 (__ieee754_sqrtf128): New inline override.
 * sysdeps/powerpc/powerpc64le/Implies-before: New file.
 * sysdeps/powerpc/powerpc64le/Makefile: New file.
 * sysdeps/powerpc/powerpc64le/bits/floatn.h: New file.
 * sysdeps/powerpc/powerpc64le/fpu/e_sqrtf128.c: New file.
 * sysdeps/powerpc/powerpc64le/fpu/sfp-machine.h: New file.
 * sysdeps/powerpc/powerpc64le/power9/fpu/e_sqrtf128.c: New file.

 * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist:
 Regenerated.
 * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist:
 Likewise.

 * sysdeps/unix/sysv/linux/powerpc/powerpc64le/float128-abi.h
 New file.

hjl/cacheinfo/master 2017-05-24 13:35:25 UTC 2017-05-24
x86: Add cache info to cpu_features

Author: H.J. Lu
Author Date: 2017-05-24 03:22:13 UTC

x86: Add cache info to cpu_features

This patch adds cache info to cpu_features to support tunables for both
cache info as well as CPU features in a single x86 namespace. Since
init_cacheinfo is in libc.so and cpu_features is in ld.so, cache info
and CPU features must be in a place for tunables.

 * sysdeps/x86/cacheinfo.c (init_cacheinfo): Use data_size,
 shared_size and non_temporal_threshold from cpu_features if
 they aren't zero.
 * sysdeps/x86/cpu-features.h (cache_info): New.
 (cpu_features): Add cache.

aaribaud/y2038-2.23 2017-05-24 08:29:39 UTC 2017-05-24
Add __fstatat64_t64, __fxstatat_t64

Author: Albert ARIBAUD (3ADEV)
Author Date: 2017-05-24 08:27:17 UTC

Add __fstatat64_t64, __fxstatat_t64

hjl/x86/optimize 2017-05-22 20:15:35 UTC 2017-05-22
Add x86_cache.non_temporal_threshold to GLIBC_TUNABLES

Author: H.J. Lu
Author Date: 2017-05-22 19:00:43 UTC

Add x86_cache.non_temporal_threshold to GLIBC_TUNABLES

Add support for "glibc.x86_cache.non_temporal_threshold=number" to
GLIBC_TUNABLES.

 * elf/dl-tunables.list (x86_cache): New name space.
 * sysdeps/x86/cacheinfo.c [HAVE_TUNABLES] (TUNABLE_NAMESPACE):
 New.
 [HAVE_TUNABLES]: Include <elf/dl-tunables.h>.
 [HAVE_TUNABLES] (DL_TUNABLE_CALLBACK (set_non_temporal_threshold)):
 New.
 [HAVE_TUNABLES] (init_cacheinfo): Call TUNABLE_SET_VAL_WITH_CALLBACK
 with set_non_temporal_threshold.

dj/malloc-tcache 2017-05-11 21:27:35 UTC 2017-05-11
Tweak Makefile, asserts, comments.

Author: DJ Delorie
Author Date: 2017-05-11 21:25:10 UTC

Tweak Makefile, asserts, comments.

* Un-Wundef-ify -DUSE_TCACHE
* More asserts in tcache get/put functions
* Clarify redundancy in tcache structure

fw/syscall-list 2017-05-01 09:55:58 UTC 2017-05-01
<bits/syscall.h>: Use an arch-independent system call list on Linux

Author: Florian Weimer
Author Date: 2017-04-05 19:30:40 UTC

<bits/syscall.h>: Use an arch-independent system call list on Linux

This commit changes the way the list of SYS_* system call macros
is created on Linux. glibc now contains a list of all known system
calls, and the generated <bits/syscall.h> file defines the SYS_
macro only if the correspnding __NR_ macro is defined by the kernel
headers.

As a result, there glibc does not have to be rebuilt to pick up
system calls if the glibc sources already know about them. This
means that glibc can be built with older kernel headers, and if
the installed kernel headers are upgraded afterwards, additional
SYS_ macros become available as long as glibc has a record for
those system calls.

linaro/2.21/master 2017-04-21 13:07:56 UTC 2017-04-21
Make io/ftwtest-sh remove temporary files on early exit.

Author: Joseph Myers
Author Date: 2015-10-21 21:18:21 UTC

Make io/ftwtest-sh remove temporary files on early exit.

The test io/ftwtest-sh creates a directory that at some points during
the test does not have execute permission. To avoid leaving behind
such a directory that prevents the build directory from being removed
with a simple "rm -rf", it traps various signals to make the directory
executable and remove it before exit. However, this doesn't cover the
case where one of the tests simply fails (which happens with cross
testing if testing on a remote system where the path to the build
directory involves a symlink, or if that remote system fell over
during testing - I think the latter is the case where the directory is
left behind with bad permissions).

This patch makes that test also trap signal 0 (exit) so that the
directory gets properly removed in such failure cases as well.

Tested in both configurations where the test passes and where it fails
to verify that the result of the test is unchanged but the directory
is no longer left behind where it was previously left behind.

 * io/ftwtest-sh: Also trap on exit to remove temporary files.

hjl/pr21258/2.23 2017-04-20 14:55:44 UTC 2017-04-20
x86-64: Improve branch predication in _dl_runtime_resolve_avx512_opt [BZ #21258]

Author: H.J. Lu
Author Date: 2017-03-21 17:59:31 UTC

x86-64: Improve branch predication in _dl_runtime_resolve_avx512_opt [BZ #21258]

On Skylake server, _dl_runtime_resolve_avx512_opt is used to preserve
the first 8 vector registers. The code layout is

  if only %xmm0 - %xmm7 registers are used
     preserve %xmm0 - %xmm7 registers
  if only %ymm0 - %ymm7 registers are used
     preserve %ymm0 - %ymm7 registers
  preserve %zmm0 - %zmm7 registers

Branch predication always executes the fallthrough code path to preserve
%zmm0 - %zmm7 registers speculatively, even though only %xmm0 - %xmm7
registers are used. This leads to lower CPU frequency on Skylake
server. This patch changes the fallthrough code path to preserve
%xmm0 - %xmm7 registers instead:

  if whole %zmm0 - %zmm7 registers are used
    preserve %zmm0 - %zmm7 registers
  if only %ymm0 - %ymm7 registers are used
     preserve %ymm0 - %ymm7 registers
  preserve %xmm0 - %xmm7 registers

Tested on Skylake server.

 [BZ #21258]
 * sysdeps/x86_64/dl-trampoline.S (_dl_runtime_resolve_opt):
 Define only if _dl_runtime_resolve is defined to
 _dl_runtime_resolve_sse_vex.
 * sysdeps/x86_64/dl-trampoline.h (_dl_runtime_resolve_opt):
 Fallthrough to _dl_runtime_resolve_sse_vex.

(cherry picked from commit c15f8eb50cea7ad1a4ccece6e0982bf426d52c00)

fw/accept4 2017-04-14 08:30:01 UTC 2017-04-14
Assume that accept4 is always available and works

Author: Florian Weimer
Author Date: 2017-04-14 08:30:01 UTC

Assume that accept4 is always available and works

Simplify the Linux accept4 implementation based on the assumption
that it is available in some way. __ASSUME_ACCEPT4_SOCKETCALL was
previously unused, so remove it. Its functionality is implied
by the complex #if condition in accept4.c.

hjl/hwcap/master 2017-04-07 15:09:47 UTC 2017-04-07
x86: Set dl_hwcap from CPU features

Author: H.J. Lu
Author Date: 2017-04-05 22:24:30 UTC

x86: Set dl_hwcap from CPU features

On x86, the usage of AT_HWCAP in glibc is obsolete since addition of
dl_x86_cpu_features. dl_hwcap, which was set from AT_HWCAP, is used by
dynamic linker to build an array of hardware capability names, which are
added to search path when loading shared object. dl_hwcap was unused on
x86-64 and only SSE2 was used on i386.

This patch sets dl_hwcap with new hardware capabilities from CPU
features. Currently, 2 capabilities, SSE2 and AVX2, are supported.
The maximum number of hardware capabilities is 64. Since x86-64
includes SSE2, SSE2 is skipped on x86-64. dl_x86_cap_flags is kepted
for i386 and is used by _dl_show_auxv. dl_x86_hwcap_flags is added
for new hardware capabilities.

 * sysdeps/i386/dl-hwcap.h: New file.
 * sysdeps/x86/dl-hwcap.h: Likewise.
 * sysdeps/x86_64/dl-hwcap.h: Likewise.
 * sysdeps/x86_64/dl-procinfo.h: Likewise.
 * sysdeps/i386/dl-procinfo.c (_dl_x86_hwcap_flags): New.
 * sysdeps/i386/dl-procinfo.h: Include <dl-hwcap.h>.
 (_DL_HWCAP_COUNT): Removed.
 (HWCAP_I386_XXX): Likewise.
 (HWCAP_IMPORTANT): Likewise.
 (_dl_procinfo): Likewise.
 (_dl_hwcap_string): Likewise.
 (_dl_string_hwcap): Likewise.
 * sysdeps/unix/sysv/linux/i386/dl-procinfo.h (_dl_procinfo):
 Replace _DL_HWCAP_COUNT with 32.
 * sysdeps/unix/sysv/linux/x86_64/dl-procinfo.h [!IS_IN (ldconfig)]:
 Include <sysdeps/x86_64/dl-procinfo.h>.
 * sysdeps/x86/cpu-features.c: Include <dl-hwcap.h>.
 (init_cpu_features): Set dl_hwcap and dl_hwcap_mask.
 * sysdeps/x86_64/dl-procinfo.c (_dl_x86_hwcap_flags): New.

hjl/pr21265/xsavec 2017-03-28 20:46:42 UTC 2017-03-28
X86-64: Use fxsave/xsave/xsavec in _dl_runtime_resolve

Author: H.J. Lu
Author Date: 2017-03-23 15:21:52 UTC

X86-64: Use fxsave/xsave/xsavec in _dl_runtime_resolve

In _dl_runtime_resolve, use fxsave/xsave/xsavec to preserve all vector,
mask and bound registers. It simplifies _dl_runtime_resolve and supports
different calling conventions. However, use xsave can be 10X slower
than saving and restoring vector and bound registers individually.

gentoo/2.25 2017-03-20 14:57:14 UTC 2017-03-20
posix_spawn: fix stack setup on ia64 [BZ #21275]

Author: Mike Frysinger
Author Date: 2017-03-20 08:47:56 UTC

posix_spawn: fix stack setup on ia64 [BZ #21275]

The ia64-specific clone2 call expects the base of the stack mapping and
the stack size as sep arguments, not an initial stack value as on other
stack-grows-down architectures. Reuse the stack-grows-up macro so we
pass in the right stack base.

Reported-by: Matt Turner <mattst88@gentoo.org>
(cherry picked from commit ddc3fb333469c2997798742dc0509dc1e3201d91)
(cherry picked from commit 27ab0d9518746dfb59ed2ba59daefc981dc10e38)

gentoo/2.24 2017-03-20 14:56:52 UTC 2017-03-20
posix_spawn: fix stack setup on ia64 [BZ #21275]

Author: Mike Frysinger
Author Date: 2017-03-20 08:47:56 UTC

posix_spawn: fix stack setup on ia64 [BZ #21275]

The ia64-specific clone2 call expects the base of the stack mapping and
the stack size as sep arguments, not an initial stack value as on other
stack-grows-down architectures. Reuse the stack-grows-up macro so we
pass in the right stack base.

Reported-by: Matt Turner <mattst88@gentoo.org>
(cherry picked from commit ddc3fb333469c2997798742dc0509dc1e3201d91)
(cherry picked from commit 7043946c7921c0e3850dd2b3d948336624bb0f62)

fw/out_buffer 2017-03-10 19:45:25 UTC 2017-03-10
WIP struct out_buffer

Author: Florian Weimer
Author Date: 2017-03-10 19:45:25 UTC

WIP struct out_buffer

fw/bug16145 2017-03-09 15:34:11 UTC 2017-03-09
WIP reorganization to improve scalability of localtime

Author: Florian Weimer
Author Date: 2017-03-09 15:33:57 UTC

WIP reorganization to improve scalability of localtime

aaribaud/y2038-pre-5th-draft 2017-02-22 07:06:33 UTC 2017-02-22
Add 64-bit version of ctime_r

Author: Albert ARIBAUD (3ADEV)
Author Date: 2017-02-22 07:06:33 UTC

Add 64-bit version of ctime_r

aaribaud/y2038 2017-02-22 07:06:33 UTC 2017-02-22
Add 64-bit version of ctime_r

Author: Albert ARIBAUD (3ADEV)
Author Date: 2017-02-22 07:06:33 UTC

Add 64-bit version of ctime_r

release/2.19/master 2017-02-20 21:04:52 UTC 2017-02-20
Fix powerpc software sqrt (bug 17964).

Author: Joseph Myers
Author Date: 2015-02-12 23:05:37 UTC

Fix powerpc software sqrt (bug 17964).

As Adhemerval noted in
<https://sourceware.org/ml/libc-alpha/2015-01/msg00451.html>, the
powerpc sqrt implementation for when _ARCH_PPCSQ is not defined is
inaccurate in some cases.

The problem is that this code relies on fused multiply-add, and relies
on the compiler contracting a * b + c to get a fused operation. But
sysdeps/ieee754/dbl-64/Makefile disables contraction for e_sqrt.c,
because the implementation in that directory relies on *not* having
contracted operations.

While it would be possible to arrange makefiles so that an earlier
sysdeps directory can disable the setting in
sysdeps/ieee754/dbl-64/Makefile, it seems a lot cleaner to make the
dependence on fused operations explicit in the .c file. GCC 4.6
introduced support for __builtin_fma on powerpc and other
architectures with such instructions, so we can rely on that; this
patch duly makes the code use __builtin_fma for all such fused
operations.

Tested for powerpc32 (hard float).

2015-02-12 Joseph Myers <joseph@codesourcery.com>

 [BZ #17964]
 * sysdeps/powerpc/fpu/e_sqrt.c (__slow_ieee754_sqrt): Use
 __builtin_fma instead of relying on contraction of a * b + c.

(cherry picked from commit e8bd5286c68bc35be3b41e94c15c4387dcb3bec9)

fw/math-split-tests 2017-02-17 07:22:29 UTC 2017-02-17
RFC: Run libm tests separately for each function

Author: Joseph Myers
Author Date: 2017-02-16 23:08:20 UTC

RFC: Run libm tests separately for each function

At present, libm tests for each function get built into a single
executable (for each floating point type, for each of normal / inline
/ finite-math-only functions, plus vector variants) and run together,
resulting in a single PASS or FAIL (for each of those nine variants
plus vector variants). Building this executable involves reading
about 40 MB of libm-test-*.c sources, which would grow to maybe 70 or
80 MB when the complex inverse trig and hyperbolic functions move to
the auto-libm-test-* mechanism (that move is practical now that tests
for all functions don't need regenerating for any change to
auto-libm-test-in but you can instead regenerate each
auto-libm-test-out-* file independently; auto-libm-test-out-casin and
auto-libm-test-out-casinh take about 38 minutes each to generate on my
system after such a move, auto-libm-test-out-cacos and
auto-libm-test-out-cacosh take about 80 minutes each).

This patch arranges for tests of each function to be run separately
from the makefiles instead. There are 121 functions being tested for
each (type, variant pair) (actually 126, but run as 121 from the
Makefile because each of the pairs (exp10, pow10), (isfinite, finite),
(lgamma, gamma), (remainder, drem), (scalbn, ldexp), shares a table of
test results and so is run together), so 1089 separate tests run from
the Makefile, plus 48 vector tests on x86_64 (six functions for eight
vector variants). Each test only involves a libm-test-<func>.c file
of no more than about 4 MB, rather than all such files taking about 40
MB. With tests run separately, test summaries will indicate which
functions actually have problems (of course, those problems may just
be out-of-date libm-test-ulps files if the file hasn't been updated
for the architecture in question recently).

All the .c files for the 1089+48 tests are generated automatically
from the Makefiles. Various checked-in boilerplate .c files are
removed as no longer needed. CFLAGS definitions for the different
kinds of tests are generated using makefile iterators to apply
target-specific variable settings. libm-have-vector-test.h is no
longer needed; the list of functions to test for each vector type is
now in the sysdeps Makefile.

This should remove the amount of boilerplate needed for float128
testing support; test-float128.h will still be needed, but not various
.c files or Makefile CFLAGS definitions. The logic for creating
dependencies on libm-test-support-*.o files should also render
<https://sourceware.org/ml/libc-alpha/2017-02/msg00279.html>
unnecessary.

Any comments? Especially regarding the use of iterators; there is
existing precedent (in elf/Makefile) for using o-iterator.mk as a
generic iterator with object-suffixes-left set to something other than
a list of object suffixes, but maybe there should be a differently
named iterator for such generic uses?

2017-02-16 Joseph Myers <joseph@codesourcery.com>

 * math/Makefile (libm-tests-generated): Remove variable.
 (libm-tests-base-normal): New variable.
 (libm-tests-base-finite): Likewise.
 (libm-tests-base-inline): Likewise.
 (libm-tests-base): Likewise.
 (libm-tests-normal): Likewise.
 (libm-tests-finite): Likewise.
 (libm-tests-inline): Likewise.
 (libm-tests-vector): Likewise.
 (libm-tests): Define in terms of these new variables.
 (libm-tests-for-type): New variable.
 (libm-tests.o): Move definition.
 (tests): Move addition of $(libm-tests).
 (generated): Update for new and removed libm test files.
 ($(objpfx)libm-test.c): Remove target.
 ($(objpfx)libm-have-vector-test.h): Likewise.
 (CFLAGS-test-double-vlen2.c): Remove variable.
 (CFLAGS-test-double-vlen4.c): Likewise.
 (CFLAGS-test-double-vlen8.c): Likewise.
 (CFLAGS-test-float-vlen4.c): Likewise.
 (CFLAGS-test-float-vlen8.c): Likewise.
 (CFLAGS-test-float-vlen16.c): Likewise.
 (CFLAGS-test-float.c): Likewise.
 (CFLAGS-test-float-finite.c): Likewise.
 (CFLAGS-libm-test-support-float.c): Likewise.
 (CFLAGS-test-double.c): Likewise.
 (CFLAGS-test-double-finite.c): Likewise.
 (CFLAGS-libm-test-support-double.c): Likewise.
 (CFLAGS-test-ldouble.c): Likewise.
 (CFLAGS-test-ldouble-finite.c): Likewise.
 (CFLAGS-libm-test-support-ldouble.c): Likewise.
 (libm-test-inline-cflags): New variable.
 (CFLAGS-test-ifloat.c): Remove variable.
 (CFLAGS-test-idouble.c): Likewise.
 (CFLAGS-test-ildouble.c): Likewise.
 ($(addprefix $(objpfx), $(libm-tests.o))): Move target and update
 dependencies.
 ($(foreach t,$(libm-tests-normal),$(objpfx)$(t).c)): New rule.
 ($(foreach t,$(libm-tests-finite),$(objpfx)$(t).c)): Likewise.
 ($(foreach t,$(libm-tests-inline),$(objpfx)$(t).c)): Likewise.
 ($(foreach t,$(libm-tests-vector),$(objpfx)$(t).c)): Likewise.
 ($(foreach t,$(types),$(objpfx)libm-test-support-$(t).c)):
 Likewise.
 (dependencies on libm-test-support-*.o): Remove.
 ($(foreach f,$(libm-test-funcs-all),$(objpfx)$(o)-$(f).o)): New
 rules using iterators.
 ($(addprefix $(objpfx),$(call libm-tests-for-type,$(o)))):
 Likewise.
 ($(objpfx)libm-test-support-$(o).o): Likewise.
 ($(addprefix $(objpfx),$(filter-out $(tests-static)
 $(libm-vec-tests),$(tests)))): Filter out $(libm-tests-vector)
 instead.
 ($(addprefix $(objpfx), $(libm-vec-tests))): Use iterator to
 define rule instead.
 * math/README.libm-test: Update.
 * math/libm-test-acos.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-acosh.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-asin.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-asinh.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-atan.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-atan2.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-atanh.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-cabs.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-cacos.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-cacosh.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-canonicalize.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-carg.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-casin.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-casinh.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-catan.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-catanh.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-cbrt.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-ccos.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-ccosh.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-ceil.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-cexp.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-cimag.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-clog.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-clog10.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-conj.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-copysign.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-cos.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-cosh.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-cpow.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-cproj.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-creal.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-csin.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-csinh.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-csqrt.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-ctan.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-ctanh.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-erf.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-erfc.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-exp.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-exp10.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-exp2.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-expm1.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-fabs.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-fdim.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-floor.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-fma.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-fmax.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-fmaxmag.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-fmin.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-fminmag.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-fmod.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-fpclassify.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-frexp.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-fromfp.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-fromfpx.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-getpayload.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-hypot.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-ilogb.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-iscanonical.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-iseqsig.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-isfinite.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-isgreater.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-isgreaterequal.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-isinf.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-isless.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-islessequal.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-islessgreater.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-isnan.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-isnormal.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-issignaling.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-issubnormal.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-isunordered.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-iszero.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-j0.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-j1.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-jn.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-lgamma.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-llogb.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-llrint.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-llround.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-log.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-log10.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-log1p.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-log2.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-logb.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-lrint.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-lround.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-modf.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-nearbyint.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-nextafter.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-nextdown.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-nexttoward.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-nextup.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-pow.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-remainder.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-remquo.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-rint.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-round.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-roundeven.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-scalb.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-scalbln.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-scalbn.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-setpayload.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-setpayloadsig.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-signbit.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-significand.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-sin.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-sincos.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-sinh.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-sqrt.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-tan.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-tanh.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-tgamma.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-totalorder.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-totalordermag.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-trunc.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-ufromfp.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-ufromfpx.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-y0.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-y1.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-yn.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-driver.c: Do not include libm-have-vector-test.h.
 (HAVE_VECTOR): Remove macro.
 (START): Do not call HAVE_VECTOR.
 * math/test-double-vlen2.h (FUNC_TEST): Remove macro.
 * math/test-double-vlen4.h (FUNC_TEST): Remove macro.
 * math/test-double-vlen8.h (FUNC_TEST): Remove macro.
 * math/test-float-vlen16.h (FUNC_TEST): Remove macro.
 * math/test-float-vlen4.h (FUNC_TEST): Remove macro.
 * math/test-float-vlen8.h (FUNC_TEST): Remove macro.
 * math/test-math-vector.h (FUNC_TEST): New macro.
 (WRAPPER_DECL): Rename to WRAPPER_DECL_f.
 * sysdeps/x86_64/fpu/Makefile (double-vlen2-funcs): New variable.
 (double-vlen4-funcs): Likewise.
 (double-vlen4-avx2-funcs): Likewise.
 (double-vlen8-funcs): Likewise.
 (float-vlen4-funcs): Likewise.
 (float-vlen8-funcs): Likewise.
 (float-vlen8-avx2-funcs): Likewise.
 (float-vlen16-funcs): Likewise.
 (CFLAGS-test-double-vlen4-avx2.c): Remove variable.
 (CFLAGS-test-float-vlen8-avx2.c): Likewise.
 * sysdeps/x86_64/fpu/test-double-vlen4.h (TEST_VECTOR_cos): Remove
 macro.
 (TEST_VECTOR_sin): Likewise.
 (TEST_VECTOR_sincos): Likewise.
 (TEST_VECTOR_log): Likewise.
 (TEST_VECTOR_exp): Likewise.
 (TEST_VECTOR_pow): Likewise.
 * sysdeps/x86_64/fpu/test-double-vlen8.h (TEST_VECTOR_cos):
 Likewise.
 (TEST_VECTOR_sin): Likewise.
 (TEST_VECTOR_sincos): Likewise.
 (TEST_VECTOR_log): Likewise.
 (TEST_VECTOR_exp): Likewise.
 (TEST_VECTOR_pow): Likewise.
 * sysdeps/x86_64/fpu/test-float-vlen16.h (TEST_VECTOR_cosf):
 Likewise.
 (TEST_VECTOR_sinf): Likewise.
 (TEST_VECTOR_sincosf): Likewise.
 (TEST_VECTOR_logf): Likewise.
 (TEST_VECTOR_expf): Likewise.
 (TEST_VECTOR_powf): Likewise.
 * sysdeps/x86_64/fpu/test-float-vlen8.h (TEST_VECTOR_cosf):
 Likewise.
 (TEST_VECTOR_sinf): Likewise.
 (TEST_VECTOR_sincosf): Likewise.
 (TEST_VECTOR_logf): Likewise.
 (TEST_VECTOR_expf): Likewise.
 (TEST_VECTOR_powf): Likewise.
 * math/gen-libm-have-vector-test.sh: Remove file.
 * math/libm-test.inc: Likewise.
 * math/libm-test-support-double.c: Likewise.
 * math/libm-test-support-float.c: Likewise.
 * math/libm-test-support-ldouble.c: Likewise.
 * math/test-double-finite.c: Likewise.: Likewise.
 * math/test-double.c: Likewise.
 * math/test-float-finite.c: Likewise.
 * math/test-float.c: Likewise.
 * math/test-idouble.c: Likewise.
 * math/test-ifloat.c: Likewise.
 * math/test-ildouble.c: Likewise.
 * math/test-ldouble-finite.c: Likewise.
 * math/test-ldouble.c: Likewise.
 * sysdeps/x86_64/fpu/test-double-vlen2.c: Likewise.
 * sysdeps/x86_64/fpu/test-double-vlen2.h: Likewise.
 * sysdeps/x86_64/fpu/test-double-vlen4-avx2.c: Likewise.
 * sysdeps/x86_64/fpu/test-double-vlen4.c: Likewise.
 * sysdeps/x86_64/fpu/test-double-vlen8.c: Likewise.
 * sysdeps/x86_64/fpu/test-float-vlen16.c: Likewise.
 * sysdeps/x86_64/fpu/test-float-vlen4.c: Likewise.
 * sysdeps/x86_64/fpu/test-float-vlen4.h: Likewise.
 * sysdeps/x86_64/fpu/test-float-vlen8-avx2.c: Likewise.
 * sysdeps/x86_64/fpu/test-float-vlen8.c: Likewise.

azanella/bz12683 2017-02-08 20:27:57 UTC 2017-02-08
nptl: Consolidate pthread_{timed,try}join{_np}

Author: Adhemerval Zanella
Author Date: 2017-01-25 19:08:51 UTC

nptl: Consolidate pthread_{timed,try}join{_np}

This patch consolidates the pthread_join and gnu extensions to avoid
simplify implementation and avoid code duplication. Both pthread_join
and pthread_tryjoin are now based on pthread_timedjoin_np.

It also fixes some inconsistencies on ESRCH, EINVAL, EDEADLK handling
(where each implementation differs from each other) and also on
clenup handler (which now always use a CAS). It also replace the
atomics operation with the C11 ones.

Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32,
aarch64-linux-gnu, arm-linux-gnueabihf, and powerpc64le-linux-gnu.

 * nptl/pthreadP.h (__pthread_timedjoin_np): Define.
 * nptl/pthread_join.c (pthread_join): Use __pthread_timedjoin_np.
 * nptl/pthread_tryjoin.c (pthread_tryjoin): Likewise.
 * nptl/pthread_timedjoin.c (cleanup): Use CAS on argument setting.
 (pthread_timedjoin_np): Define internal symbol and common code from
 pthread_join.
 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_timedwait_tid):
 Remove superflous checks.
 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_timedwait_tid):
 Likewise.

fw/bug21041 2017-01-24 17:32:30 UTC 2017-01-24
WIP delayed IFUNC relocation

Author: Florian Weimer
Author Date: 2017-01-24 17:32:30 UTC

WIP delayed IFUNC relocation

azanella/c11-threads 2017-01-24 17:21:18 UTC 2017-01-24
Add manual documentation for threads.h

Author: Juan Manuel Torres Palma
Author Date: 2016-12-06 22:47:02 UTC

Add manual documentation for threads.h

This patch updates the manual and adds a new chapter to the manual,
explaining types macros, constants and functions defined by ISO C11
threads.h standard.

 * manual/Makefile (chapters): Add isothreads.texi.
 * manual/isothreads.texi: New file. Add new chapter for ISO C11
 threads documentation.

google/grte/v4-2.19/master 2017-01-19 22:01:46 UTC 2017-01-19
Fix nan functions handling of payload strings (BZ16962, CVE-2014-9761)

Author: Joseph Myers
Author Date: 2017-01-19 22:01:46 UTC

Fix nan functions handling of payload strings (BZ16962, CVE-2014-9761)

gentoo/2.23 2016-12-08 05:38:41 UTC 2016-12-08
alpha: fix trunc for big input values

Author: Aurelien Jarno
Author Date: 2016-08-02 07:18:59 UTC

alpha: fix trunc for big input values

The alpha specific version of trunc and truncf always add and subtract
0x1.0p23 or 0x1.0p52 even for big values. This causes this kind of
errors in the testsuite:

  Failure: Test: trunc_towardzero (0x1p107)
  Result:
   is: 1.6225927682921334e+32 0x1.fffffffffffffp+106
   should be: 1.6225927682921336e+32 0x1.0000000000000p+107
   difference: 1.8014398509481984e+16 0x1.0000000000000p+54
   ulp : 0.5000
   max.ulp : 0.0000

Change this by returning the input value when its absolute value is
greater than 0x1.0p23 or 0x1.0p52. NaN have to go through the add and
subtract operations to get possibly silenced.

Finally remove the code to handle inexact exception, trunc should never
generate such an exception.

Changelog:
 * sysdeps/alpha/fpu/s_trunc.c (__trunc): Return the input value
 when its absolute value is greater than 0x1.0p52.
 [_IEEE_FP_INEXACT] Remove.
 * sysdeps/alpha/fpu/s_truncf.c (__truncf): Return the input value
 when its absolute value is greater than 0x1.0p23.
 [_IEEE_FP_INEXACT] Remove.

(cherry picked from commit b74d259fe793499134eb743222cd8dd7c74a31ce)
(cherry picked from commit 3a5aa2ee4ffc515c8e7e615ea38d6b3b20ed0a30)

dj/malloc 2016-11-10 21:08:28 UTC 2016-11-10
Updates to trace2wl

Author: DJ Delorie
Author Date: 2016-11-10 21:08:28 UTC

Updates to trace2wl

* command line option -p to show progress
* command line option -f to use file-based buffers
* reduced memory footprint
* more 32/64-bit fixes

ibm/2.22/master 2016-10-14 20:01:21 UTC 2016-10-14
Merge branch release/2.22/master into ibm/2.22/master

Author: Tulio Magno Quites Machado Filho
Author Date: 2016-10-14 20:01:21 UTC

Merge branch release/2.22/master into ibm/2.22/master

release/2.22/master 2016-10-14 19:57:32 UTC 2016-10-14
powerpc: Sync hwcap.h with kernel

Author: Carlos Eduardo Seo
Author Date: 2016-10-14 19:57:32 UTC

powerpc: Sync hwcap.h with kernel

Linux commit b4b56f9ecab40f3b4ef53e130c9f6663be491894 introduced
a new HWCAP2 bit to indicate that the kernel now aborts a memory
transaction when a syscall is made. This patch adds that bit to
sysdeps/powerpc/bits/hwcap.h.

 * sysdeps/powerpc/bits/hwcap.h: Add PPC_FEATURE2_HTM_NOSC.
 * sysdeps/powerpc/dl-procinfo.c:
 (_dl_powerpc_cap_flags): Added descriptor for this hwcap
 feature so it shows when LD_SHOW_AUXV=1.

(cherry picked from commit 3c13f28c8eac1e5a883d1b3801314430a094fc99)

azanella/aarch64-split-stack 2016-07-28 20:11:06 UTC 2016-07-28
aarch64: Add split-stack TCB field

Author: Adhemerval Zanella
Author Date: 2016-04-25 19:15:49 UTC

aarch64: Add split-stack TCB field

This patch adds a new TCB field meant to be used by GCC split-stack
option. A new symbol, __tcb_private_ss, is also added to version
control the private TCB field.

Checked on aarch64.

 * sysdeps/aarch64/Makefile [$(subdir) == elf] (sysdep-dl-routines):
 Add tcb-version.
 * sysdeps/aarch64/Version [ld] (GLIBC_2.25): Define __tcb_private
 ss;
 * sysdeps/aarch64/nptl/tls.h (tcbhead_t): Add __private_ss field.
 * sysdeps/unix/sysv/linux/aarch64/ld.abilist: Add GLIBC_2.25 and
 __tcb_private_ss.
 * sysdeps/aarch64/tcb-version.c: New file.

hjl/libmvec/master 2016-07-19 20:20:10 UTC 2016-07-19
Don't compile do_test with -mavx/-mavx/-mavx512

Author: H.J. Lu
Author Date: 2016-07-19 20:01:36 UTC

Don't compile do_test with -mavx/-mavx/-mavx512

Don't compile do_test with -mavx, -mavx nor -mavx512 since they won't run
on non-AVX machines.

 [BZ #20384]
 * sysdeps/x86_64/fpu/Makefile (extra-test-objs): Add
 test-double-libmvec-sincos-avx-main.o,
 test-double-libmvec-sincos-avx2-main.o,
 test-double-libmvec-sincos-main.o,
 test-float-libmvec-sincosf-avx-main.o,
 test-float-libmvec-sincosf-avx2-main.o and
 test-float-libmvec-sincosf-main.o.
 test-float-libmvec-sincosf-avx512-main.o.
 ($(objpfx)test-double-libmvec-sincos): Also link with
 $(objpfx)test-double-libmvec-sincos-main.o.
 ($(objpfx)test-double-libmvec-sincos-avx): Also link with
 $(objpfx)test-double-libmvec-sincos-avx-main.o.
 ($(objpfx)test-double-libmvec-sincos-avx2): Also link with
 $(objpfx)test-double-libmvec-sincos-avx2-main.o.
 ($(objpfx)test-float-libmvec-sincosf): Also link with
 $(objpfx)test-float-libmvec-sincosf-main.o.
 ($(objpfx)test-float-libmvec-sincosf-avx): Also link with
 $(objpfx)test-float-libmvec-sincosf-avx2-main.o.
 [$(config-cflags-avx512) == yes] (extra-test-objs): Add
 test-double-libmvec-sincos-avx512-main.o and
 ($(objpfx)test-double-libmvec-sincos-avx512): Also link with
 $(objpfx)test-double-libmvec-sincos-avx512-main.o.
 ($(objpfx)test-float-libmvec-sincosf-avx512): Also link with
 $(objpfx)test-float-libmvec-sincosf-avx512-main.o.
 (CFLAGS-test-double-libmvec-sincos.c): Removed.
 (CFLAGS-test-float-libmvec-sincosf.c): Likewise.
 (CFLAGS-test-double-libmvec-sincos-main.c): New.
 (CFLAGS-test-double-libmvec-sincos-avx-main.c): Likewise.
 (CFLAGS-test-double-libmvec-sincos-avx2-main.c): Likewise.
 (CFLAGS-test-float-libmvec-sincosf-main.c): Likewise.
 (CFLAGS-test-float-libmvec-sincosf-avx-main.c): Likewise.
 (CFLAGS-test-float-libmvec-sincosf-avx2-main.c): Likewise.
 (CFLAGS-test-float-libmvec-sincosf-avx512-main.c): Likewise.
 (CFLAGS-test-double-libmvec-sincos-avx.c): Set to -DREQUIRE_AVX.
 (CFLAGS-test-float-libmvec-sincosf-avx.c ): Likewise.
 (CFLAGS-test-double-libmvec-sincos-avx2.c): Set to
 -DREQUIRE_AVX2.
 (CFLAGS-test-float-libmvec-sincosf-avx2.c ): Likewise.
 (CFLAGS-test-double-libmvec-sincos-avx512.c): Set to
 -DREQUIRE_AVX512F.
 (CFLAGS-test-float-libmvec-sincosf-avx512.c): Likewise.
 * sysdeps/x86_64/fpu/test-double-libmvec-sincos.c: Rewritten.
 * sysdeps/x86_64/fpu/test-float-libmvec-sincosf.c: Likewise.
 * sysdeps/x86_64/fpu/test-double-libmvec-sincos-avx-main.c: New
 file.
 * sysdeps/x86_64/fpu/test-double-libmvec-sincos-avx2-main.c:
 Likewise.
 * sysdeps/x86_64/fpu/test-double-libmvec-sincos-avx512-main.c:
 Likewise.
 * sysdeps/x86_64/fpu/test-double-libmvec-sincos-main.c:
 Likewise.
 * sysdeps/x86_64/fpu/test-float-libmvec-sincosf-avx-main.c:
 Likewise.
 * sysdeps/x86_64/fpu/test-float-libmvec-sincosf-avx2-main.c:
 Likewise.
 * sysdeps/x86_64/fpu/test-float-libmvec-sincosf-avx512-main.c:
 Likewise.
 * sysdeps/x86_64/fpu/test-float-libmvec-sincosf-main.c:
 Likewise.

ibm/2.19/master 2016-07-11 17:16:01 UTC 2016-07-11
Merge branch 'release/2.19/master' into ibm/2.19/master

Author: Tulio Magno Quites Machado Filho
Author Date: 2016-07-11 17:16:01 UTC

Merge branch 'release/2.19/master' into ibm/2.19/master

Conflicts:
 NEWS

hjl/pr20314 2016-06-30 16:45:25 UTC 2016-06-30
Make copies of cstdlib/cmath and use them

Author: H.J. Lu
Author Date: 2016-06-30 13:56:19 UTC

Make copies of cstdlib/cmath and use them

If C++ headers <cstdlib> or <cmath> are used, GCC 6 will include
/usr/include/stdlib.h or /usr/include/math.h from "#include_next"
(instead of stdlib/stdlib.h or math/math.h in the glibc source
directory), and this turns up as a make dependency. An implicit
rule will kick in and make will try to install stdlib/stdlib.h or
math/math.h as /usr/include/stdlib.h or /usr/include/math.h because
the target is out of date. We make a copy of <cstdlib> and <cmath>
in the glibc build directory so that stdlib/stdlib.h and math/math.h
will be used instead of /usr/include/stdlib.h and /usr/include/math.h.

 [BZ #20314]
 * Makeconfig (CXXFLAGS): Prepend -I$(common-objpfx).
 * Makerules (before-compile): Add $(common-objpfx)cstdlib and
 $(common-objpfx)cmath.
 ($(common-objpfx)cstdlib): New target.
 ($(common-objpfx)cmath): Likewise.

hjl/pr18645 2016-06-30 03:00:39 UTC 2016-06-30
Compile tst-cleanupx4 test with -fexceptions

Author: H.J. Lu
Author Date: 2016-06-01 21:11:16 UTC

Compile tst-cleanupx4 test with -fexceptions

tst-cleanupx4 is linked with tst-cleanupx4.o and tst-cleanup4aux.o.
Since tst-cleanupx4.o is compiled from tst-cleanup4.c with -fexceptions,
tst-cleanup4aux.c should also be compiled with -fexceptions.

Tested on x86-64 and i686.

 [BZ 18645]
 * nptl/Makefile (extra-test-objs): Add tst-cleanupx4aux.o.
 (test-extras): Add tst-cleanupx4aux.
 (CFLAGS-tst-cleanupx4aux.c): New. Set to -fexceptions.
 ($(objpfx)tst-cleanupx4): Replace tst-cleanup4aux.o with
 tst-cleanupx4aux.o.
 * nptl/tst-cleanupx4aux.c: New file.

hjl/pr20139/master 2016-06-29 21:42:06 UTC 2016-06-29
Require binutils 2.24 to build x86-64 glibc

Author: H.J. Lu
Author Date: 2016-06-29 19:37:06 UTC

Require binutils 2.24 to build x86-64 glibc

If assembler doesn't support AVX512DQ, _dl_runtime_resolve_avx is used
to save the first 8 vector registers, which only saves the lower 256
bits of vector register, for lazy binding. When it is called on AVX512
platform, the upper 256 bits of ZMM registers are clobbered. Parameters
passed in ZMM registers will be wrong when the function is called the
first time. This patch requires binutils 2.24, whose assembler can store
and load ZMM registers, to build x86-64 glibc. Since mathvec library
needs assembler support for AVX512DQ, we disable mathvec if assembler
doesn't support AVX512DQ.

 [BZ #20139]
 * config.h.in (HAVE_AVX512_ASM_SUPPORT): Renamed to ...
 (HAVE_AVX512DQ_ASM_SUPPORT): This.
 * sysdeps/x86_64/configure.ac: Require assembler from binutils
 2.24 or above.
 (HAVE_AVX512_ASM_SUPPORT): Removed.
 (HAVE_AVX512DQ_ASM_SUPPORT): New.
 * sysdeps/x86_64/configure: Regenerated.
 * sysdeps/x86_64/dl-trampoline.S: Make HAVE_AVX512_ASM_SUPPORT
 check unconditional.
 * sysdeps/x86_64/multiarch/ifunc-impl-list.c: Likewise.
 * sysdeps/x86_64/multiarch/memcpy.S: Likewise.
 * sysdeps/x86_64/multiarch/memcpy_chk.S: Likewise.
 * sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S:
 Likewise.
 * sysdeps/x86_64/multiarch/memmove-avx512-unaligned-erms.S:
 Likewise.
 * sysdeps/x86_64/multiarch/memmove.S: Likewise.
 * sysdeps/x86_64/multiarch/memmove_chk.S: Likewise.
 * sysdeps/x86_64/multiarch/mempcpy.S: Likewise.
 * sysdeps/x86_64/multiarch/mempcpy_chk.S: Likewise.
 * sysdeps/x86_64/multiarch/memset-avx512-no-vzeroupper.S:
 Likewise.
 * sysdeps/x86_64/multiarch/memset-avx512-unaligned-erms.S:
 Likewise.
 * sysdeps/x86_64/multiarch/memset.S: Likewise.
 * sysdeps/x86_64/multiarch/memset_chk.S: Likewise.
 * sysdeps/x86_64/fpu/multiarch/svml_d_cos8_core_avx512.S: Check
 HAVE_AVX512DQ_ASM_SUPPORT instead of HAVE_AVX512_ASM_SUPPORT.
 * sysdeps/x86_64/fpu/multiarch/svml_d_exp8_core_avx512.S:
 Likewise.
 * sysdeps/x86_64/fpu/multiarch/svml_d_log8_core_avx512.S:
 Likewise.
 * sysdeps/x86_64/fpu/multiarch/svml_d_pow8_core_avx512.S:
 Likewise.
 * sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core_avx512.S:
 Likewise.
 * sysdeps/x86_64/fpu/multiarch/svml_d_sincos8_core_avx512.:
 Likewise.
 * sysdeps/x86_64/fpu/multiarch/svml_s_cosf16_core_avx512.S:
 Likewise.
 * sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core_avx512.S:
 Likewise.
 * sysdeps/x86_64/fpu/multiarch/svml_s_logf16_core_avx512.S:
 Likewise.
 * sysdeps/x86_64/fpu/multiarch/svml_s_powf16_core_avx512.S:
 Likewise.
 * sysdeps/x86_64/fpu/multiarch/svml_s_sincosf16_core_avx51:
 Likewise.
 * sysdeps/x86_64/fpu/multiarch/svml_s_sinf16_core_avx512.S:
 Likewise.

hjl/pr20309/master 2016-06-29 14:38:22 UTC 2016-06-29
X86-64: Properly align stack in _dl_tlsdesc_dynamic

Author: H.J. Lu
Author Date: 2016-06-29 11:01:58 UTC

X86-64: Properly align stack in _dl_tlsdesc_dynamic

Since _dl_tlsdesc_dynamic is called via PLT, we need to add 8 bytes for
push in the PLT entry to align the stack.

 [BZ #20309]
 * configure.ac (have-mtls-dialect-gnu2): Set to yes if
 -mtls-dialect=gnu2 works.
 * configure: Regenerated.
 * elf/Makefile [have-mtls-dialect-gnu2 = yes]
 (tests): Add tst-gnu2-tls1.
 (modules-names): Add tst-gnu2-tls1mod.
 ($(objpfx)tst-gnu2-tls1): New.
 (tst-gnu2-tls1mod.so-no-z-defs): Likewise.
 (CFLAGS-tst-gnu2-tls1mod.c): Likewise.
 * elf/tst-gnu2-tls1.c: New file.
 * elf/tst-gnu2-tls1mod.c: Likewise.
 * sysdeps/x86_64/dl-tlsdesc.S (_dl_tlsdesc_dynamic): Add 8
 bytes for push in the PLT entry to align the stack.

hjl/benchtests/wall-time 2016-06-21 18:31:45 UTC 2016-06-21
Force to use clock_gettime

Author: H.J. Lu
Author Date: 2016-06-21 18:31:45 UTC

Force to use clock_gettime

hjl/erms/2.23 2016-06-06 20:34:29 UTC 2016-06-06
Count number of logical processors sharing L2 cache

Author: H.J. Lu
Author Date: 2016-05-27 22:16:22 UTC

Count number of logical processors sharing L2 cache

For Intel processors, when there are both L2 and L3 caches, SMT level
type should be ued to count number of available logical processors
sharing L2 cache. If there is only L2 cache, core level type should
be used to count number of available logical processors sharing L2
cache. Number of available logical processors sharing L2 cache should
be used for non-inclusive L2 and L3 caches.

 * sysdeps/x86/cacheinfo.c (init_cacheinfo): Count number of
 available logical processors with SMT level type sharing L2
 cache for Intel processors.

hjl/erms/2.22 2016-06-06 20:23:12 UTC 2016-06-06
Count number of logical processors sharing L2 cache

Author: H.J. Lu
Author Date: 2016-05-27 22:16:22 UTC

Count number of logical processors sharing L2 cache

For Intel processors, when there are both L2 and L3 caches, SMT level
type should be ued to count number of available logical processors
sharing L2 cache. If there is only L2 cache, core level type should
be used to count number of available logical processors sharing L2
cache. Number of available logical processors sharing L2 cache should
be used for non-inclusive L2 and L3 caches.

 * sysdeps/x86/cacheinfo.c (init_cacheinfo): Count number of
 available logical processors with SMT level type sharing L2
 cache for Intel processors.

hjl/erms/ifunc 2016-05-25 17:10:45 UTC 2016-05-25
X86-64: Add dummy memcopy.h and wordcopy.c

Author: H.J. Lu
Author Date: 2016-04-01 21:01:24 UTC

X86-64: Add dummy memcopy.h and wordcopy.c

Since x86-64 doesn't use memory copy functions, add dummy memcopy.h and
wordcopy.c to reduce code size. It reduces the size of libc.so by about
1 KB.

 * sysdeps/x86_64/memcopy.h: New file.
 * sysdeps/x86_64/wordcopy.c: Likewise.

ibm/2.20/master 2016-05-25 13:04:06 UTC 2016-05-25
Merge release/2.20/master into ibm/2.20/master

Author: Gabriel F. T. Gomes
Author Date: 2016-05-25 13:04:06 UTC

Merge release/2.20/master into ibm/2.20/master

Conflicts:
 NEWS

release/2.20/master 2016-05-24 21:08:55 UTC 2016-05-24
CVE-2016-3075: Stack overflow in _nss_dns_getnetbyname_r [BZ #19879]

Author: Florian Weimer
Author Date: 2016-03-29 10:57:56 UTC

CVE-2016-3075: Stack overflow in _nss_dns_getnetbyname_r [BZ #19879]

The defensive copy is not needed because the name may not alias the
output buffer.

(cherry picked from commit 317b199b4aff8cfa27f2302ab404d2bb5032b9a4)
(cherry picked from commit f5b3338d70a7a2c626331ac4589b6deb2f610432)

hjl/cache/master 2016-05-20 21:57:00 UTC 2016-05-20
Count number of logical processors sharing L2 cache

Author: H.J. Lu
Author Date: 2016-05-13 20:26:37 UTC

Count number of logical processors sharing L2 cache

For Intel processors, when there are both L2 and L3 caches, SMT level
type should be ued to count number of available logical processors
sharing L2 cache. If there is only L2 cache, core level type should
be used to count number of available logical processors sharing L2
cache. Number of available logical processors sharing L2 cache should
be used for non-inclusive L2 and L3 caches.

 * sysdeps/x86/cacheinfo.c (init_cacheinfo): Count number of
 available logical processors with SMT level type sharing L2
 cache for Intel processors.

hjl/benchtests/memset 2016-05-20 19:10:57 UTC 2016-05-20
Skip simple and builtin memory implementations

Author: H.J. Lu
Author Date: 2016-04-07 15:27:12 UTC

Skip simple and builtin memory implementations

hjl/ld.so/master 2016-05-14 16:19:01 UTC 2016-05-14
X86: Add cache info to _dl_x86_cpu_features

Author: H.J. Lu
Author Date: 2016-05-10 12:42:49 UTC

X86: Add cache info to _dl_x86_cpu_features

This patch adds cache info to _dl_x86_cpu_features to allow a processor
to override cache info derived from CPUID.

Tested on x86 and x86-64.

 * sysdeps/x86/cacheinfo.c: Skip if not in libc.
 (init_cacheinfo): Use raw_data_size, raw_shared_size and
 shared_non_temporal_threshold from _dl_x86_cpu_features if
 not zero.
 * sysdeps/x86/cpu-features.h (cache_info): New.
 (cpu_features): Add cache.

release/2.21/master 2016-05-09 13:03:50 UTC 2016-05-09
Suppress GCC 6 warning about ambiguous 'else' with -Wparentheses

Author: Yvan Roux
Author Date: 2016-04-15 11:29:26 UTC

Suppress GCC 6 warning about ambiguous 'else' with -Wparentheses

Backport of df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c.

 * stdlib/setenv.c (unsetenv): Fix ambiguous 'else'.
 * nis/nis_call.c (nis_server_cache_add): Likewise.

hjl/benchtests/master 2016-05-08 16:10:50 UTC 2016-05-08
Clear destination buffer updated by the previous run

Author: H.J. Lu
Author Date: 2016-04-04 16:38:30 UTC

Clear destination buffer updated by the previous run

Clear the destination buffer updated by the previous run in bench-memcpy.c
and test-memcpy.c to catch the error when the following implementations do
not copy anything.

 PR string/19907
 * benchtests/bench-memcpy.c (do_one_test): Clear the destination
 buffer updated by the previous run.
 * string/test-memcpy.c (do_one_test): Likewise.
 * benchtests/bench-memmove.c (do_one_test): Add a comment.
 * string/test-memmove.c (do_one_test): Likewise.

hjl/2.17/memset 2016-05-05 13:29:28 UTC 2016-05-05
Faster memset on x64

Author: Ondrej Bilka
Author Date: 2013-05-20 06:26:00 UTC

Faster memset on x64

This implementation speed up memset in several ways. First is
avoiding expensive computed jump. Second is using fact that arguments
of memset are most of time aligned to 8 bytes.

Benchmark results on:

kam.mff.cuni.cz/~ondra/benchmark_string/memset_profile_result27_04_13.tar.bz2

(cherry picked from commit b2b671b677d92429a3d41bf451668f476aa267ed)

hjl/cacheline/ifunc 2016-04-25 15:32:09 UTC 2016-04-25
X86-64: Add dummy memcopy.h and wordcopy.c

Author: H.J. Lu
Author Date: 2016-04-01 21:01:24 UTC

X86-64: Add dummy memcopy.h and wordcopy.c

Since x86-64 doesn't use memory copy functions, add dummy memcopy.h and
wordcopy.c to reduce code size. It reduces the size of libc.so by about
1 KB.

 * sysdeps/x86_64/memcopy.h: New file.
 * sysdeps/x86_64/wordcopy.c: Likewise.

hjl/cacheline/master 2016-04-25 15:13:42 UTC 2016-04-25
Skip simple and builtin memory implementations

Author: H.J. Lu
Author Date: 2016-04-07 15:27:12 UTC

Skip simple and builtin memory implementations

hjl/erms/nt 2016-04-25 11:57:38 UTC 2016-04-25
Skip simple and builtin memory implementations

Author: H.J. Lu
Author Date: 2016-04-07 15:27:12 UTC

Skip simple and builtin memory implementations

fw/extend_alloca 2016-04-25 04:19:31 UTC 2016-04-25
Remove macros extend_alloca, extend_alloca_account [BZ #18023]

Author: Florian Weimer
Author Date: 2015-03-01 22:22:45 UTC

Remove macros extend_alloca, extend_alloca_account [BZ #18023]

And also the helper macro stackinfo_alloca_round.

extend_alloca simply does not work on x86_64 and current i386 because
its peculiar stack alignment rules.

Here's an analysis of the _dl_fini situation (before the removal of
extend_alloca).

Dump of assembler code for function _dl_fini:
<+0>: push %rbp
<+1>: mov %rsp,%rbp
<+4>: push %r15
<+6>: push %r14
<+8>: push %r13
<+10>: push %r12
<+12>: push %rbx
<+13>: sub $0x38,%rsp

The function pushes 6 registers on the stack and allocates 0x38 bytes,
which means that %rsp is a multiple of 16 after function prologue.

The initial alloca allocation does not change %rsp alignment:

<+210>: shr $0x4,%rcx
<+214>: shl $0x4,%rcx
<+218>: sub %rcx,%rsp

%r15 is the address of the previous stack allocation, it is used below.

This is the extend_alloca reallocation branch:

<+734>: add $0xf,%rdx
<+738>: and $0xfffffffffffffff0,%rdx
<+742>: lea 0x1e(%rdx),%rcx
<+746>: shr $0x4,%rcx
<+750>: shl $0x4,%rcx
<+754>: sub %rcx,%rsp
<+757>: lea 0xf(%rsp),%rcx
<+762>: and $0xfffffffffffffff0,%rcx
<+766>: lea (%rcx,%rdx,1),%rsi
<+770>: cmp %rsi,%r15
<+773>: je 0x7f963940b673 <_dl_fini+787>
<+775>: mov %rdx,-0x58(%rbp)
<+787>: add %rdx,-0x58(%rbp)

(a) %rdx, the new requested size, is rounded up to a multiple of 16
(+734, %+738), and the result is stored in %rdx@738.

(b) %rdx@738 + 31 is rounded down to a multiple of 16, the result is
stored in rcx@750 (+742, +746, +750). So %rcx@750 == %rdx@738 + 16.

(c) %rcx@750 bytes are allocated on the stack (+754). %rsp is rounded
upwards to a multiple of 16, result is stored in %rcx@762 (+757, +762).
This does not change the value of %rsp because it already was a multiple
of 16.

(d) %rsi@766 == %rcx@762 + %rdx@738 is compared against %r15. But this
comparison is always false because we allocated 16 extra bytes on the
stack in (b), which were reserved for the alignment in (c), but in fact
unused. We are left with a gap in stack usage, and the comparison is
always false.

(@XXX refers to register values after executing the instruction at
offset +XXX.)

If the alignment gap was actually used because of different alignment
for %rsp, then the comparison failure would still occur because the gap
would not have been added after this reallocation, but before the
previous allocation.

As a result, extend_alloca is never able to merge allocations. It also
turns out that the interface is difficult to use, especially in
cojunction with alloca account (which is rarely optional).

 [BZ #18023]
 * include/alloca.h (stackinfo_alloca_round, extend_alloca,
 extend_alloca_account): Remove.

release/2.18/master 2016-04-22 19:53:46 UTC 2016-04-22
resolv: Always set *resplen2 out parameter in send_dg [BZ #19791]

Author: Florian Weimer
Author Date: 2016-04-22 15:38:15 UTC

resolv: Always set *resplen2 out parameter in send_dg [BZ #19791]

Since commit 44d20bca52ace85850012b0ead37b360e3ecd96e (Implement
second fallback mode for DNS requests), there is a code path which
returns early, before *resplen2 is initialized. This happens if the
name server address is immediately recognized as invalid (because of
lack of protocol support, or if it is a broadcast address such
255.255.255.255, or another invalid address).

If this happens and *resplen2 was non-zero (which is the case if a
previous query resulted in a failure), __libc_res_nquery would reuse
an existing second answer buffer. This answer has been previously
identified as unusable (for example, it could be an NXDOMAIN
response). Due to the presence of a second answer, no name server
switching will occur. The result is a name resolution failure,
although a successful resolution would have been possible if name
servers have been switched and queries had proceeded along the search
path.

The above paragraph still simplifies the situation. Before glibc
2.23, if the second answer needed malloc, the stub resolver would
still attempt to reuse the second answer, but this is not possible
because __libc_res_nsearch has freed it, after the unsuccessful call
to __libc_res_nquerydomain, and set the buffer pointer to NULL. This
eventually leads to an assertion failure in __libc_res_nquery:

 /* Make sure both hp and hp2 are defined */
 assert((hp != NULL) && (hp2 != NULL));

If assertions are disabled, the consequence is a NULL pointer
dereference on the next line.

Starting with glibc 2.23, as a result of commit
e9db92d3acfe1822d56d11abcea5bfc4c41cf6ca (CVE-2015-7547: getaddrinfo()
stack-based buffer overflow (Bug 18665)), the second answer is always
allocated with malloc. This means that the assertion failure happens
with small responses as well because there is no buffer to reuse, as
soon as there is a name resolution failure which triggers a search for
an answer along the search path.

This commit addresses the issue by ensuring that *resplen2 is
initialized before the send_dg function returns.

This commit also addresses a bug where an invalid second reply is
incorrectly returned as a valid to the caller.

(cherry picked from commit b66d837bb5398795c6b0f651bd5a5d66091d8577)

ibm/2.18/master 2016-04-20 14:18:20 UTC 2016-04-20
NEWS: Add 18665 and 19791 to fixed bug list.

Author: Paul E. Murphy
Author Date: 2016-04-20 14:18:20 UTC

NEWS: Add 18665 and 19791 to fixed bug list.

gentoo/2.22 2016-04-10 00:13:40 UTC 2016-04-10
configure: fix `test ==` usage

Author: Mike Frysinger
Author Date: 2016-04-10 00:02:48 UTC

configure: fix `test ==` usage

POSIX defines the = operator, but not ==. Fix the few places where we
incorrectly used ==.

(cherry picked from commit b2d4456b333970ab4cb01ed8045b9a8d2c4832f3)
(cherry picked from commit e2c17de539da301c96afa4181347c63eb94d99b1)

1100 of 266 results

Other repositories

Name Last Modified
lp:glibc 3 hours ago
11 of 1 result
You can't create new repositories for GLibC.