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

Branches

Name Last Modified Last Commit
release/2.29/master 2019-09-20 19:30:04 UTC 2019-09-20
Fix RISC-V vfork build with Linux 5.3 kernel headers.

Author: Joseph Myers
Author Date: 2019-09-18 13:22:24 UTC

Fix RISC-V vfork build with Linux 5.3 kernel headers.

Building glibc for RISC-V with Linux 5.3 kernel headers fails because
<linux/sched.h>, included in vfork.S for CLONE_* constants, contains a
structure definition not safe for inclusion in assembly code.

All other architectures already avoid use of that header in vfork.S,
either defining the CLONE_* constants locally or embedding the
required values directly in the relevant instruction, where they
implement vfork using the clone syscall (see the implementations for
aarch64, ia64, mips and nios2). This patch makes the RISC-V version
define the constants locally like the other architectures.

Tested build for all three RISC-V configurations in
build-many-glibcs.py with Linux 5.3 headers.

 * sysdeps/unix/sysv/linux/riscv/vfork.S: Do not include
 <linux/sched.h>.
 (CLONE_VM): New macro.
 (CLONE_VFORK): Likewise.

(cherry picked from commit 8cacbcf4a984ccac24efedb795d9c8a7f149d17b)

release/2.30/master 2019-09-20 19:28:34 UTC 2019-09-20
Fix RISC-V vfork build with Linux 5.3 kernel headers.

Author: Joseph Myers
Author Date: 2019-09-18 13:22:24 UTC

Fix RISC-V vfork build with Linux 5.3 kernel headers.

Building glibc for RISC-V with Linux 5.3 kernel headers fails because
<linux/sched.h>, included in vfork.S for CLONE_* constants, contains a
structure definition not safe for inclusion in assembly code.

All other architectures already avoid use of that header in vfork.S,
either defining the CLONE_* constants locally or embedding the
required values directly in the relevant instruction, where they
implement vfork using the clone syscall (see the implementations for
aarch64, ia64, mips and nios2). This patch makes the RISC-V version
define the constants locally like the other architectures.

Tested build for all three RISC-V configurations in
build-many-glibcs.py with Linux 5.3 headers.

 * sysdeps/unix/sysv/linux/riscv/vfork.S: Do not include
 <linux/sched.h>.
 (CLONE_VM): New macro.
 (CLONE_VFORK): Likewise.

(cherry picked from commit 8cacbcf4a984ccac24efedb795d9c8a7f149d17b)

master 2019-09-20 18:46:52 UTC 2019-09-20
Script to generate ChangeLog-like output from git log

Author: Siddhesh Poyarekar
Author Date: 2019-09-20 18:36:55 UTC

Script to generate ChangeLog-like output from git log

Co-authored-by: Gabriel F. T. Gomes <gabriel@inconstante.net.br>
Reviewed-by: Gabriel F. T. Gomes <gabriel@inconstante.net.br>
Reviewed-by: Joseph Myers <joseph@codesourcery.com>

The utility of a ChangeLog file has been discussed in various mailing
list threads and GNU Tools Cauldrons in the past years and the general
consensus is that while the file may have been very useful in the past
when revision control did not exist or was not as powerful as it is
today, it's current utility is fast diminishing. Further, the
ChangeLog format gets in the way of modernisation of processes since
it almost always results in rewriting of a commit, thus preventing use
of any code review tools to automatically manage patches in the glibc
project.

There is consensus in the glibc community that documentation of why a
change was done (i.e. a detailed description in a git commit) is more
useful than what changed (i.e. a ChangeLog entry) since the latter can
be deduced from the patch. The GNU community would however like to
keep the option of ascertaining what changed through a ChangeLog-like
output and as a compromise, it was proposed that a script be developed
that generates this output.

The script below is the result of these discussions. This script
takes two git revisions references as input and generates the git log
between those revisions in a form that resembles a ChangeLog. Its
capabilities and limitations are listed in a comment in the script.
On a high level it is capable of parsing C code and telling what
changed at the top level, but not within constructs such as functions.

Design
------

At a high level, the script analyses the raw output of a VCS, parses
the source files that have changed and attempts to determine what
changed. The script driver needs three distinct components to be
fully functional for a repository:

- A vcstocl_quirks.py file that helps it parse weird patterns in
  sources that may result from preprocessor defines.
- A VCS plugin backend; the git backend is implemented for glibc
- A programming language parser plugin. C is currently implemented.

Additional programming language parsers can be added to give more
detailed output for changes in those types of files.

For input in languages other than those that have a parser, the script
only identifies if a file has been added, removed, modified,
permissions changed, etc. but cannot understand the change in content.

The C Parser
------------

The C parser is capable of parsing C programs with preprocessor macros
in place, as if they were part of the language. This presents some
challenges with parsing code that expands macros on the fly and to
help work around that, a vcstocl_quirks.py file has transformations to
ease things.

The C parser currently can identify macro definitions and scopes and
all global and static declarations and definitions. It cannot parse
(and compare) changes inside functions yet, it could be a future
enhancement if the need for it arises.

Testing
-------

The script has been tested with the glibc repository up to glibc-2.29
and also in the past with emacs. While it would be ideal to have
something like this in a repository like gnulib, that should not be a
bottleneck for glibc to start using this, so this patch proposes to
add these scripts into glibc.

And here is (hopefully!) one of the last ChangeLog entries we'd have
to write for glibc:

 * scripts/gitlog_to_changelog.py: New script to auto-generate
 ChangeLog.
 * scripts/vcs_to_changelog/frontend_c.py: New file.
 * scripts/vcs_to_changelog/misc_util.py: New file.
 * scripts/vcs_to_changelog/vcs_git.py: New file.
 * scripts/vcs_to_changelog/vcstocl_quirks.py: Likewise.

release/2.26/master 2019-09-13 15:41:34 UTC 2019-09-13
Improve performance of memmem

Author: Wilco Dijkstra
Author Date: 2019-06-12 10:42:34 UTC

Improve performance of memmem

This patch significantly improves performance of memmem using a novel
modified Horspool algorithm. Needles up to size 256 use a bad-character
table indexed by hashed pairs of characters to quickly skip past mismatches.
Long needles use a self-adapting filtering step to avoid comparing the whole
needle repeatedly.

By limiting the needle length to 256, the shift table only requires 8 bits
per entry, lowering preprocessing overhead and minimizing cache effects.
This limit also implies worst-case performance is linear.

Small needles up to size 2 use a dedicated linear search. Very long needles
use the Two-Way algorithm (to avoid increasing stack size or slowing down
the common case, inlining is disabled).

The performance gain is 6.6 times on English text on AArch64 using random
needles with average size 8.

Tested against GLIBC testsuite and randomized tests.

Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>

 * string/memmem.c (__memmem): Rewrite to improve performance.

(cherry picked from commit 680942b0167715e123d934b609060cd382f8e39f)

release/2.27/master 2019-09-13 15:35:12 UTC 2019-09-13
Add undef to fix test failure.

Author: Wilco Dijkstra
Author Date: 2019-09-13 15:35:12 UTC

Add undef to fix test failure.

release/2.28/master 2019-09-13 14:19:26 UTC 2019-09-13
Improve performance of memmem

Author: Wilco Dijkstra
Author Date: 2019-06-12 10:42:34 UTC

Improve performance of memmem

This patch significantly improves performance of memmem using a novel
modified Horspool algorithm. Needles up to size 256 use a bad-character
table indexed by hashed pairs of characters to quickly skip past mismatches.
Long needles use a self-adapting filtering step to avoid comparing the whole
needle repeatedly.

By limiting the needle length to 256, the shift table only requires 8 bits
per entry, lowering preprocessing overhead and minimizing cache effects.
This limit also implies worst-case performance is linear.

Small needles up to size 2 use a dedicated linear search. Very long needles
use the Two-Way algorithm (to avoid increasing stack size or slowing down
the common case, inlining is disabled).

The performance gain is 6.6 times on English text on AArch64 using random
needles with average size 8.

Tested against GLIBC testsuite and randomized tests.

Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>

 * string/memmem.c (__memmem): Rewrite to improve performance.

(cherry picked from commit 680942b0167715e123d934b609060cd382f8e39f)

google/grte/v5-2.27/master 2019-09-11 21:53:28 UTC 2019-09-11
Redesign the fastload support for additional performance

Author: Ambrose Feinstein
Author Date: 2019-09-11 21:53:28 UTC

Redesign the fastload support for additional performance

azanella/y2038-preliminaries 2019-09-09 20:48:28 UTC 2019-09-09
Revise the documentation of simple calendar time.

Author: Zack Weinberg
Author Date: 2019-08-19 14:31:07 UTC

Revise the documentation of simple calendar time.

This is a thorough revision of all the material relating to the
functions time, stime, gettimeofday, settimeofday, clock_gettime,
clock_getres, clock_settime, and difftime, spilling over into the
discussion of time-related data types (which now get their own
section) and touching the adjtime family as well (which deserves its
own thorough revision, but I'd have to do a bunch of research first).

Substantive changes are:

 * Document clock_gettime, clock_getres, and clock_settime. (Only
   CLOCK_REALTIME and CLOCK_MONOTONIC are documented; the others are
   either a bit too Linux-specific, or have more to do with measuring
   CPU/processor time. That section _also_ deserves its own thorough
   revision but again I'd have to do a bunch of research first.)

 * Present gettimeofday, settimeofday, and struct timeval as obsolete
   relative to clock_*.

 * Remove the documentation of struct timezone. Matching POSIX,
   say that the type of the second argument to gettimeofday and
   settimeofday is [const] void *.

 * Clarify ISO C and POSIX's requirements on time_t. Clarify the
   circumstances under which difftime is equivalent to simple
   subtraction.

 * Consolidate documentation of most of the time-related data types
   into a new section "Time Types," right after "Time Basics." (The
   exceptions are struct tm, which stays in "Broken-down Time," and
   struct times, which stays in "Processor And CPU Time."

 * The "Elapsed Time" section is now called "Calculating Elapsed Time"
   and includes only difftime and the discussion of how to compute
   timeval differences by hand.

 * Fold the "Simple Calendar Time," "High Resolution Calendar," and
   "High Accuracy Clock" sections together into two new sections titled
   "Getting the Time" and "Setting and Adjusting the Time."

ChangeLog:
 * manual/time.texi: Major revision of text related to simple
 calendar time. clock_gettime, clock_getres, and clock_settime
 are now documented.
 * manual/filesys.texi, manual/llio.texi, manual/threads.texi:
 Update cross-references to renamed sections in time.texi.

zack/y2038-preliminaries 2019-08-28 13:02:34 UTC 2019-08-28
Revise the documentation of simple calendar time.

Author: Zack Weinberg
Author Date: 2019-08-19 14:31:07 UTC

Revise the documentation of simple calendar time.

This is a thorough revision of all the material relating to the
functions time, stime, gettimeofday, settimeofday, clock_gettime,
clock_getres, clock_settime, and difftime, spilling over into the
discussion of time-related data types (which now get their own
section) and touching the adjtime family as well (which deserves its
own thorough revision, but I'd have to do a bunch of research first).

Substantive changes are:

 * Document clock_gettime, clock_getres, and clock_settime. (Only
   CLOCK_REALTIME and CLOCK_MONOTONIC are documented; the others are
   either a bit too Linux-specific, or have more to do with measuring
   CPU/processor time. That section _also_ deserves its own thorough
   revision but again I'd have to do a bunch of research first.)

 * Present gettimeofday, settimeofday, and struct timeval as obsolete
   relative to clock_*.

 * Remove the documentation of struct timezone. Matching POSIX,
   say that the type of the second argument to gettimeofday and
   settimeofday is [const] void *.

 * Clarify ISO C and POSIX's requirements on time_t. Clarify the
   circumstances under which difftime is equivalent to simple
   subtraction.

 * Consolidate documentation of most of the time-related data types
   into a new section "Time Types," right after "Time Basics." (The
   exceptions are struct tm, which stays in "Broken-down Time," and
   struct times, which stays in "Processor And CPU Time."

 * The "Elapsed Time" section is now called "Calculating Elapsed Time"
   and includes only difftime and the discussion of how to compute
   timeval differences by hand.

 * Fold the "Simple Calendar Time," "High Resolution Calendar," and
   "High Accuracy Clock" sections together into two new sections titled
   "Getting the Time" and "Setting and Adjusting the Time."

ChangeLog:
 * manual/time.texi: Major revision of text related to simple
 calendar time. clock_gettime, clock_getres, and clock_settime
 are now documented.
 * manual/filesys.texi, manual/llio.texi, manual/threads.texi:
 Update cross-references to renamed sections in time.texi.

azanella/bz18231 2019-08-27 20:50:00 UTC 2019-08-27
sysvipc: Set ipc_perm mode as mode_t (BZ#18231)

Author: Adhemerval Zanella
Author Date: 2019-07-22 12:36:09 UTC

sysvipc: Set ipc_perm mode as mode_t (BZ#18231)

This patch sets the mode field in ipc_perm as mode_t for all architectures,
as POSIX specification [1]. The changes required are as follow:

  1. It moves the ipc_perm definition out of ipc.h to its own header
     ipc_perm.h. It also allows consolidate the IPC_* definition on
     only one header.

  2. The generic implementation follow the kernel ipc64_perm size so the
     syscall can be made directly without temporary buffer copy. However,
     since glibc defines the MODE field as mode_t, it omits the __PAD1 field
     (since glibc does not export mode_t as 16-bit for any architecture).

     It is a two-fold improvement:

     2.1. New implementation which follow Linux UAPI will not need to
   provide an arch-specific ipc-perm.h header neither wrongly
          use the wrong 16-bit definition from previous default ipc.h
   (as csky did).

     2.1. It allows consolidate ipc_perm definition for architectures that
          already provide mode_t as 32-bit.

  3. All kernel ABIs for the supported architectures already provides the
     expected padding for mode type extension to 32-bit. However, some
     architectures the padding has the wrong placement, so it requires
     the ipc control routines (msgctl, semctl, and shmctl) to adjust the
     mode field accordingly. Currently they are armeb, microblaze, m68k,
     s390, and sheb.

     A new assume is added, __ASSUME_SYSVIPC_SUPPORT_MODE32, which the
     required architecture undefine.

  4. For the architecture that undefined __ASSUME_SYSVIPC_SUPPORT_MODE32,
     it also requires compat symbols that do not adjust the mode field.

Checked on arm-linux-gnueabihf, aarch64-linux-gnu, powerpc64le-linux-gnu,
and x86_64-linux-gnu. I also checked the sysvipc tests on hppa-linux-gnu,
sh4-linux-gnu, s390x-linux-gnu, and s390-linux-gnu.

 [BZ #18231]
 * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add
 bits/ipc-perm.h.
 * sysdeps/unix/sysv/linux/aarch64/bits/ipc.h: Remove file.
 * sysdeps/unix/sysv/linux/alpha/bits/ipc.h: Likewise.
 * sysdeps/unix/sysv/linux/hppa/bits/ipc.h: Likewise.
 * sysdeps/unix/sysv/linux/ia64/bits/ipc.h: Likewise.
 * sysdeps/unix/sysv/linux/mips/bits/ipc.h: Likewise.
 * sysdeps/unix/sysv/linux/powerpc/bits/ipc.h: Likewise.
 * sysdeps/unix/sysv/linux/s390/bits/ipc.h: Likewise.
 * sysdeps/unix/sysv/linux/sparc/bits/ipc.h: Likewise.
 * sysdeps/unix/sysv/linux/arm/kernel-features.h
 [__BYTE_ORDER == __BIG_ENDIAN] (__ASSUME_SYSVIPC_SUPPORT_MODE32):
 Undefine.
 * sysdeps/sysv/linux/microblaze/kernel-features.h: Likewise.
 * sysdeps/unix/sysv/linux/s390/kernel-features.h
 [!__s390x__] (__ASSUME_SYSVIPC_SUPPORT_MODE32): Define.
 * sysdeps/unix/sysv/linux/sh/kernel-features.h
 (__ASSUME_SYSVIPC_SUPPORT_MODE32): Define.
 * sysdeps/unix/sysv/linux/m68k/kernel-features.h: Likewise.
 * sysdeps/unix/sysv/linux/bits/ipc-perm.h: New file.
 * sysdeps/unix/sysv/linux/powerpc/bits/ipc-perm.h: Likewise.
 * sysdeps/unix/sysv/linux/sparc/bits/ipc-perm.h: Likewise.
 * sysdeps/unix/sysv/linux/bits/ipc.h (ipc_perm): Move to
 bits/ipc-perm.h.
 * sysdeps/unix/sysv/linux/hppa/bits/ipc-perm.h: New file.
 * sysdeps/unix/sysv/linux/kernel-features.h
 (__ASSUME_SYSVIPC_SUPPORT_MODE32): Define.
 * sysdeps/unix/sysv/linux/msgctl.c (DEFAULT_VERSION): Define as
 2.30 if __ASSUME_SYSVIPC_SUPPORT_MODE32 is not defined.
 (msgctl_syscall, __msgctl_mode16): New symbol.
 (__new_msgctl): Handle if __ASSUME_SYSVIPC_SUPPORT_MODE32 is not
 defined.
 * sysdeps/unix/sysv/linux/semctl.c: Likewise.
 * sysdeps/unix/sysv/linux/shmctl.c: Likewise.
 * sysdeps/unix/sysv/linux/arm/be/libc.abilist (GLIBC_2.30): Add
 msgctl, semctl, and shmctl.
 * sysdeps/sysv/linux/microblaze/be/libc.abilist: Likewise.
 * conform/data/sys/ipc.h-data: Only xfail {struct ipc_perm} mode_t
 mode for Hurd.
 * sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist: Likewise.
 * sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist: Likewise.
 * sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist: Likewise.
 * sysdeps/unix/sysv/linux/sh/be/libc.abilist: Likewise.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_ipc.h.html

azanella/bz12683 2019-08-19 20:34:34 UTC 2019-08-19
Remove sysdep-cancel header

Author: Adhemerval Zanella
Author Date: 2019-08-14 12:57:37 UTC

Remove sysdep-cancel header

Now that single-thread optimization is provided by single-thread.h header
and the enable/disable asynchronous cancellation functions are no longer
used on cancellable syscalls, the header can be removed.

Checked with a build for all major Linux architectures and for hurd.

 * sysdeps/generic/sysdep-cancel.h: Remove file.
 * sysdeps/mach/hurd/sysdep-cancel.h: Likewise.
 * sysdeps/unix/sysv/linux/sysdep-cancel.h: Likewise.
 * elf/dl-close.c: Remove sysdep-cancel.h inclusion.
 * elf/dl-lookup.c: Likewise.
 * elf/dl-open.c: Likewise.
 * elf/dl-runtime.c: Likewise.
 * elf/dl-scope.c: Likewise.
 * elf/dl-sym.c: Likewise.
 * io/creat.c: Likewise.
 * io/ppoll.c: Likewise.
 * malloc/malloc.c: Likewise.
 * misc/pselect.c: Likewise.
 * nptl/thrd_sleep.c: Likewise.
 * sysdeps/mips/dl-trampoline.c: Likewise.
 * sysdeps/posix/open64.c: Likewise.
 * sysdeps/posix/pause.c: Likewise.
 * sysdeps/posix/sigpause.c: Likewise.
 * sysdeps/posix/sigwait.c: Likewise.
 * sysdeps/posix/waitid.c: Likewise.
 * sysdeps/unix/clock_nanosleep.c: Likewise.
 * sysdeps/unix/sysv/linux/accept.c: Likewise.
 * sysdeps/unix/sysv/linux/accept4.c: Likewise.
 * sysdeps/unix/sysv/linux/access.c: Likewise.
 * sysdeps/unix/sysv/linux/alpha/select.c: Likewise.
 * sysdeps/unix/sysv/linux/clock_nanosleep.c: Likewise.
 * sysdeps/unix/sysv/linux/close.c: Likewise.
 * sysdeps/unix/sysv/linux/close_nocancel.c: Likewise.
 * sysdeps/unix/sysv/linux/connect.c: Likewise.
 * sysdeps/unix/sysv/linux/copy_file_range.c: Likewise.
 * sysdeps/unix/sysv/linux/creat.c: Likewise.
 * sysdeps/unix/sysv/linux/creat64.c: Likewise.
 * sysdeps/unix/sysv/linux/epoll_pwait.c: Likewise.
 * sysdeps/unix/sysv/linux/epoll_wait.c: Likewise.
 * sysdeps/unix/sysv/linux/fallocate.c: Likewise.
 * sysdeps/unix/sysv/linux/fallocate64.c: Likewise.
 * sysdeps/unix/sysv/linux/fcntl.c: Likewise.
 * sysdeps/unix/sysv/linux/fcntl64.c: Likewise.
 * sysdeps/unix/sysv/linux/fcntl_nocancel.c: Likewise.
 * sysdeps/unix/sysv/linux/fdatasync.c: Likewise.
 * sysdeps/unix/sysv/linux/fsync.c: Likewise.
 * sysdeps/unix/sysv/linux/futex-internal.h: Likewise.
 * sysdeps/unix/sysv/linux/getrandom.c: Likewise.
 * sysdeps/unix/sysv/linux/lowlevellock-futex.h: Likewise.
 * sysdeps/unix/sysv/linux/mq_timedreceive.c: Likewise.
 * sysdeps/unix/sysv/linux/mq_timedsend.c: Likewise.
 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.
 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.
 * sysdeps/unix/sysv/linux/msync.c: Likewise.
 * sysdeps/unix/sysv/linux/nanosleep.c: Likewise.
 * sysdeps/unix/sysv/linux/nanosleep_nocancel.c: Likewise.
 * sysdeps/unix/sysv/linux/open.c: Likewise.
 * sysdeps/unix/sysv/linux/open64.c: Likewise.
 * sysdeps/unix/sysv/linux/open_by_handle_at.c: Likewise.
 * sysdeps/unix/sysv/linux/open_nocancel.c: Likewise.
 * sysdeps/unix/sysv/linux/openat.c: Likewise.
 * sysdeps/unix/sysv/linux/openat64.c: Likewise.
 * sysdeps/unix/sysv/linux/openat64_nocancel.c: Likewise.
 * sysdeps/unix/sysv/linux/openat_nocancel.c: Likewise.
 * sysdeps/unix/sysv/linux/pause.c: Likewise.
 * sysdeps/unix/sysv/linux/pause_nocancel.c: Likewise.
 * sysdeps/unix/sysv/linux/poll.c: Likewise.
 * sysdeps/unix/sysv/linux/ppoll.c: Likewise.
 * sysdeps/unix/sysv/linux/pread.c: Likewise.
 * sysdeps/unix/sysv/linux/pread64.c: Likewise.
 * sysdeps/unix/sysv/linux/preadv.c: Likewise.
 * sysdeps/unix/sysv/linux/preadv2.c: Likewise.
 * sysdeps/unix/sysv/linux/preadv64.c: Likewise.
 * sysdeps/unix/sysv/linux/preadv64v2.c: Likewise.
 * sysdeps/unix/sysv/linux/pselect.c: Likewise.
 * sysdeps/unix/sysv/linux/pwrite.c: Likewise.
 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.
 * sysdeps/unix/sysv/linux/pwritev.c: Likewise.
 * sysdeps/unix/sysv/linux/pwritev2.c: Likewise.
 * sysdeps/unix/sysv/linux/pwritev64.c: Likewise.
 * sysdeps/unix/sysv/linux/pwritev64v2.c: Likewise.
 * sysdeps/unix/sysv/linux/read.c: Likewise.
 * sysdeps/unix/sysv/linux/read_nocancel.c: Likewise.
 * sysdeps/unix/sysv/linux/readv.c: Likewise.
 * sysdeps/unix/sysv/linux/recv.c: Likewise.
 * sysdeps/unix/sysv/linux/recvfrom.c: Likewise.
 * sysdeps/unix/sysv/linux/recvmmsg.c: Likewise.
 * sysdeps/unix/sysv/linux/recvmsg.c: Likewise.
 * sysdeps/unix/sysv/linux/select.c: Likewise.
 * sysdeps/unix/sysv/linux/send.c: Likewise.
 * sysdeps/unix/sysv/linux/sendmmsg.c: Likewise.
 * sysdeps/unix/sysv/linux/sendmsg.c: Likewise.
 * sysdeps/unix/sysv/linux/sendto.c: Likewise.
 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.
 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.
 * sysdeps/unix/sysv/linux/sigwait.c: Likewise.
 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.
 * sysdeps/unix/sysv/linux/socketcall.h | 2 +
 * sysdeps/unix/sysv/linux/splice.c: Likewise.
 * sysdeps/unix/sysv/linux/sync_file_range.c: Likewise.
 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.
 * sysdeps/unix/sysv/linux/tee.c: Likewise.
 * sysdeps/unix/sysv/linux/timer_routines.c: Likewise.
 * sysdeps/unix/sysv/linux/vmsplice.c: Likewise.
 * sysdeps/unix/sysv/linux/wait.c: Likewise.
 * sysdeps/unix/sysv/linux/waitid.c: Likewise.
 * sysdeps/unix/sysv/linux/waitpid.c: Likewise.
 * sysdeps/unix/sysv/linux/waitpid_nocancel.c: Likewise.
 * sysdeps/unix/sysv/linux/write.c: Likewise.
 * sysdeps/unix/sysv/linux/write_nocancel.c: Likewise.
 * sysdeps/unix/sysv/linux/writev.c: Likewise.

google/grte/v4-2.19/master 2019-08-14 17:20:07 UTC 2019-08-14
Forestall a filesystem bug while building shlib.lds by using a temp file

Author: Stan Shebs
Author Date: 2019-08-14 17:20:07 UTC

Forestall a filesystem bug while building shlib.lds by using a temp file

gabriel/powerpc-ieee128-printscan 2019-08-09 14:36:50 UTC 2019-08-09
TEMP: powerpc64le: Enable support for IEEE long double

Author: Gabriel F. T. Gomes
Author Date: 2019-07-11 14:48:28 UTC

TEMP: powerpc64le: Enable support for IEEE long double

DO NOT COMMIT!!!!!

<NEWS entry>

On platforms where long double may have two different formats, i.e.: the
same format as double (64-bits) or something else (128-bits), building
with -mlong-double-128 is the default and function calls in the user
program match the name of the function in Glibc. When building with
-mlong-double-64, Glibc installed headers redirect such calls to the
appropriate function.

This patch adds similar redirections to be used by builds in IEEE long
double mode (-mabi=ieeelongdouble). It also skips some uses of
libc_hidden_proto in internal headers, because they also produce
redirections, causing a redirection conflict.

Tested for powerpc64le.

 * argp/argp.h: When in IEEE long double mode, include the header
 that produces the redirections.
 * libio/stdio.h: Likewise.
 * misc/err.h: Likewise.
 * misc/error.h: Likewise.
 * misc/sys/syslog.h: Likewise.
 * stdio-common/printf.h: Likewise.
 * stdlib/monetary.h: Likewise.
 * stdlib/stdlib.h: Likewise.
 * wcsmbs/wchar.h: Likewise.

 * libio/bits/stdio-ldbl.h: Add specific redirections for IEEE
 long double, when the generic redirection is not enough to
 distinguish between -mlong-double-64 and -mabi=ieeelongdouble.
 * misc/bits/syslog-ldbl.h: Likewise.
 * stdlib/bits/stdlib-ldbl.h: Likewise.
 * wcsmbs/bits/wchar-ldbl.h: Likewise.

 * include/stdlib.h: Skip some uses of libc_hidden_proto when in
 IEEE long double mode.
 * include/wchar.h: Likewise.

 * misc/sys/cdefs.h
        (__LDBL_REDIR1, __LDBL_REDIR1_DECL, __LDBL_REDIR)
 (__LDBL_REDIR_DECL, __LDBL_REDIR2_DECL, __REDIRECT_LDBL)
 (__LDBL_REDIR_NTH, __LDBL_REDIR1_NTH, __REDIRECT_NTH_LDBL):
 New definitions for the IEEE long double case.

 * sysdeps/ieee754/ldbl-128ibm-compat/bits/long-double.h: New
 file.

azanella/bz24595 2019-08-08 19:06:48 UTC 2019-08-08
nptl: Fix deadlock on atfork handler which calls dlclose (BZ#24595)

Author: Adhemerval Zanella
Author Date: 2019-07-12 17:33:37 UTC

nptl: Fix deadlock on atfork handler which calls dlclose (BZ#24595)

Some real-world cases rely upon that atfork handlers can call functions
that might change the atfork handlers, such as dlclose. Since 27761a10
(Refactor atfork handlers), all internal atfork handlers access is
protected with a simple lock, not allowing reentrancy. This leads to
deadlocks for the aforementioned scenario. Although this specific usage
is far from portable (as comment #2 in the bug report), glibc did allow
it in the past.

This patch fixes by using a double-linked lists along with a lock
release while calling the atfork handlers. This is similar to the
strategy used on atexit.

The list should be kept concise as long as it is invalid to dlclose itself.
It should also be safe also call pthread_atfork from a registered callback,
although it is up to the caller to handle the resulting list state regarding
callback call. Since the new element is added on the end of the list, the
prepare handler won't see the new element (since it ran in reverse order),
however both the parent and child will.

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

 * misc/sys/queue.h (TAILQ_FOREACH_SAFE): New macro.
 * nptl/Makefile [build-shared == yes] (tests): Add tst-atfork3.
 (modules-names): Add tst-atfork3mod.
 (tst-atfork3mod.so-no-z-defs, $(objpfx)tst-atfork3:,
 LDFLAGS-tst-atfork3, $(objpfx)tst-atfork3mod.so,
 $(objpfx)tst-atfork3.out): New rules.
 * nptl/register-atfork.c: (__register_atfork, __unregister_atfork,
 __run_fork_handlers, libc_freeres_fn): Remove usage of dynarray in
  favor of a double linked list.
 (atfork_lock): Unlock before calling the callback.
 (fork_handlers_push_back, fork_handlers_remove,
 fork_handlers_remove_if, fork_handlers_remove_all): New functions.
 (fork_handler_list_find): Remove function.
 * nptl/tst-atfork3.c, nptl/tst-atfork3mod.c: New files.
 * sysdeps/nptl/fork.h (fork_handler): Remove definition.

ibm/2.30/master 2019-08-01 17:01:04 UTC 2019-08-01
Let ld.so have flags DT_RPATH and DT_RUNPATH

Author: Tulio Magno Quites Machado Filho
Author Date: 2018-08-02 16:57:26 UTC

Let ld.so have flags DT_RPATH and DT_RUNPATH

2018-08-02 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>

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

Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>

arm/ilp32 2019-08-01 13:47:11 UTC 2019-08-01
aarch64: Update ILP32 abilists for glibc 2.30

Author: Szabolcs Nagy
Author Date: 2019-08-01 13:47:11 UTC

aarch64: Update ILP32 abilists for glibc 2.30

This will need to be merged with the initial ilp32 abilist commit.

2019-08-01 Szabolcs Nagy <szabolcs.nagy@arm.com>

 * sysdeps/unix/sysv/linux/aarch64/ilp32/libc.abilist: Update.
 * sysdeps/unix/sysv/linux/aarch64/ilp32/libpthread.abilist: Update.

azanella/posix_spawn-optimizations 2019-07-31 19:06:51 UTC 2019-07-31
posix: Use posix_spawn for wordexp

Author: Adhemerval Zanella
Author Date: 2019-04-25 17:54:03 UTC

posix: Use posix_spawn for wordexp

This patch replaces the fork+exec by posix_spawn on wordexp, which
allows a better scability on Linux and simplifies the thread
cancellation handling.

The only change which can not be implemented with posix_spawn the
/dev/null check to certify it is indeed the expected device. I am
not sure how effetive this check is since /dev/null tampering means
something very wrong with the system and this is the least of the
issues. My view is the tests is really out of the place and the
hardening provided is minimum.

If the idea is still to provide such check, I think a possibilty
would be to open /dev/null, check it, add a dup2 file action, and
close the file descriptor.

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

 * include/spawn.h (__posix_spawn_file_actions_addopen): New
 prototype.
 * posix/spawn_faction_addopen.c (posix_spawn_file_actions_addopen):
 Add internal alias.
 * posix/wordexp.c (create_environment, free_environment): New
 functions.
 (exec_comm_child, exec_comm): Use posix_spawn instead of fork+exec.
 * posix/wordexp-test.c: Use libsupport and remove atfork usage.

zack/gtod-no-timezone 2019-07-28 00:14:35 UTC 2019-07-28
Remove access to legacy time zone support in gettimeofday etc.

Author: Zack Weinberg
Author Date: 2019-07-27 23:26:23 UTC

Remove access to legacy time zone support in gettimeofday etc.

gettimeofday and ftime are not quite fully implementable on systems
that only provide a primitive equivalent to clock_gettime, because
they can also report information about a system-wide time zone. This
mechanism has been deprecated for many years because it can only be
configured on a system-wide basis, and because it only supports the
simplest kinds of daylight-savings rules, but we’ve supported it on a
best-effort basis until now. This patch removes our support for it:

 * The type 'struct timezone' is still declared as a complete type in
   <sys/time.h>, but code that uses its fields (tz_minuteswest and
   tz_dsttime) will not compile.

 * Similarly, code that uses the 'timezone' and 'dstflag' fields of
   struct timeb will not compile anymore. (This is a willful
   violation of the older iterations of XPG that included
   sys/timeb.h; the relevant conformance tests are XFAILed.)

 * Old binaries that pass a non-NULL 'tzp' pointer to gettimeofday
   will always receive a 'struct timezone' whose tz_minuteswest and
   tz_dsttime fields are zero (as if the system were operating on UTC).

 * Similarly, old binaries that call ftime will always receive a
   'struct timeb' whose timezone and dstflag fields are zero.

 * If the 'tzp' argument to settimeofday is not NULL, the call will fail
   and set errno to ENOSYS. (This was already the case on the Hurd.)

 * glibc will always pass a second argument of NULL when invoking a
   kernel-provided gettimeofday.

 * On Alpha, the compat symbols gettimeofday@GLIBC_2.0 and
   settimeofday@GLIBC_2.0 (which used 32-bit time_t) now convert
   their arguments and call system primitives that use 64-bit time_t,
   instead of invoking legacy “osf” system calls.

ChangeLog:

 * time/sys/time.h (struct timezone): Remove tz_minuteswest
 and tz_dsttime fields; replace with padding to preserve the size.
 * time/sys/timeb.h (struct timeb): Remove timezone and dstflag
 fields; replace with padding to preserve the size.
 * conform/Makefile: XFAIL tests because struct timeb is no longer
 fully conformant with Unix98.

 * sysdeps/posix/gettimeofday.c
 * sysdeps/unix/sysv/linux/gettimeofday.c
 * sysdeps/unix/sysv/linux/aarch64/gettimeofday.c
 * sysdeps/unix/sysv/linux/powerpc/gettimeofday.c
 * sysdeps/unix/sysv/linux/x86/gettimeofday.c
 (gettimeofday): When ‘tz’ argument is not NULL, just clear it.
 Always pass a null pointer as the second argument to a
 gettimeofday (v)syscall.

 * sysdeps/unix/bsd/ftime.c: Unconditionally clear the memory that
 was formerly the ‘timezone’ and ‘dstflag’ fields of struct timeb.

 * sysdeps/unix/syscalls.list: Remove entry for settimeofday.
 * sysdeps/unix/settimeofday.c: New file.
 (settimeofday): Fail with ENOSYS if ‘tz’ argument is not NULL.

 * sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove entries for
        osf_gettimeofday, osf_settimeofday, and settimeofday.
 * sysdeps/unix/sysv/linux/alpha/osf_gettimeofday.c:
 New file. Call the 64-bit gettimeofday, then convert to a
 32-bit struct timeval. On overflow, saturate the struct timeval
 and fail with EOVERFLOW.
 * sysdeps/unix/sysv/linux/alpha/osf_settimeofday.c: New file.
        Convert to a 64-bit struct timeval and call 64-bit settimeofday.
        Fail with ENOSYS if ‘tz’ argument is not NULL.

 * sunrpc/auth_des.c, sunrpc/auth_unix.c
 * sysdeps/posix/time.c, sysdeps/unix/stime.c:
 Remove unnecessary casts of NULL.

 * sysdeps/unix/sysv/linux/powerpc/time.c (time_syscall):
 Use (void *)0 instead of NULL when passing a null pointer
 as an untyped argument.

 * manual/time.texi: Remove documentation of fields of
 struct timezone. Revise text to further emphasize that
 the second argument to gettimeofday/settimeofday should
 always be a null pointer.

fw/getdents64 2019-07-25 10:48:41 UTC 2019-07-25
Linux: Move getdents64 to <dirent.h>

Author: Florian Weimer
Author Date: 2019-07-25 10:48:41 UTC

Linux: Move getdents64 to <dirent.h>

This matches the location of the declaration in musl.

fw/gcc-10-fixes 2019-07-22 12:02:40 UTC 2019-07-22
nptl: Use uintptr_t for address diagnostic in nptl/tst-pthread-getattr

Author: Florian Weimer
Author Date: 2019-07-22 12:02:40 UTC

nptl: Use uintptr_t for address diagnostic in nptl/tst-pthread-getattr

Recent GCC versions warn about the attempt to return the address of a
local variable:

tst-pthread-getattr.c: In function ‘allocate_and_test’:
tst-pthread-getattr.c:54:10: error: function returns address of local variable [-Werror=return-local-addr]
   54 | return mem;
      | ^~~
In file included from ../include/alloca.h:3,
                 from tst-pthread-getattr.c:26:
../stdlib/alloca.h:35:23: note: declared here
   35 | # define alloca(size) __builtin_alloca (size)
      | ^~~~~~~~~~~~~~~~~~~~~~~
tst-pthread-getattr.c:51:9: note: in expansion of macro ‘alloca’
   51 | mem = alloca ((size_t) (mem - target));
      | ^~~~~~

The address itself is used in a check in the caller, so using
uintptr_t instead is reasonable.

fw/linux-5.2 2019-07-22 09:01:17 UTC 2019-07-22
Linux: Include <linux/sockios.h> in <bits/socket.h> under __USE_MISC

Author: Florian Weimer
Author Date: 2019-07-22 09:01:17 UTC

Linux: Include <linux/sockios.h> in <bits/socket.h> under __USE_MISC

Historically, <asm/socket.h> (which is included from <bits/socket.h>)
provided ioctl operations for sockets. User code accessed them
through <sys/socket.h>. The kernel UAPI headers have removed these
definitions in favor of <linux/sockios.h>. This commit makes them
available via <sys/socket.h> again.

azanella/ffinite-math-compat 2019-07-17 17:05:02 UTC 2019-07-17
Add libm_alias_finite for _finite symbols

Author: Adhemerval Zanella
Author Date: 2019-07-16 15:17:22 UTC

Add libm_alias_finite for _finite symbols

This patch adds a new macro, libm_alias_finite, to define all _finite
symbol. It sets all _finite symbol as compat symbol based on its first
version (obtained from the definition at built generated first-versions.h).

The <fn>f128_finite symbols were introduced in GLIBC 2.26 and so need
special treatment in code that is shared between long double and float128.
It is done by adding a list, similar to internal symbol redifinition,
on sysdeps/ieee754/float128/float128_private.h.

Alpha also needs some tricky changes to ensure we still emit 2 compat
symbols for sqrt(f).

Passes buildmanyglibc.

ChangeLog:

 Wilco Dijkstra <wdijkstr@arm.com>
 Adhemerval Zanella <adhemerval.zanella@linaro.org>

 * math/e_exp10.c (__ieee754_exp10): Replace strong_alias with
 libm_alias_finite.
 * math/e_exp10f.c (__ieee754_exp10f): Likewise.
 * math/e_exp10l.c (__ieee754_exp10l): Likewise.
 * math/e_scalb.c (__ieee754_scalb): Likewise.
 * math/e_scalbf.c (__ieee754_scalbf): Likewise.
 * math/e_scalbl.c (__ieee754_scalbl): Likewise.
 * sysdeps/aarch64/e_sqrtl.c (__ieee754_sqrtl): Likewise.
 * sysdeps/aarch64/fpu/e_sqrt.c (__ieee754_sqrt): Likewise.
 * sysdeps/aarch64/fpu/e_sqrtf.c (__ieee754_sqrtf): Likewise.
 * sysdeps/arm/e_sqrt.c (__ieee754_sqrt): Likewise.
 * sysdeps/arm/e_sqrtf.c (__ieee754_sqrtf): Likewise.
 * sysdeps/i386/fpu/e_acos.S (__ieee754_acos): Likewise.
 * sysdeps/i386/fpu/e_acosf.S (__ieee754_acosf): Likewise.
 * sysdeps/i386/fpu/e_acosh.S (__ieee754_acosh): Likewise.
 * sysdeps/i386/fpu/e_acoshf.S (__ieee754_acoshf): Likewise.
 * sysdeps/i386/fpu/e_acoshl.S (__ieee754_acoshl): Likewise.
 * sysdeps/i386/fpu/e_acosl.c (__ieee754_acosl): Likewise.
 * sysdeps/i386/fpu/e_asin.S (__ieee754_asin): Likewise.
 * sysdeps/i386/fpu/e_asinf.S (__ieee754_ainf): Likewise.
 * sysdeps/i386/fpu/e_atan2.S (__ieee754_atan2): Likewise.
 * sysdeps/i386/fpu/e_atan2f.S (__ieee754_atan2f): Likewise.
 * sysdeps/i386/fpu/e_atan2l.c (__ieee754_atan2l): Likewise.
 * sysdeps/i386/fpu/e_atanh.S (__ieee754_atanh): Likewise.
 * sysdeps/i386/fpu/e_atanhf.S (__ieee754_atanhf): Likewise.
 * sysdeps/i386/fpu/e_atanhl.S (__ieee754_atanhl): Likewise.
 * sysdeps/i386/fpu/e_exp.S (__ieee754_exp): Likewise.
 * sysdeps/i386/fpu/e_exp10.S (__ieee754_exp10): Likewise.
 * sysdeps/i386/fpu/e_exp10f.S (__ieee754_exp10f): Likewise.
 * sysdeps/i386/fpu/e_exp2.S (__ieee754_exp2): Likewise.
 * sysdeps/i386/fpu/e_exp2l.S (__ieee754_exp2l): Likewise.
 * sysdeps/i386/fpu/e_expl.S (__ieee754_expl): Likewise.
 * sysdeps/i386/fpu/e_fmod.S (__ieee754_fmod): Likewise.
 * sysdeps/i386/fpu/e_fmodf.S (__ieee754_fmodf): Likewise.
 * sysdeps/i386/fpu/e_fmodl.c (__ieee754_fmodl): Likewise.
 * sysdeps/i386/fpu/e_hypot.S (__ieee754_hypot): Likewise.
 * sysdeps/i386/fpu/e_hypotf.S (__ieee754_hytpof): Likewise.
 * sysdeps/i386/fpu/e_log.S (__ieee754_log): Likewise.
 * sysdeps/i386/fpu/e_log10.S (__ieee754_log10): Likewise.
 * sysdeps/i386/fpu/e_log10f.S (__ieee754_log10f): Likewise.
 * sysdeps/i386/fpu/e_log10l.S (__ieee754_log10l): Likewise.
 * sysdeps/i386/fpu/e_log2.S (__ieee754_log2): Likewise.
 * sysdeps/i386/fpu/e_log2l.S (__ieee754_log2l): Likewise.
 * sysdeps/i386/fpu/e_logl.S (__ieee754_logl): Likewise.
 * sysdeps/i386/fpu/e_pow.S (__ieee754_pow): Likewise.
 * sysdeps/i386/fpu/e_powl.S (__ieee754_powl): Likewise.
 * sysdeps/i386/fpu/e_remainder.S (__ieee754_remainder): Likewise.
 * sysdeps/i386/fpu/e_remainderf.S (__ieee754_remainderf): Likewise.
 * sysdeps/i386/fpu/e_remainderl.S (__ieee754_remainderl): Likewise.
 * sysdeps/i386/fpu/e_scalb.S (__ieee754_scalb): Likewise.
 * sysdeps/i386/fpu/e_scalbf.S (__ieee754_scalbf): Likewise.
 * sysdeps/i386/fpu/e_scalbl.S (__ieee754_scalbl): Likewise.
 * sysdeps/i386/fpu/e_sqrt.S (__ieee754_sqrt): Likewise.
 * sysdeps/i386/fpu/e_sqrtf.S (__ieee754_sqrtf): Likewise.
 * sysdeps/i386/fpu/e_sqrtl.c (__ieee754_sqrtl): Likewise.
 * sysdeps/i386/i686/fpu/e_log.S (__ieee754_log): Likewise.
 * sysdeps/i386/i686/fpu/e_logl.S (__ieee754_logl): Likewise.
 * sysdeps/i386/i686/fpu/multiarch/e_exp2f.c (__ieee754_exp2):
 Likewise.
 * sysdeps/i386/i686/fpu/multiarch/e_expf.c (__ieee754_exp):
 Likewise.
 * sysdeps/i386/i686/fpu/multiarch/e_log2f.c (__ieee754_log2):
 Likewise.
 * sysdeps/i386/i686/fpu/multiarch/e_logf.c (__ieee754_logf):
 Likewise.
 * sysdeps/i386/i686/fpu/multiarch/e_powf.c (__ieee754_powf):
 Likewise.
 * sysdeps/ieee754/dbl-64/e_acosh.c (__ieee754_acosh): Likewise.
 * sysdeps/ieee754/dbl-64/e_asin.c (__ieee754_asin): Likewise.
 * sysdeps/ieee754/dbl-64/e_atan2.c (__ieee754_atan2): Likewise.
 * sysdeps/ieee754/dbl-64/e_atanh.c (__ieee754_atanh): Likewise.
 * sysdeps/ieee754/dbl-64/e_cosh.c (__ieee754_cosh): Likewise.
 * sysdeps/ieee754/dbl-64/e_exp.c (__ieee754_exp): Likewise.
 * sysdeps/ieee754/dbl-64/e_exp10.c (__ieee754_exp10): Likewise.
 * sysdeps/ieee754/dbl-64/e_exp2.c (__ieee754_exp2): Likewise.
 * sysdeps/ieee754/dbl-64/e_fmod.c (__ieee754_fmod): Likewise.
 * sysdeps/ieee754/dbl-64/e_gamma_r.c (__ieee754_gamma_r): Likewise.
 * sysdeps/ieee754/dbl-64/e_hypot.c (__ieee754_hypot): Likewise.
 * sysdeps/ieee754/dbl-64/e_j0.c (__ieee754_j0, __ieee754_y0):
  Likewise.
 * sysdeps/ieee754/dbl-64/e_j1.c (__ieee754_j1, __ieee754_y1):
  Likewise.
 * sysdeps/ieee754/dbl-64/e_jn.c (__ieee754_jn, __ieee754_yn):
 Likewise.
 * sysdeps/ieee754/dbl-64/e_lgamma_r.c (__ieee754_lgamma_r): Likewise.
 * sysdeps/ieee754/dbl-64/e_log.c (__ieee754_log): Likewise.
 * sysdeps/ieee754/dbl-64/e_log10.c (__ieee754_log10): Likewise.
 * sysdeps/ieee754/dbl-64/e_log2.c (__ieee754_log2): Likewise.
 * sysdeps/ieee754/dbl-64/e_pow.c (__ieee754_pow): Likewise.
 * sysdeps/ieee754/dbl-64/e_remainder.c (__ieee754_remainder):
 Likewise.
 * sysdeps/ieee754/dbl-64/e_sinh.c (__ieee754_sinh): Likewise.
 * sysdeps/ieee754/dbl-64/e_sqrt.c (__ieee754_sqrt): Likewise.
 * sysdeps/ieee754/dbl-64/wordsize-64/e_acosh.c (__ieee754_acosh):
 Likewise.
 * sysdeps/ieee754/dbl-64/wordsize-64/e_cosh.c (__ieee754_cosh):
 Likewise.
 * sysdeps/ieee754/dbl-64/wordsize-64/e_fmod.c (__ieee754_fmod):
 Likewise.
 * sysdeps/ieee754/dbl-64/wordsize-64/e_log10.c (__ieee754_log10):
 Likewise.
 * sysdeps/ieee754/flt-32/e_acosf.c (__ieee754_acosf): Likewise.
 * sysdeps/ieee754/flt-32/e_acoshf.c (__ieee754_acoshf): Likewise.
 * sysdeps/ieee754/flt-32/e_asinf.c (__ieee754_asinf): Likewise.
 * sysdeps/ieee754/flt-32/e_atan2f.c (__ieee754_atan2f): Likewise.
 * sysdeps/ieee754/flt-32/e_atanhf.c (__ieee754_atanhf): Likewise.
 * sysdeps/ieee754/flt-32/e_coshf.c (__ieee754_coshf): Likewise.
 * sysdeps/ieee754/flt-32/e_exp2f.c (__ieee754_exp2f): Likewise.
 * sysdeps/ieee754/flt-32/e_expf.c (__ieee754_expf): Likewise.
 * sysdeps/ieee754/flt-32/e_fmodf.c (__ieee754_fmodf): Likewise.
 * sysdeps/ieee754/flt-32/e_gammaf_r.c (__ieee754_gammaf_r): Likewise.
 * sysdeps/ieee754/flt-32/e_hypotf.c (__ieee754_hypotf): Likewise.
 * sysdeps/ieee754/flt-32/e_j0f.c (__ieee754_j0f, __ieee754_y0f):
 Likewise.
 * sysdeps/ieee754/flt-32/e_j1f.c (__ieee754_j1f, __ieee754_y1f):
 Likewise.
 * sysdeps/ieee754/flt-32/e_jnf.c (__ieee754_jnf, __ieee754_ynf):
 Likewise.
 * sysdeps/ieee754/flt-32/e_lgammaf_r.c (__ieee754_lgammaf_r):
 Likewise.
 * sysdeps/ieee754/flt-32/e_log10f.c (__ieee754_log10f): Likewise.
 * sysdeps/ieee754/flt-32/e_log2f.c (__ieee754_log2f): Likewise.
 * sysdeps/ieee754/flt-32/e_logf.c (__ieee754_logf): Likewise.
 * sysdeps/ieee754/flt-32/e_powf.c (__ieee754_powf): Likewise.
 * sysdeps/ieee754/flt-32/e_remainderf.c (__ieee754_remainderf):
 Likewise.
 * sysdeps/ieee754/flt-32/e_sinhf.c (__ieee754_sinhf): Likewise.
 * sysdeps/ieee754/flt-32/e_sqrtf.c (__ieee754_sqrtf): Likewise.
 * sysdeps/ieee754/ldbl-128/e_acoshl.c (__ieee754_acoshl): Likewise.
 * sysdeps/ieee754/ldbl-128/e_acosl.c (__ieee754_acosl): Likewise.
 * sysdeps/ieee754/ldbl-128/e_asinl.c (__ieee754_asinl): Likewise.
 * sysdeps/ieee754/ldbl-128/e_atan2l.c (__ieee754_atan2l): Likewise.
 * sysdeps/ieee754/ldbl-128/e_atanhl.c (__ieee754_atanhl): Likewise.
 * sysdeps/ieee754/ldbl-128/e_coshl.c (__ieee754_coshl): Likewise.
 * sysdeps/ieee754/ldbl-128/e_exp10l.c (__ieee754_exp10l): Likewise.
 * sysdeps/ieee754/ldbl-128/e_expl.c (__ieee754_expl): Likewise.
 * sysdeps/ieee754/ldbl-128/e_fmodl.c (__ieee754_fmodl): Likewise.
 * sysdeps/ieee754/ldbl-128/e_gammal_r.c (__ieee754_gammal_r):
 Likewise.
 * sysdeps/ieee754/ldbl-128/e_hypotl.c (__ieee754_hypotl): Likewise.
 * sysdeps/ieee754/ldbl-128/e_j0l.c (__ieee754_j0l, __ieee754_y0l):
 Likewise.
 * sysdeps/ieee754/ldbl-128/e_j1l.c (__ieee754_j1l, __ieee754_y1l):
 Likewise.
 * sysdeps/ieee754/ldbl-128/e_jnl.c (__ieee754_jnl, __ieee754_ynl):
 Likewise.
 * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (__ieee754_lgammal_r):
 Likewise.
 * sysdeps/ieee754/ldbl-128/e_log10l.c (__ieee754_log10l): Likewise.
 * sysdeps/ieee754/ldbl-128/e_log2l.c (__ieee754_log2l): Likewise.
 * sysdeps/ieee754/ldbl-128/e_logl.c (__ieee754_logl): Likewise.
 * sysdeps/ieee754/ldbl-128/e_powl.c (__ieee754_powl): Likewise.
 * sysdeps/ieee754/ldbl-128/e_remainderl.c (__ieee754_remainderl):
 Likewise.
 * sysdeps/ieee754/ldbl-128/e_sinhl.c (__ieee754_sinhl): Likewise.
 * sysdeps/ieee754/ldbl-128ibm/e_acoshl.c (__ieee754_acoshl): Likewise.
 * sysdeps/ieee754/ldbl-128ibm/e_acosl.c (__ieee754_acosl): Likewise.
 * sysdeps/ieee754/ldbl-128ibm/e_asinl.c (__ieee754_asinl): Likewise.
 * sysdeps/ieee754/ldbl-128ibm/e_atan2l.c (__ieee754_atan2l): Likewise.
 * sysdeps/ieee754/ldbl-128ibm/e_atanhl.c (__ieee754_atanhl): Likewise.
 * sysdeps/ieee754/ldbl-128ibm/e_coshl.c (__ieee754_coshl): Likewise.
 * sysdeps/ieee754/ldbl-128ibm/e_exp10l.c (__ieee754_exp10l): Likewise.
 * sysdeps/ieee754/ldbl-128ibm/e_expl.c (__ieee754_expl): Likewise.
 * sysdeps/ieee754/ldbl-128ibm/e_fmodl.c (__ieee754_fmodl): Likewise.
 * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c (__ieee754_gammal):
 Likewise.
 * sysdeps/ieee754/ldbl-128ibm/e_hypotl.c (__ieee754_hypotl): Likewise.
 * sysdeps/ieee754/ldbl-128ibm/e_j0l.c (__ieee754_j0l, __ieee754_y0l):
 Likewise.
 * sysdeps/ieee754/ldbl-128ibm/e_j1l.c (__ieee754_j1l, __ieee754_y1l):
 Likewise.
 * sysdeps/ieee754/ldbl-128ibm/e_jnl.c (__ieee754_jnl, __ieee754_ynl):
 Likewise.
 * sysdeps/ieee754/ldbl-128ibm/e_lgammal_r.c (__ieee754_lgammal_r):
 Likewise.
 * sysdeps/ieee754/ldbl-128ibm/e_log10l.c (__ieee754_log10l): Likewise.
 * sysdeps/ieee754/ldbl-128ibm/e_log2l.c (__ieee754_log2l): Likewise.
 * sysdeps/ieee754/ldbl-128ibm/e_logl.c (__ieee754_logl): Likewise.
 * sysdeps/ieee754/ldbl-128ibm/e_powl.c (__ieee754_powl): Likewise.
 * sysdeps/ieee754/ldbl-128ibm/e_remainderl.c (__ieee754_remainderl):
  Likewise.
 * sysdeps/ieee754/ldbl-128ibm/e_sinhl.c (__ieee754_sinhl): Likewise.
 * sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c (__ieee754_sqrtl): Likewise.
 * sysdeps/ieee754/ldbl-96/e_acoshl.c (__ieee754_acoshl): Likewise.
 * sysdeps/ieee754/ldbl-96/e_asinl.c (__ieee754_asinl): Likewise.
 * sysdeps/ieee754/ldbl-96/e_atanhl.c (__ieee754_atanhl): Likewise.
 * sysdeps/ieee754/ldbl-96/e_coshl.c (__ieee754_coshl): Likewise.
 * sysdeps/ieee754/ldbl-96/e_gammal_r.c (__ieee754_gammal_r): Likewise.
 * sysdeps/ieee754/ldbl-96/e_hypotl.c (__ieee754_hypotl): Likewise.
 * sysdeps/ieee754/ldbl-96/e_j0l.c (__ieee754_j0l, __ieee754_y0l):
 Likewise.
 * sysdeps/ieee754/ldbl-96/e_j1l.c (__ieee754_j1l, __ieee754_y1l):
 Likewise.
 * sysdeps/ieee754/ldbl-96/e_jnl.c (__ieee754_jnl, __ieee754_ynl):
 Likewise.
 * sysdeps/ieee754/ldbl-96/e_lgammal_r.c (__ieee754_lgammal_r):
 Likewise.
 * sysdeps/ieee754/ldbl-96/e_sinhl.c (__ieee754_sinhl): Likewise.
 * sysdeps/m68k/coldfire/fpu/e_sqrt.c (__ieee754_sqrt): Likewise.
 * sysdeps/m68k/coldfire/fpu/e_sqrtf.c (__ieee754_sqrtf): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_acos.c (__ieee754_acos): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_acosf.c (__ieee754_acosf): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_acosl.c (__ieee754_acosl): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_asin.c (__ieee754_asin): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_asinf.c (__ieee754_asinf): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_asinl.c (__ieee754_asinl): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_atan2.c (__ieee754_atan2): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_atanh.c (__ieee754_atanh): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_atanhf.c (__ieee754_atanhf): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_atanhl.c (__ieee754_atanhl): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_cosh.c (__ieee754_cosh): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_coshf.c (__ieee754_coshf): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_coshl.c (__ieee754_coshl): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_exp.c (__ieee754_exp): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_exp10.c (__ieee754_exp10): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_exp10f.c (__ieee754_exp10f): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_exp10l.c (__ieee754_exp10l): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_exp2.c (__ieee754_exp2): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_exp2f.c (__ieee754_exp2f): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_exp2l.c (__ieee754_exp2l): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_expf.c (__ieee754_expf): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_expl.c (__ieee754_expl): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_fmod.c (__ieee754_fmod): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_fmodf.c (__ieee754_fmodf): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_fmodl.c (__ieee754_fmodl): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_log.c (__ieee754_log): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_log10.c (__ieee754_log10): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_log10f.c (__ieee754_log10f): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_log10l.c (__ieee754_log10l): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_log2.c (__ieee754_log2): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_log2f.c (__ieee754_log2f): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_log2l.c (__ieee754_log2l): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_logf.c (__ieee754_logf): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_logl.c (__ieee754_logl): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_pow.c (__ieee754_pow): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_remainder.c (__ieee754_remainder):
 Likewise.
 * sysdeps/m68k/m680x0/fpu/e_remainderf.c (__ieee754_remainderf):
 Likewise.
 * sysdeps/m68k/m680x0/fpu/e_remainderl.c (__ieee754_remainderl):
 Likewise.
 * sysdeps/m68k/m680x0/fpu/e_scalb.c (__ieee754_scalb): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_sinh.c (__ieee754_sinh): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_sinhf.c (__ieee754_sinhf): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_sinhl.c (__ieee754_sinhl): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_sqrt.c (__ieee754_sqrt): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_sqrtf.c (__ieee754_sqrtf): Likewise.
 * sysdeps/m68k/m680x0/fpu/e_sqrtl.c (__ieee754_sqrtl): Likewise.
 * sysdeps/mips/fpu/e_sqrt.c (__ieee754_sqrt): Likewise.
 * sysdeps/mips/fpu/e_sqrtf.c (__ieee754_sqrtf): Likewise.
 * sysdeps/mips/mips64/e_sqrtl.c (__ieee754_sqrtl): Likewise.
 * sysdeps/powerpc/fpu/e_hypot.c (__ieee754_hypot): Likewise.
 * sysdeps/powerpc/fpu/e_hypotf.c (__ieee754_hypotf): Likewise.
 * sysdeps/powerpc/fpu/e_sqrt.c (__ieee754_sqrt): Likewise.
 * sysdeps/powerpc/fpu/e_sqrtf.c (__ieee754_sqrtf): Likewise.
 * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypot.c
 (__ieee754_hypot): Likewise.
 * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypotf.c
 (__ieee754_hypotf): Likewise.
 * sysdeps/powerpc/powerpc64/le/fpu/e_sqrtf128.c (__ieee754_sqrtf128):
 Likewise.
 * sysdeps/powerpc/powerpc64/le/power9/fpu/e_sqrtf128.c
 (__ieee754_sqrf128): Likewise.
 * sysdeps/riscv/e_sqrtl.c (__ieee754_sqrtl): Likewise.
 * sysdeps/riscv/rvd/e_sqrt.c (__ieee754_sqrf): Likewise.
 * sysdeps/riscv/rvf/e_sqrtf.c (__ieee754_sqrtf): Likewise.
 * sysdeps/s390/fpu/e_sqrt.c (__ieee754_sqrt): Likewise.
 * sysdeps/s390/fpu/e_sqrtf.c (__ieee754_sqrtf): Likewise.
 * sysdeps/s390/fpu/e_sqrtl.c (__ieee754_sqrtl): Likewise.
 * sysdeps/sparc/sparc32/e_sqrt.c (__ieee754_sqrt): Likewise.
 * sysdeps/sparc/sparc64/fpu/e_sqrtl.c (__ieee754_sqrtl): Likewise.
 * sysdeps/x86/fpu/e_sqrtf128.c (__ieee754_sqrtf128): Likewise.
 * sysdeps/x86_64/fpu/e_exp2l.S (__ieee754_exp2l): Likewise.
 * sysdeps/x86_64/fpu/e_expl.S (__ieee754_expl): Likewise.
 * sysdeps/x86_64/fpu/e_fmodl.S (__ieee754_fmodl): Likewise.
 * sysdeps/x86_64/fpu/e_log10l.S (__ieee754_log10l): Likewise.
 * sysdeps/x86_64/fpu/e_log2l.S (__ieee754_log2l): Likewise.
 * sysdeps/x86_64/fpu/e_logl.S (__ieee754_logl): Likewise.
 * sysdeps/x86_64/fpu/e_powl.S (__ieee754_powl): Likewise.
 * sysdeps/x86_64/fpu/e_remainderl.S (__ieee754_remainderl): Likewise.
 * sysdeps/x86_64/fpu/e_scalbl.S (__ieee754_scalbl): Likewise.
 * sysdeps/x86_64/fpu/e_sqrt.c (__ieee754_sqrt): Likewise.
 * sysdeps/x86_64/fpu/e_sqrtf.c (__ieee754_sqrtf): Likewise.
 * sysdeps/x86_64/fpu/multiarch/e_asin.c (__ieee754_asin): Likewise.
 * sysdeps/x86_64/fpu/multiarch/e_atan2.c (__ieee754_atan2): Likewise.
 * sysdeps/x86_64/fpu/multiarch/e_exp.c (__ieee754_exp): Likewise.
 * sysdeps/x86_64/fpu/multiarch/e_exp2f.c (__ieee754_exp2f): Likewise.
 * sysdeps/x86_64/fpu/multiarch/e_expf.c (__ieee754_expf): Likewise.
 * sysdeps/x86_64/fpu/multiarch/e_log.c (__ieee754_log): Likewise.
 * sysdeps/x86_64/fpu/multiarch/e_log2f.c (__ieee754_log2f): Likewise.
 * sysdeps/x86_64/fpu/multiarch/e_logf.c (__ieee754_logf): Likewise.
 * sysdeps/x86_64/fpu/multiarch/e_pow.c (__ieee754_pow): Likewise.
 * sysdeps/x86_64/fpu/multiarch/e_powf.c (__ieee754_powf): Likewise.
 * sysdeps/alpha/alphaev6/fpu/e_sqrt.S (strong_alias): Remove.
 (SHLIB_COMPAT): Add test.
 (compat_symbol): Add _finite compat_symbol.
 * sysdeps/alpha/alphaev6/fpu/e_sqrtf.S (strong_alias): Remove.
 (SHLIB_COMPAT): Add test.
 (compat_symbol): Add _finite compat_symbol.
 * sysdeps/alpha/e_sqrtl.c (versioned_symbol): Remove.
 (strong_alias): Remove.
 (compat_symbol): Add _finite compat_symbol.
 * sysdeps/alpha/fpu/e_sqrt.c (strong_alias): Remove.
 (compat_symbol): Add _finite compat_symbol.
 (versioned_symbol): Remove.
 (SHLIB_COMPAT): Add test.
 * sysdeps/alpha/fpu/e_sqrtf.c (SHLIB_COMPAT): Add test.
 (compat_symbol): Add _finite compat_symbol.
 (versioned_symbol): Remove.
 (strong_alias): Remove.
 * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypot-power7.c
 (strong_alias): Remove.
 * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypot-ppc32.c
 (strong_alias): Likewise.
 * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypotf-power7.c
 (strong_alias): Likewise.
 * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypotf-ppc32.c
 (strong_alias): Likewise.
 * sysdeps/generic/math-type-macros.h (declare_mgen_finite_alias_x):
 Replace strong_alias with libm_alias_finte.
 * sysdeps/ieee754/float128/float128_private.h (__acosl, __acoshl,
 __asinl, __atan2l, __atanhl, __coshl, __exp10l, __expl, __fmodl,
 __gammal_r, __hypotl, __j0l, __j1l, __jnl, __lgammal_r, __log10l,
 __log10l, __log2l, __logl, __powl, __remainderl, __sinhl, __y0l,
 __y1l, __ynl): New define.
 * sysdeps/ieee754/libm-alias-finite.h: New file.

nsz/mathvec 2019-07-16 10:01:51 UTC 2019-07-16
aarch64: add vector sin, cos, log and pow abi symbols

Author: Szabolcs Nagy
Author Date: 2019-06-28 14:23:27 UTC

aarch64: add vector sin, cos, log and pow abi symbols

Add simple assembly implementations that fall back to scalar code,
similar to the vector exp code.

2019-07-15 Szabolcs Nagy <szabolcs.nagy@arm.com>

 * sysdeps/aarch64/fpu/Makefile: Add functions.
 * sysdeps/aarch64/fpu/Versions: Add symbols.
 * sysdeps/aarch64/fpu/libmvec_double_vlen2_cos.S: New file.
 * sysdeps/aarch64/fpu/libmvec_double_vlen2_log.S: New file.
 * sysdeps/aarch64/fpu/libmvec_double_vlen2_pow.S: New file.
 * sysdeps/aarch64/fpu/libmvec_double_vlen2_sin.S: New file.
 * sysdeps/aarch64/fpu/libmvec_float_vlen4_cosf.S: New file.
 * sysdeps/aarch64/fpu/libmvec_float_vlen4_logf.S: New file.
 * sysdeps/aarch64/fpu/libmvec_float_vlen4_powf.S: New file.
 * sysdeps/aarch64/fpu/libmvec_float_vlen4_sinf.S: New file.
 * sysdeps/aarch64/fpu/test-double-vlen2-wrappers.c: Add wrappers.
 * sysdeps/aarch64/fpu/test-float-vlen4-wrappers.c: Add wrappers.
 * sysdeps/aarch64/libm-test-ulps: Update.
 * sysdeps/unix/sysv/linux/aarch64/libmvec.abilist: Update.

azanella/atexit-order 2019-07-11 18:49:24 UTC 2019-07-11
stdlib: Make atexit to not act as __cxa_atexit

Author: Adhemerval Zanella
Author Date: 2019-06-12 13:37:11 UTC

stdlib: Make atexit to not act as __cxa_atexit

This is patch to addresses the issue brought in recent discussion
regarding atexit and shared libraries [1] [2]. As indicated in the
libc-alpha discussion, the issue is since atexit uses __cxa_atexit
its interaction __cxa_finalize could lead to atexit handlers being
executed in a different order than the expected one. The github
project gives a small example that triggers it [3].

The changes I could come with changes slight the atexit semantic
as described in my last email [4]. So basically the changes are:

  1. Add the __atexit symbol which is linked as __cxa_finalize in
     static mode (so __dso_handle is correctly set). The __atexit
     symbol adds an ef_at exit_function entry on __exit_funcs,
     different than an ef_cxa one from __cxa_atexit.

     Old binaries would still call __cxa_atexit, so we do not actually
     need to add a compat symbol.

  2. Make __cxa_finalize to handle ef_at as well, similar to ef_cxa.

  3. Change how the internal exit handler are organized, so ef_at
     and ef_on handles (registered by atexit and on_exit) are executed
     before ef_cxa (registered by __cxa_atexit).

     Each entry set (struct exit_function_list) has on type associated
     (el_at or el_cxa) to represent the internal handle it contains.
     New insertions (done by the __atexit, __cxa_atexit, etc.) keep the
     node orders, with following constraints:

     3.1. el_at nodes should be prior el_cxa.
     3.2. el_at should contain only ef_at, ef_on, or ef_free elements.
     3.3. el_cxa should contain only ef_cxa or ef_free elements.
     3.4. new insertions on each node type should be be kept in lifo order.
     3.5. the original first element should be last one (since it is static
          allocated and 'exit' will deallocated the nodes in order. */

     So the execution on both __cxa_finalize, exit, or quick_exit will
     iterate over the list by executing first atexit/on_exit handlers and
     then __cxa_atexit ones. New handlers added by registered functions
     are handled as before, by using the ef_free entry and reseting the
     list iteration.

[1] https://sourceware.org/ml/libc-alpha/2019-06/msg00229.html
[2] https://sourceware.org/ml/libc-help/2019-06/msg00025.html
[3] https://github.com/mulle-nat/ld-so-breakage
[4] https://sourceware.org/ml/libc-alpha/2019-06/msg00231.html

tuliom/libmvec 2019-07-08 13:55:49 UTC 2019-07-08
PPC64: Add libmvec SIMD double-precision power function.

Author: Shawn Landden
Author Date: 2019-06-26 14:52:45 UTC

PPC64: Add libmvec SIMD double-precision power function.

Based off the ./sysdeps/ieee754/dbl-64/pow.c implementation,
and provides identical results.

Unlike other libmvec functions, this sets the underflow and overflow bits.
The caller can check these flags, and possibly re-run the calculations with
scalar pow to figure out what is causing the overflow or underflow.

I may have not normalized the data for benchmarking this properly,
but operating only on integers between 0-2^32 and floats between 0.5 and
1 I get the following:

Running 20 times over 32MiB
vector: mean 535.824919 (sd 0.246088)
scalar: mean 286.384220 (sd 0.027630)

Which is a very impressive speed boost.

2019-05-11 Shawn Landden <shawn@git.icu>

 [BZ #24210]
 * NEWS: Noted the addition of PPC64 vector pow function.
 * sysdeps/powerpc/bits/math-vector.h: Added entry for vector pow.
 * sysdeps/powerpc/powerpc64/fpu/Versions: Added vector pow entry.
 * sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile:
 (libmvec-sysdep_routines, CFLAGS-vec_d_pow2_vsx.c):
 (CFLAGS-d_pow_log2_data.c): Added build of VSX SIMD pow
 function and tests.
 * sysdeps/powerpc/powerpc64/fpu/multiarch/test-double-vlen2-wrappers.c:
 Added entry for vector pow.
 * sysdeps/powerpc/powerpc64/fpu/multiarch/vec_d_pow2_vsx.c: New file.
 * sysdeps/powerpc/powerpc64/fpu/multiarch/vec_math_err.c: Likewise.
 * sysdeps/powerpc/powerpc64/fpu/multiarch/d_powf_log2_data.c: Likewise.
 * sysdeps/unix/sysv/linux/powerpc/powerpc64/libmvec.abilist: SIMD pow
 added.

ibm/2.28/master 2019-06-27 13:48:22 UTC 2019-06-27
Merge branch release/2.28/master into ibm/2.28/master

Author: Tulio Magno Quites Machado Filho
Author Date: 2019-06-27 13:48:22 UTC

Merge branch release/2.28/master into ibm/2.28/master

zack/no-nested-includes 2019-06-26 15:43:42 UTC 2019-06-26
Rename sys/ucontext.h to bits/ucontext.h.

Author: Zack Weinberg
Author Date: 2019-06-11 17:05:02 UTC

Rename sys/ucontext.h to bits/ucontext.h.

sys/ucontext.h is effectively a bits header. Its contents are
extremely system-specific, and it’s strongly associated with a
specific public header (ucontext.h) that provides a superset of its
definitions, but there are other public headers that also require some
of its definitions. This patch therefore moves it into the bits/
namespace and adjusts all the headers that refer to it. In case there
are external users, a stub is added that includes ucontext.h.

Most of the fallout changes are trivial, but aarch64, ia64 and riscv
need a little more work. aarch64 sys/ucontext.h (now bits/ucontext.h)
was including sys/procfs.h for the definition of elf_greg_t etc;
the simplest fix is to have it include bits/procfs.h instead (and then
that needs to include sys/user.h for user_regs_struct). This is not
ideal but fixing it properly would require disentangling all of the
debugger interface headers which is more than I’m up for at the moment.

ia64 bits/ptrace.h and bits/procfs.h were both including
bits/sigcontext.h, which is only licensed to be included from
signal.h. (I’m not sure how this ever worked, or why it broke with
this patch and not some previous one.) This is fixed by creating
another single-type header, bits/types/__ia64_fpreg.h, which provides
the only thing they need from bits/sigcontext.h.

s/u/s/l/riscv/makecontext.c was defining makecontext with a function
head that didn’t agree with its official prototype (in ucontext.h);
formerly that file did not include ucontext.h, only sys/ucontext.h,
so we were getting away with it, but it’s still wrong. Making the
function head match the prototype actually simplifies the code.

 * sysdeps/generic/sys/ucontext.h: Move to top level bits/ucontext.h.
 Adjust multiple inclusion guard.
 * sysdeps/arm/sys/ucontext.h: Move to sysdeps/arm/bits/ucontext.h.
 Adjust multiple inclusion guard.
 * sysdeps/i386/sys/ucontext.h: Similarly.
 * sysdeps/m68k/sys/ucontext.h: Similarly.
 * sysdeps/mips/sys/ucontext.h: Similarly.
 * sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h: Similarly.
 * sysdeps/unix/sysv/linux/alpha/sys/ucontext.h: Similarly.
 * sysdeps/unix/sysv/linux/arm/sys/ucontext.h: Similarly.
 * sysdeps/unix/sysv/linux/csky/sys/ucontext.h: Similarly.
 * sysdeps/unix/sysv/linux/hppa/sys/ucontext.h: Similarly.
 * sysdeps/unix/sysv/linux/ia64/sys/ucontext.h: Similarly.
 * sysdeps/unix/sysv/linux/m68k/sys/ucontext.h: Similarly.
 * sysdeps/unix/sysv/linux/microblaze/sys/ucontext.h: Similarly.
 * sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Similarly.
 * sysdeps/unix/sysv/linux/nios2/sys/ucontext.h: Similarly.
 * sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h: Similarly.
 * sysdeps/unix/sysv/linux/riscv/sys/ucontext.h: Similarly.
 * sysdeps/unix/sysv/linux/s390/sys/ucontext.h: Similarly.
 * sysdeps/unix/sysv/linux/sh/sys/ucontext.h: Similarly.
 * sysdeps/unix/sysv/linux/sparc/sys/ucontext.h: Similarly.
 * sysdeps/unix/sysv/linux/x86/sys/ucontext.h: Similarly.
 * stdlib/Makefile: Install bits/ucontext.h.

 * stdlib/sys/ucontext.h: New backward compatibility stub header,
 includes ucontext.h.
 * include/sys/ucontext.h: New wrapper.

 * sysdeps/unix/sysv/linux/aarch64/bits/procfs.h: Allow inclusion
 by bits/ucontext.h as well as sys/procfs.h. Include sys/user.h.
 * sysdeps/unix/sysv/linux/aarch64/bits/ucontext.h: Include
 bits/procfs.h instead of sys/procfs.h.

 * sysdeps/unix/sysv/linux/ia64/bits/types/__ia64_fpreg.h:
 New file, contents factored out of ia64/bits/sigcontext.h and
 ia64/bits/ucontext.h.
 * sysdeps/unix/sysv/linux/ia64/Makefile:
 Install bits/types/__ia64_fpreg.h. Merge subdir=misc blocks.
 * sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h
 * sysdeps/unix/sysv/linux/ia64/bits/ucontext.h:
 Include bits/types/__ia64_fpreg.h for struct ia64_fpreg.

 * sysdeps/unix/sysv/linux/ia64/bits/procfs.h:
 Include bits/types/__ia64_fpreg.h for struct ia64_fpreg.
 Don’t include bits/sigcontext.h or bits/ucontext.h.
 * sysdeps/unix/sysv/linux/ia64/sys/ptrace.h:
 Don’t include bits/sigcontext.h.

 * sysdeps/unix/sysv/linux/riscv/makecontext.c: Include
 ucontext.h, not sys/ucontext.h. Correct function head to match
 prototype in ucontext.h. Use va_arg to retrieve all arguments
 past argc.

 * sysdeps/unix/sysv/linux/s390/tst-ptrace-singleblock.c:
 Sort list of includes.

 * signal/signal.h, stdlib/ucontext.h
 * sysdeps/unix/sysv/linux/alpha/bits/procfs-prregset.h
 * sysdeps/unix/sysv/linux/ia64/sys/ptrace.h
 * sysdeps/unix/sysv/linux/riscv/bits/procfs.h
 * sysdeps/unix/sysv/linux/s390/bits/procfs.h:
 Include bits/ucontext.h, not sys/ucontext.h.

 * sysdeps/unix/sysv/linux/aarch64/sigcontextinfo.h
 * sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
 * sysdeps/unix/sysv/linux/nios2/sigcontextinfo.h
 * sysdeps/unix/sysv/linux/riscv/sigcontextinfo.h:
 Include signal.h, not sys/ucontext.h.

 * sysdeps/unix/sysv/linux/arm/register-dump.h
 * sysdeps/unix/sysv/linux/csky/register-dump.h:
 Include ucontext.h, not sys/ucontext.h.

 * sysdeps/unix/sysv/linux/aarch64/ucontext_i.sym
 * sysdeps/unix/sysv/linux/alpha/ucontext-offsets.sym
 * sysdeps/unix/sysv/linux/arm/ucontext_i.sym
 * sysdeps/unix/sysv/linux/csky/abiv2/ucontext_i.sym
 * sysdeps/unix/sysv/linux/hppa/ucontext_i.sym
 * sysdeps/unix/sysv/linux/i386/ucontext_i.sym
 * sysdeps/unix/sysv/linux/ia64/sigcontext-offsets.sym
 * sysdeps/unix/sysv/linux/m68k/m680x0/ucontext_i.sym
 * sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.sym
 * sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.sym
 * sysdeps/unix/sysv/linux/mips/ucontext_i.sym
 * sysdeps/unix/sysv/linux/nios2/ucontext_i.sym
 * sysdeps/unix/sysv/linux/riscv/ucontext_i.sym
 * sysdeps/unix/sysv/linux/s390/ucontext_i.sym
 * sysdeps/unix/sysv/linux/sh/sh3/ucontext_i.sym
 * sysdeps/unix/sysv/linux/sh/sh4/ucontext_i.sym
 * sysdeps/unix/sysv/linux/sparc/sparc32/ucontext_i.sym
 * sysdeps/unix/sysv/linux/x86_64/ucontext_i.sym:
 Include stddef.h and signal.h; don’t include any other headers.

 * scripts/check-obsolete-constructs.py (HEADER_ALLOWED_INCLUDES)
 (SYSDEP_ALLOWED_INCLUDES): Update.

fw/resolv-cleanups 2019-05-17 09:10:51 UTC 2019-05-17
nss_dns: Remove RES_USE_INET6 handling

Author: Florian Weimer
Author Date: 2019-05-17 09:10:51 UTC

nss_dns: Remove RES_USE_INET6 handling

Since commit 3f8b44be0a658266adff5ece1e4bc3ce097a5dbe ("resolv:
Remove support for RES_USE_INET6 and the inet6 option"),
res_use_inet6 () always evaluates to false.

fw/bug24562 2019-05-16 10:08:38 UTC 2019-05-16
WIP Support exotic character sets in __fxprintf [BZ #24562]

Author: Florian Weimer
Author Date: 2019-05-16 10:08:37 UTC

WIP Support exotic character sets in __fxprintf [BZ #24562]

This does not quite work because vfprintf has a similar
incorrect assumption.

release/2.25/master 2019-05-16 08:50:36 UTC 2019-05-16
Fix crash in _IO_wfile_sync (bug 20568)

Author: Andreas Schwab
Author Date: 2019-05-14 15:14:59 UTC

Fix crash in _IO_wfile_sync (bug 20568)

When computing the length of the converted part of the stdio buffer, use
the number of consumed wide characters, not the (negative) distance to the
end of the wide buffer.

(cherry picked from commit 32ff397533715988c19cbf3675dcbd727ec13e18)

schwab/ilp32 2019-05-09 08:59:13 UTC 2019-05-09
aarch64: Update ILP32 abilists for glibc 2.29

Author: Szabolcs Nagy
Author Date: 2019-05-01 12:08:07 UTC

aarch64: Update ILP32 abilists for glibc 2.29

This will need to be merged with the initial ilp32 abilist commit.

2019-05-09 Szabolcs Nagy <szabolcs.nagy@arm.com>

 * sysdeps/unix/sysv/linux/aarch64/ilp32/libc.abilist: Update.

fw/tst-mallocfork2 2019-05-03 15:46:36 UTC 2019-05-03
malloc/tst-mallocfork2: Use process-shared barriers

Author: Florian Weimer
Author Date: 2019-05-03 15:46:36 UTC

malloc/tst-mallocfork2: Use process-shared barriers

This synchronization method has a lower overhead and makes
it more likely that the signal arrives during one of the critical
functions.

Also test for fork deadlocks explicitly.

fw/twalk_r-iconv 2019-05-02 10:37:21 UTC 2019-05-02
iconv: Use __twalk_r in __gconv_release_shlib

Author: Florian Weimer
Author Date: 2019-05-02 10:37:21 UTC

iconv: Use __twalk_r in __gconv_release_shlib

google/grte/v6-2.29/master 2019-05-01 01:24:46 UTC 2019-05-01
As with gettimeofday, avoid vdso for clang-compiled time()

Author: Stan Shebs
Author Date: 2018-03-13 18:37:02 UTC

As with gettimeofday, avoid vdso for clang-compiled time()

fw/bug21242 2019-04-15 15:39:45 UTC 2019-04-15
ld.so: Introduce delayed relocation processing

Author: Florian Weimer
Author Date: 2018-06-06 14:02:02 UTC

ld.so: Introduce delayed relocation processing

This makes it possible to use IFUNC resolvers which depend
on relocations themselves, as long as these reloctions do
not depend on IFUNCs.

So far, delayed relocation processing is only implemented for
x86-64.

release/2.24/master 2019-02-04 20:27:55 UTC 2019-02-04
x86-64 memcmp: Use unsigned Jcc instructions on size [BZ #24155]

Author: H.J. Lu
Author Date: 2019-02-04 16:55:52 UTC

x86-64 memcmp: Use unsigned Jcc instructions on size [BZ #24155]

Since the size argument is unsigned. we should use unsigned Jcc
instructions, instead of signed, to check size.

Tested on x86-64 and x32, with and without --disable-multi-arch.

 [BZ #24155]
 CVE-2019-7309
 * NEWS: Updated for CVE-2019-7309.
 * sysdeps/x86_64/memcmp.S: Use RDX_LP for size. Clear the
 upper 32 bits of RDX register for x32. Use unsigned Jcc
 instructions, instead of signed.
 * sysdeps/x86_64/x32/Makefile (tests): Add tst-size_t-memcmp-2.
 * sysdeps/x86_64/x32/tst-size_t-memcmp-2.c: New test.

(cherry picked from commit 3f635fb43389b54f682fc9ed2acc0b2aaf4a923d)

fw/bug20018-backport 2019-02-04 14:47:59 UTC 2019-02-04
Restore GLIBC_PRIVATE ABI after CVE-2016-10739 fix [BZ #20018]

Author: Florian Weimer
Author Date: 2019-02-04 14:47:59 UTC

Restore GLIBC_PRIVATE ABI after CVE-2016-10739 fix [BZ #20018]

This commit avoids adding the __inet_aton_exact@GLIBC_PRIVATE
symbol. In master, the separately-compiled getaddrinfo
implementation in nscd needs it, however such an internal ABI change
is not desirable on a release branch if it can be avoided easily.

siddhesh/changelog-begone 2019-01-12 11:16:42 UTC 2019-01-12
Another major update

Author: Siddhesh Poyarekar
Author Date: 2019-01-12 11:09:16 UTC

Another major update

ibm/2.26/master 2019-01-11 16:20:21 UTC 2019-01-11
Merge branch 'release/2.26/master' into ibm/2.26/master

Author: Tulio Magno Quites Machado Filho
Author Date: 2019-01-11 16:20:21 UTC

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

aaribaud/bugzilla/23789/v4 2018-11-02 06:03:52 UTC 2018-11-02
Ensure mktime sets errno on error [BZ #23789]

Author: Albert ARIBAUD (3ADEV)
Author Date: 2018-10-24 12:43:06 UTC

Ensure mktime sets errno on error [BZ #23789]

Posix mandates that mktime set errno to EOVERFLOW
on error, but the glibc mktime wasn't doing it so
far.

Fix this and add a test to prevent regressions.
The fix also fixes the same issue in timegm.

Tested with 'make check' on x86-linux-gnu and
i686-linux-gnu.

        * time/Makefile: Add bug-mktime4.
 * time/bug-mktime4.c: New file.
 * time/mktime.c
 (__mktime_internal): Set errno to EOVERFLOW on error.
 (mktime): Move call to __tzset inside conditional.

aaribaud/bugzilla/23789/v2 2018-10-27 15:18:02 UTC 2018-10-27
Ensure mktime sets errno on error (bug 23789)

Author: Albert ARIBAUD (3ADEV)
Author Date: 2018-10-24 12:43:06 UTC

Ensure mktime sets errno on error (bug 23789)

Posix mandates that mktime set errno to EOVERFLOW
on error, that it, upon retuning -1, but the glibc
mktime does not so far on 32-bit architectures.

Fix this and add a test to prevent regressions.

The test was run through 'make check' on i686-linux-gnu,
then the fix was added and 'make check' run again.

 * time/mktime.c
 (mktime): Set errno to EOVERFLOW on error.
 * time/bug-mktime4.c: New file.
        * time/Makefile: Add bug-mktime4.

aaribaud/y2038 2018-10-24 10:53:27 UTC 2018-10-24
Y2038: add _TIME_BITS support

Author: Albert ARIBAUD (3ADEV)
Author Date: 2017-09-06 08:00:42 UTC

Y2038: add _TIME_BITS support

This makes all previously defined Y2038-proof API types, functions and
implementations the default when _TIME_BITS==64 and __WORDSIZE==32 (so
that 64-bit architectures are unaffected).

Note: it is assumed that the API is consistent, i.e. for each API type
which is enabled here, all API functions which depend on this type are
enabled and mapped to Y2038-proof implementations.

azanella/generic-strings 2018-10-02 15:32:35 UTC 2018-10-02
sh: Add string-fzb.h

Author: Adhemerval Zanella
Author Date: 2017-02-21 20:14:16 UTC

sh: Add string-fzb.h

Use the SH cmp/str on has_{zero,eq,zero_eq}.

Checked on sh4-linux-gnu.

 Adhemerval Zanella <adhemerval.zanella@linaro.org>

 * sysdeps/sh/string-fzb.h: New file.

azanella/qsort-refactor 2018-09-04 18:45:12 UTC 2018-09-04
stdlib: Implement introsort with qsort

Author: Adhemerval Zanella
Author Date: 2018-09-03 18:30:15 UTC

stdlib: Implement introsort with qsort

This patch adds a introsort implementation on qsort to avoid worse-case
performance of quicksort to O(nlog n). The fallback used is a simple
heapsort based on Linux implementation. As a side note the introsort
implementation is similar the one used on libstdc++ for std::sort.

The performance shown some regression due heapsort usage, as expected:

Results for member size 4
  MostlySorted
  nmemb | base | patched | diff
       32 | 1809 | 2034 | 12.44
     4096 | 796888 | 1051955 | 32.01
    32768 | 7616495 | 10820159 | 42.06
   524288 | 142093487 | 250602727 | 76.36

  Repeated
  nmemb | base | patched | diff
       32 | 1875 | 2046 | 9.12
     4096 | 912206 | 1123392 | 23.15
    32768 | 8690714 | 10223479 | 17.64
   524288 | 171229868 | 287344355 | 67.81

  Sorted
  nmemb | base | patched | diff
       32 | 1367 | 1354 | -0.95
     4096 | 341229 | 1153712 | 238.10
    32768 | 3358312 | 10983978 | 227.07
   524288 | 66206257 | 232996299 | 251.92

  Unsorted
  nmemb | base | patched | diff
       32 | 2182 | 2209 | 1.24
     4096 | 990920 | 1101897 | 11.20
    32768 | 10119221 | 11319451 | 11.86
   524288 | 188297819 | 295723362 | 57.05

Results for member size 8
  MostlySorted
  nmemb | base | patched | diff
       32 | 1976 | 2061 | 4.30
     4096 | 720747 | 1048324 | 45.45
    32768 | 7161384 | 10927694 | 52.59
   524288 | 133265602 | 264259752 | 98.30

  Repeated
  nmemb | base | patched | diff
       32 | 2123 | 2265 | 6.69
     4096 | 913059 | 1124658 | 23.17
    32768 | 8785972 | 11353472 | 29.22
   524288 | 171667139 | 303675135 | 76.90

  Sorted
  nmemb | base | patched | diff
       32 | 1193 | 1128 | -5.45
     4096 | 301818 | 1101787 | 265.05
    32768 | 2961904 | 10964479 | 270.18
   524288 | 58873679 | 230789472 | 292.01

  Unsorted
  nmemb | base | patched | diff
       32 | 2099 | 2407 | 14.67
     4096 | 1024575 | 1154641 | 12.69
    32768 | 10017934 | 11635442 | 16.15
   524288 | 188778771 | 310044501 | 64.24

Results for member size 32
  MostlySorted
  nmemb | base | patched | diff
       32 | 3864 | 4423 | 14.47
     4096 | 1102305 | 1898226 | 72.21
    32768 | 9915730 | 19176780 | 93.40
   524288 | 193398884 | 478171367 | 147.25

  Repeated
  nmemb | base | patched | diff
       32 | 4636 | 3730 | -19.54
     4096 | 1359433 | 1847693 | 35.92
    32768 | 13028460 | 19120804 | 46.76
   524288 | 251463610 | 571423413 | 127.24

  Sorted
  nmemb | base | patched | diff
       32 | 1223 | 1165 | -4.74
     4096 | 310945 | 1922987 | 518.43
    32768 | 2975730 | 19160622 | 543.90
   524288 | 63995389 | 423600523 | 561.92

  Unsorted
  nmemb | base | patched | diff
       32 | 4612 | 5024 | 8.93
     4096 | 1436912 | 1989848 | 38.48
    32768 | 14043593 | 20652436 | 47.06
   524288 | 269586508 | 641284939 | 137.88

Checked on x86_64-linux-gnu.

 * stdlib/qsort.c (lg): New function.
 (R_HEAP): New define.
 * stdlib/qsort_common.c (R_CMP_ARG_USE): New define.
 (R_HEAP): New function: fallback heapsort implementation.
 (R_FUNC): Use fallback heapsort if quicksort depth exceeds
 2 times log2 of total element number.

azanella/aarch64-mempcpy 2018-07-05 12:18:18 UTC 2018-07-05
aarch64: ifunc mem* cleanups

Author: Adhemerval Zanella
Author Date: 2018-07-05 12:08:16 UTC

aarch64: ifunc mem* cleanups

aaribaud/y2038-submitted-v1 2018-06-13 08:21:00 UTC 2018-06-13
Y2038: make __mktime_internal compatible with 64-bit-time

Author: Albert ARIBAUD (3ADEV)
Author Date: 2018-05-02 11:15:50 UTC

Y2038: make __mktime_internal compatible with 64-bit-time

This implies that its callers be 64-bit-time compatible too.
It is done by creating 64-bit-time versions of these and
turning their original 32-bit-time versions into wrappers
(at a slight execution time cost).

The callers affected are:

      * mktime
      * timelocal (as an alias of mktime)
      * timegm

zack/elf-builtin-expect-conversion 2018-06-12 14:02:27 UTC 2018-06-12
Convert __builtin_expect to __glibc_(un)likely throughout elf/.

Author: Zack Weinberg
Author Date: 2018-06-01 16:53:59 UTC

Convert __builtin_expect to __glibc_(un)likely throughout elf/.

In the previous patch I didn't change a use of __builtin_expect to
__glibc_(un)likely that happened to be right next to the code I was
actually working on; Andreas asked why not, and I said that there were
a bunch more uses of __builtin_expect in that file and I would convert
them all in a separate patch. This is that patch, converting all of
elf/.

I would appreciate someone checking over this patch very carefully
indeed. In a whole bunch of places, __builtin_expect was used in a
way that did not map mechanically to the newer convention. The test
suite caught one mistake; I'm not confident I didn't make any more.

Writing this patch gave me a deeper appreciation for why we _want_ to
switch to __glibc_(un)likely, but also for how difficult it can be. I
now think that people should _not_ be asked to change existing uses of
__builtin_expect in a patch whose purpose is something else.

 * elf/dl-addr.c, elf/dl-cache.c, elf/dl-close.c, elf/dl-deps.c
 * elf/dl-environ.c, elf/dl-error-skeleton.c, elf/dl-fini.c
 * elf/dl-fptr.c, elf/dl-init.c, elf/dl-libc.c, elf/dl-minimal.c
 * elf/dl-open.c, elf/dl-reloc.c, elf/dl-runtime.c
 * elf/dl-sysdep.c, elf/dl-tls.c, elf/dl-version.c, elf/ldconfig.c
 * elf/rtld.c: Replace __builtin_expect with __glibc_likely or
 __glibc_unlikely, as appropriate, throughout.

hjl/pr23240/fw 2018-06-06 15:32:12 UTC 2018-06-06
Check non-lazy binding with LD_PRELOAD and weak reference

Author: H.J. Lu
Author Date: 2018-05-27 14:15:35 UTC

Check non-lazy binding with LD_PRELOAD and weak reference

Check non-lazy binding with

1. Reference to unrelocated IFUNC function with LD_PRELOAD.
2. Weak reference.

 [BZ #23176]
 [BZ #23240]
 * elf/Makefile (tests): Add reldep6a.
 (tests-internal): Add ifuncpreload1
 (modules-names): Add ifuncpreloadmod1a and ifuncpreloadmod1b.
 ($(objpfx)reldep6a): New.
 ($(objpfx)reldep6a.out): Likewise.
 (reldep6a-ENV): Likewise.
 ($(objpfx)ifuncpreload1): Likewise.
 ($(objpfx)ifuncpreload1.out): Likewise.
 (ifuncpreload1-ENV): Likewise.
 * elf/ifuncpreload1.c: New file.
 * elf/ifuncpreloadmod1a.c: Likewise.
 * elf/ifuncpreloadmod1b.c: Likewise.
 * elf/reldep6a.c: Likewise.

fw/libm-noprivate-2.27 2018-05-10 10:42:05 UTC 2018-05-10
Use custom x86 feature selection in libm

Author: Florian Weimer
Author Date: 2018-05-10 09:50:00 UTC

Use custom x86 feature selection in libm

ibm/2.22/master 2018-04-19 18:21:54 UTC 2018-04-19
Merge branch 'release/2.22/master' into ibm/2.22/master

Author: Tulio Magno Quites Machado Filho
Author Date: 2018-04-19 18:21:54 UTC

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

release/2.22/master 2018-04-13 17:30:20 UTC 2018-04-13
glob: Fix buffer overflow during GLOB_TILDE unescaping [BZ #22332]

Author: Paul Eggert
Author Date: 2017-10-22 08:00:57 UTC

glob: Fix buffer overflow during GLOB_TILDE unescaping [BZ #22332]

(cherry picked from commit a159b53fa059947cc2548e3b0d5bdcf7b9630ba8)

zack/wip-check-localplt-2 2018-03-26 13:05:19 UTC 2018-03-26
WIP finer-grained, more aggressive local PLT call check

Author: Zack Weinberg
Author Date: 2018-03-18 21:01:06 UTC

WIP finer-grained, more aggressive local PLT call check

zack/wip-pthread-no-dupe-defns 2018-03-26 12:30:46 UTC 2018-03-26
[Bug 15368] Move pthread_kill to libc and use it to implement raise.

Author: Zack Weinberg
Author Date: 2018-03-23 13:16:59 UTC

[Bug 15368] Move pthread_kill to libc and use it to implement raise.

The fix for bug #15368 was unnecessarily Linux-specific. To recap,
POSIX specifies raise to be async-signal-safe, but also specifies it
to be equivalent to pthread_kill(pthread_self(), sig), which is not
an async-signal-safe sequence of operations; a signal handler could
run in between pthread_self and pthread_kill, and do something (such
as calling fork, which is also async-signal-safe) that would invalidate
the thread descriptor. This is even true in the hypothetical case of
a port that doesn't implement multithreading: kill(getpid(), sig) will
fire the signal twice if a signal handler runs in between, calls fork,
and then returns on both sides of the fork. I don't see anything in
the standards to forbid that.

The Linux-specific fix was to override the definitions of raise in
both libpthread and libc to the same unitary function that blocks
signals, retrieves TID and PID directly from the kernel, calls tgkill,
and only then unblocks signals. This patch generalizes that to any
port: pthread_kill is moved from libpthread to libc, with a forwarding
stub left behind. The definition of raise in libpthread is also
replaced with a forwarding stub. The Linux-specific definition of
raise is deleted; those ports will now use sysdeps/pthread/raise.c,
which blocks signals first, then calls pthread_self and pthread_kill,
and then unblocks signals. Similarly, sysdeps/posix/raise.c (which
would be used on a port that didn't implement multithreading) blocks
signals, calls getpid and kill, and then unblocks signals. Thus,
ports need only implement the primitives correctly and do not need to
worry about making raise async-signal-safe.

The only wrinkle was that up till now, we did not bother initializing
the ->tid field of the initial thread's descriptor unless libpthread
was loaded; now that raise calls pthread_kill even in a single-
threaded environment, that won't fly. This is abstractly easy to fix;
the tricky part was figuring out _where_ to put the calls (two of
them, as it happens) to __pthread_initialize_pids, and I'd appreciate
careful eyes on those changes.

You might be wondering why it's safe to rely on the TID in the thread
descriptor, rather than calling gettid directly. Since all signals
are blocked from before calling pthread_self until after pthread_kill
uses the TID to call tgkill, the question is whether some _other_
thread could do something that would invalidate the calling thread's
descriptor, and I believe there is no such thing.

While I was at it I fixed another bug: raise was returning an error
code on failure (like pthread_kill does) instead of setting errno as
specified. This is user-visible but I don't think it's worth recording
as a fixed bug, nobody bothers checking whether raise failed anyway.

 * nptl/pt-raise.c
 * sysdeps/unix/sysv/linux/pt-raise.c
 * sysdeps/unix/sysv/linux/raise.c:
 Remove file.

 * sysdeps/unix/sysv/linux/pthread_kill.c: Use __is_internal_signal
 to check for forbidden signals. Use INTERNAL_SYSCALL_CALL to call
 getpid. Provide __libc_pthread_kill, with __pthread_kill as
 strong alias and pthread_kill as weak alias.

 * sysdeps/posix/raise.c: Block signals around the calls to
 __getpid and __kill. Provide __libc_raise, with raise as strong
 alias, libc_hidden_def for raise, and gsignal as weak alias.
 * sysdeps/pthread/raise.c: New file. Implement by blocking
 signals, calling pthread_self and pthread_kill, and then
 unblocking signals again. Provide same symbols as above.

 * sysdeps/generic/internal-signals.h: Define all of the same
 functions that sysdeps/unix/sysv/linux/internal-signals.h does,
 with sensible default definitions.
 * sysdeps/unix/sysv/linux/internal-signals.h: Clarify comments.

 * nptl/pthread_kill.c: Define __libc_pthread_kill, with
 __pthread_kill as strong alias and pthread_kill as weak alias.
 * nptl/pthread_self.c: Define __pthread_self, with
 pthread_self as weak alias.
 * signal/raise.c: Define __libc_raise, with raise as strong alias,
 libc_hidden_def for raise, and gsignal as weak alias.

 * nptl/Makefile: Move pthread_kill from libpthread-routines to
 routines. Remove pt-raise from libpthread-routines.
 * nptl/Versions (libc/GLIBC_2.28): Add pthread_kill.
 (libc/GLIBC_PRIVATE): Add __libc_pthread_kill and __libc_raise.
 * sysdeps/generic/pt-compat-stubs.S: Add stubs for raise and
 pthread_kill.

 * nptl/nptl-init.c (__pthread_initialize_minimal_internal):
 Don't call __pthread_initialize_pids here.
 * csu/libc-tls.c (__libc_setup_tls):
        Call __pthread_initialize_pids after all other setup.
 * elf/rtld.c (init_tls): Likewise.

 * include/pthreadP.h: New forwarder.
 * include/pthread.h: Add multiple inclusion guard. Declare
 __pthread_self.
 * include/signal.h: Declare __pthread_kill.

 * sysdeps/**/libc.abilist (GLIBC_2.28): Add pthread_kill.

mfabian/collation-update-2.27 2018-03-02 10:31:16 UTC 2018-03-02
Remove the lines from cmn_TW.UTF-8.in which cannot work at the moment.

Author: Mike FABIAN
Author Date: 2017-12-21 17:56:52 UTC

Remove the lines from cmn_TW.UTF-8.in which cannot work at the moment.

See this bug https://sourceware.org/bugzilla/show_bug.cgi?id=22898

These lines don’t yet work because of a glibc bug, not because of
problems in the locale data. No matter what sorting rules one uses,
these characters cannot be sorted at all at the moment.

As soon as that bug is fixed, these lines should be added back to the
test file.

 * localedata/cmn_TW.UTF-8.in: Remove the lines which cannot
        be sorted correctly at the moment because of a bug.

shebs/clangify 2018-02-07 21:00:02 UTC 2018-02-07
Use clang integrated assembler except when asm is output and not required to ...

Author: Stan Shebs
Author Date: 2018-02-07 21:00:02 UTC

Use clang integrated assembler except when asm is output and not required to be valid

release/2.23/master 2018-01-19 17:54:03 UTC 2018-01-19
x86-64: Properly align La_x86_64_retval to VEC_SIZE [BZ #22715]

Author: H.J. Lu
Author Date: 2018-01-19 17:53:50 UTC

x86-64: Properly align La_x86_64_retval to VEC_SIZE [BZ #22715]

_dl_runtime_profile calls _dl_call_pltexit, passing a pointer to
La_x86_64_retval which is allocated on stack. The lrv_vector0
field in La_x86_64_retval must be aligned to size of vector register.
When allocating stack space for La_x86_64_retval, we need to make sure
that the address of La_x86_64_retval + RV_VECTOR0_OFFSET is aligned to
VEC_SIZE. This patch checks the alignment of the lrv_vector0 field
and pads the stack space if needed.

Tested with x32 and x86-64 on SSE4, AVX and AVX512 machines. It fixed

FAIL: elf/tst-audit10
FAIL: elf/tst-audit4
FAIL: elf/tst-audit5
FAIL: elf/tst-audit6
FAIL: elf/tst-audit7

on x32 AVX512 machine.

(cherry picked from commit 207a72e2988c6d6343f50fe0128eb4fc4edfdd15)

 [BZ #22715]
 * sysdeps/x86_64/dl-trampoline.h (_dl_runtime_profile): Properly
 align La_x86_64_retval to VEC_SIZE.

hjl/pr22715/2.24 2018-01-17 14:36:33 UTC 2018-01-17
x86-64: Properly align La_x86_64_retval to VEC_SIZE [BZ #22715]

Author: H.J. Lu
Author Date: 2018-01-16 03:39:56 UTC

x86-64: Properly align La_x86_64_retval to VEC_SIZE [BZ #22715]

_dl_runtime_profile calls _dl_call_pltexit, passing a pointer to
La_x86_64_retval which is allocated on stack. The lrv_vector0
field in La_x86_64_retval must be aligned to size of vector register.
When allocating stack space for La_x86_64_retval, we need to make sure
that the address of La_x86_64_retval + RV_VECTOR0_OFFSET is aligned to
VEC_SIZE. This patch checks the alignment of the lrv_vector0 field
and pads the stack space if needed.

Tested with x32 and x86-64 on SSE4, AVX and AVX512 machines. It fixed

FAIL: elf/tst-audit10
FAIL: elf/tst-audit4
FAIL: elf/tst-audit5
FAIL: elf/tst-audit6
FAIL: elf/tst-audit7

on x32 AVX512 machine.

(cherry picked from commit 207a72e2988c6d6343f50fe0128eb4fc4edfdd15)

 [BZ #22715]
 * sysdeps/x86_64/dl-trampoline.h (_dl_runtime_profile): Properly
 align La_x86_64_retval to VEC_SIZE.

hjl/pr22715/2.25 2018-01-17 13:10:59 UTC 2018-01-17
x86-64: Properly align La_x86_64_retval to VEC_SIZE [BZ #22715]

Author: H.J. Lu
Author Date: 2018-01-16 03:39:56 UTC

x86-64: Properly align La_x86_64_retval to VEC_SIZE [BZ #22715]

_dl_runtime_profile calls _dl_call_pltexit, passing a pointer to
La_x86_64_retval which is allocated on stack. The lrv_vector0
field in La_x86_64_retval must be aligned to size of vector register.
When allocating stack space for La_x86_64_retval, we need to make sure
that the address of La_x86_64_retval + RV_VECTOR0_OFFSET is aligned to
VEC_SIZE. This patch checks the alignment of the lrv_vector0 field
and pads the stack space if needed.

Tested with x32 and x86-64 on SSE4, AVX and AVX512 machines. It fixed

FAIL: elf/tst-audit10
FAIL: elf/tst-audit4
FAIL: elf/tst-audit5
FAIL: elf/tst-audit6
FAIL: elf/tst-audit7

on x32 AVX512 machine.

(cherry picked from commit 207a72e2988c6d6343f50fe0128eb4fc4edfdd15)

 [BZ #22715]
 * sysdeps/x86_64/dl-trampoline.h (_dl_runtime_profile): Properly
 align La_x86_64_retval to VEC_SIZE.

hjl/pr22715/2.26 2018-01-17 12:43:35 UTC 2018-01-17
x86-64: Properly align La_x86_64_retval to VEC_SIZE [BZ #22715]

Author: H.J. Lu
Author Date: 2018-01-16 03:39:56 UTC

x86-64: Properly align La_x86_64_retval to VEC_SIZE [BZ #22715]

_dl_runtime_profile calls _dl_call_pltexit, passing a pointer to
La_x86_64_retval which is allocated on stack. The lrv_vector0
field in La_x86_64_retval must be aligned to size of vector register.
When allocating stack space for La_x86_64_retval, we need to make sure
that the address of La_x86_64_retval + RV_VECTOR0_OFFSET is aligned to
VEC_SIZE. This patch checks the alignment of the lrv_vector0 field
and pads the stack space if needed.

Tested with x32 and x86-64 on SSE4, AVX and AVX512 machines. It fixed

FAIL: elf/tst-audit10
FAIL: elf/tst-audit4
FAIL: elf/tst-audit5
FAIL: elf/tst-audit6
FAIL: elf/tst-audit7

on x32 AVX512 machine.

(cherry picked from commit 207a72e2988c6d6343f50fe0128eb4fc4edfdd15)

 [BZ #22715]
 * sysdeps/x86_64/dl-trampoline.h (_dl_runtime_profile): Properly
 align La_x86_64_retval to VEC_SIZE.

azanella/aarch64-split-stack 2018-01-17 11:26:35 UTC 2018-01-17
aarch64: Add split-stack TCB field

Author: Adhemerval Zanella
Author Date: 2017-01-24 11:27:45 UTC

aarch64: Add split-stack TCB field

This patch adds split-stack support pointer guard on glibc for aarch64.
Different from other architectures (powerpc, s390) where the memory is
placed on TCB, aarch64 one is placed before thread pointer initial
position. It has an advantage over extending TCB because for aarch64
TLS variable placement take in consideration tcbhead_t size and by
changing its value would require to also update the static linker
(and it would also add incompatibility with glibc and older linkers).

For aarch64 tcb direct access is fastest for thread local variable on
all mode and related TLS access. It requires just a direct load with
displacement of -8 (since thread pointer points to tcbhead_t).

It also adds a loader symbol (__tcb_private_ss) to signal the existence
of the split stack guard area.

Checked on aarch64-linux-gnu.

 * sysdeps/aarch64/Makefile [$(subdir) = elf] (sysdeps-dl-routines):
 Add tcb-version.
 * sysdeps/aarch64/Versions [ld] (GLIBC_2.26): Add
 __libc_tcb_private_ss.
 * sysdeps/aarch64/nptl/tls.h (tcbprehead_t): New struct.
 (TLS_PRE_TCB_SIZE): Take tcbprehead_t in consideration.
 (TLS_DEFINE_INIT_TP): Likewise.
 (THREAD_SELF): Likewise.
 (DB_THREAD_SELF): Likewise.
 * sysdeps/aarch64/tcb-version.c: New file.
 * sysdeps/unix/sysv/linux/aarch64/ld.abilist (GLIBC_2.26): Add.
 (__libc_tcb_private_ss): Likewise.
 * sysdeps/aarch64/nptl/tcb-offsets.sym (PTHREAD_SIZEOF): Rename to
 PTHREAD_PRE_TCB_SIZE.

hjl/x86/sincosf 2018-01-08 13:34:27 UTC 2018-01-08
x86-64: Add sincosf with vector FMA

Author: H.J. Lu
Author Date: 2017-12-20 19:06:35 UTC

x86-64: Add sincosf with vector FMA

Since the x86-64 assembly version of sincosf is higly optimized with
vector instructions, there isn't much room for improvement. However
s_sincosf.c written in C with vector math and intrinsics can be
optimized by GCC with FMA.

On Skylake, bench-sincosf reports performance improvement:

           Assembly FMA improvement
max 104.042 101.008 3%
min 9.426 8.586 10%
mean 20.6209 18.2238 13%

 * sysdeps/x86_64/fpu/multiarch/Makefile (libm-sysdep_routines):
 Add s_sincosf-sse2 and s_sincosf-fma.
 (CFLAGS-s_sincosf-fma.c): New.
 * sysdeps/x86_64/fpu/multiarch/s_sincosf-fma.c: New file.
 * sysdeps/x86_64/fpu/multiarch/s_sincosf-sse2.S: Likewise.
 * sysdeps/x86_64/fpu/multiarch/s_sincosf.c: Likewise.
 * sysdeps/x86_64/fpu/s_sincosf.S: Don't add alias if
 __sincosf is defined.

ibm/2.24/master 2017-12-19 17:18:07 UTC 2017-12-19
Merge branch release/2.24/master into ibm/2.24/master

Author: Gabriel F. T. Gomes
Author Date: 2017-12-19 17:18:07 UTC

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

hjl/pr22353/master 2017-10-30 12:44:19 UTC 2017-10-30
Add strcpy-stosb.S

Author: H.J. Lu
Author Date: 2017-10-27 13:31:57 UTC

Add strcpy-stosb.S

hjl/pr22363/master 2017-10-29 21:15:47 UTC 2017-10-29
x32: Set GLRO(dl_platform) to "x86_64" by default [BZ #22363]

Author: H.J. Lu
Author Date: 2017-10-29 21:12:01 UTC

x32: Set GLRO(dl_platform) to "x86_64" by default [BZ #22363]

Set dl_platform to "x86_64" for x32 by default since kernel may set it
to "i686". This fixed:

FAIL: elf/tst-platform-1

on x32. Tested on x86-64 and x32.

 [BZ #22363]
 * sysdeps/x86/cpu-features.c (init_cpu_features): Set
 GLRO(dl_platform) to "x86_64" by default for x32.

hjl/pr22362/master 2017-10-29 02:05:09 UTC 2017-10-29
Use newly built crt*.o files to build shared objects [BZ #22362]

Author: H.J. Lu
Author Date: 2017-10-29 00:41:16 UTC

Use newly built crt*.o files to build shared objects [BZ #22362]

When multi-lib GCC is used to build glibc, the search order of GCC driver
for crt*.o is -B*/`gcc -print-multi-directory`, the installed diretory,
-B*/. This patch extends multi-lib support from nptl/Makefile to
csu/Makefile so that -B/glibc-build-directory/csu/ will pick up the newly
built crt*.o.

Tested on x86-64 for i686 and x32.

 [BZ #22362]
 * config.make.in (multidir): New.
 * configure.ac (libc_cv_multidir): New. AC_SUBST.
 * configure: Regenerated.
 * csu/Makefile [$(multidir) != .](multilib-extra-objs): New.
 [$(multidir) != .](extra-objs): Add $(multilib-extra-objs).
 [$(multidir) != .]($(addprefix $(objpfx)$(multidir)/, $(install-lib))):
 New target.
 * nptl/Makefile: Don't include multidir.mk.
 ($(objpfx)multidir.mk): Removed.

hjl/pr22298/master 2017-10-15 14:48:58 UTC 2017-10-15
Define __PTHREAD_MUTEX_HAVE_PREV only if undefined [BZ #22298]

Author: H.J. Lu
Author Date: 2017-10-15 14:48:58 UTC

Define __PTHREAD_MUTEX_HAVE_PREV only if undefined [BZ #22298]

It is incorrect to define __PTHREAD_MUTEX_HAVE_PREV to 1 only when
__WORDSIZE == 64. For x32, __PTHREAD_MUTEX_HAVE_PREV should be 1, but
it has __WORDSIZE == 32. This patch defines __PTHREAD_MUTEX_HAVE_PREV
based on __WORDSIZE only if it is undefined. __PTHREAD_MUTEX_HAVE_PREV
check is changed from "#ifdef" to "#if" to support values of 0 or 1.

 [BZ #22298]
 * nptl/allocatestack.c (allocate_stack): Check if
 __PTHREAD_MUTEX_HAVE_PREV is non-zero, instead if
 __PTHREAD_MUTEX_HAVE_PREV is defined.
 * nptl/descr.h (pthread): Likewise.
 * nptl/nptl-init.c (__pthread_initialize_minimal_internal):
 Likewise.
 * nptl/pthread_create.c (START_THREAD_DEFN): Likewise.
 * sysdeps/nptl/fork.c (__libc_fork): Likewise.
 * sysdeps/nptl/pthread.h (PTHREAD_MUTEX_INITIALIZER): Likewise.
 * sysdeps/nptl/bits/thread-shared-types.h
 (__PTHREAD_MUTEX_HAVE_PREV): Define only if it is undefined.
 (__pthread_internal_list): Check __pthread_internal_list instead
 of __WORDSIZE.
 (__PTHREAD_SPINS_DATA): Likewise.
 (__PTHREAD_SPINS): Likewise.
 (__pthread_mutex_s): Likewise.
 * sysdeps/x86/nptl/bits/pthreadtypes-arch.h
 (__PTHREAD_MUTEX_HAVE_PREV): Defined.

hjl/pr22284/2.26 2017-10-12 22:56:40 UTC 2017-10-12
Support profiling PIE [BZ #22284]

Author: H.J. Lu
Author Date: 2017-10-12 10:45:55 UTC

Support profiling PIE [BZ #22284]

Since PIE can be loaded at any address, we need to subtract load address
from PCs.

 [BZ #22284]
 * gmon/gmon.c [PIC]: Include <link.h>.
 [PIC] (callback): New function.
 (write_hist): Add an argument for load address. Subtract load
 address from PCs.
 (write_call_graph): Likewise.
 (write_gmon): Call __dl_iterate_phdr to get load address, pass
 it to write_hist and write_call_graph.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

(cherry picked from commit d165ca64980f90ccace088670652cc203d1b5411)

hjl/nsz/math 2017-09-30 02:39:47 UTC 2017-09-30
i386: Replace assembly versions of e_powf with generic e_powf.c

Author: H.J. Lu
Author Date: 2017-09-30 02:39:47 UTC

i386: Replace assembly versions of e_powf with generic e_powf.c

This patch replaces i386 assembly versions of e_powf with generic
e_powf.c.

 * sysdeps/i386/fpu/e_powf.S: Removed.
 * sysdeps/i386/fpu/e_powf_log2_data.c: Likewise.
 * sysdeps/i386/fpu/w_powf.c: Likewise.
 * sysdeps/i386/fpu/libm-test-ulps: Updated for generic e_powf.c.
 * sysdeps/i386/i686/fpu/multiarch/libm-test-ulps: Likewise.
 * sysdeps/i386/i686/fpu/multiarch/Makefile (libm-sysdep_routines):
 Add e_powf-sse2.
 (CFLAGS-e_powf-sse2.c): New.
 * sysdeps/i386/i686/fpu/multiarch/e_powf-sse2.c: New file.
 * sysdeps/i386/i686/fpu/multiarch/e_powf.c: Likewise.

nsz/math 2017-09-29 10:51:12 UTC 2017-09-29
Do not wrap logf, log2f and powf

Author: Szabolcs Nagy
Author Date: 2017-09-13 17:14:26 UTC

Do not wrap logf, log2f and powf

The new generic logf, log2f and powf code don't need wrappers any more,
they set errno inline so only use the wrappers on targets that need it.

2017-09-19 Szabolcs Nagy <szabolcs.nagy@arm.com>

 * sysdeps/ieee754/flt-32/e_log2f.c (__log2f): Define without wrapper.
 * sysdeps/ieee754/flt-32/e_logf.c (__logf): Likewise
 * sysdeps/ieee754/flt-32/e_powf.c (__powf): Likewise
 * sysdeps/ieee754/flt-32/w_log2f.c: New file.
 * sysdeps/ieee754/flt-32/w_logf.c: New file.
 * sysdeps/ieee754/flt-32/w_powf.c: New file.
 * sysdeps/i386/fpu/w_log2f.c: New file.
 * sysdeps/i386/fpu/w_logf.c: New file.
 * sysdeps/i386/fpu/w_powf.c: New file.
 * sysdeps/m68k/m680x0/fpu/w_log2f.c: New file.
 * sysdeps/m68k/m680x0/fpu/w_logf.c: New file.
 * sysdeps/m68k/m680x0/fpu/w_powf.c: New file.

hjl/pr22053/master 2017-08-31 13:49:37 UTC 2017-08-31
Remove zero terminator for .eh_frame in libc.so [BZ #22053]

Author: H.J. Lu
Author Date: 2017-08-31 13:49:37 UTC

Remove zero terminator for .eh_frame in libc.so [BZ #22053]

elf/sofini.c has a zero terminator for .eh_frame in libc.so. It was
added before -eh-frame-hdr is added to ld. Since -eh-frame-hdr is
always used to build libc.so, zero terminator in elf/sofini.c can be
removed.

 [BZ #22053]
 * elf/sofini.c (__FRAME_END__): Removed.

hjl/fma/master 2017-08-28 15:14:40 UTC 2017-08-28
Mention x86-64 FMA optimization in NEWS

Author: H.J. Lu
Author Date: 2017-08-16 15:56:24 UTC

Mention x86-64 FMA optimization in NEWS

 * NEWS: Mention x86-64 FMA optimization.

hjl/pr21967/master 2017-08-25 18:44:24 UTC 2017-08-25
x86: Add MathVec_Prefer_No_AVX512 to cpu-features [BZ #21967]

Author: H.J. Lu
Author Date: 2017-08-25 18:01:03 UTC

x86: Add MathVec_Prefer_No_AVX512 to cpu-features [BZ #21967]

AVX512 functions in mathvec are used on machines with AVX512. An AVX2
wrapper is also provided and it can be used when the AVX512 version
isn't profitable. MathVec_Prefer_No_AVX512 is addded to cpu-features.
If glibc.tune.hwcaps=MathVec_Prefer_No_AVX512 is set in GLIBC_TUNABLES
environment variable, the AVX2 wrapper will be used.

 [BZ #21967]
 * sysdeps/x86/cpu-features.h (bit_arch_MathVec_Prefer_No_AVX512):
 New.
 (index_arch_MathVec_Prefer_No_AVX512): Likewise.
 * sysdeps/x86/cpu-tunables.c (TUNABLE_CALLBACK (set_hwcaps)):
 Handle MathVec_Prefer_No_AVX512.

zack/anon-unions 2017-08-23 11:42:53 UTC 2017-08-23
RFC: Use anonymous union for siginfo_t

Author: Zack Weinberg
Author Date: 2017-08-11 13:43:59 UTC

RFC: Use anonymous union for siginfo_t

C2011 officially includes an 'anonymous union' feature, and GCC has
supported it for many years. It makes sub-fields of a union that's a
struct field appear to be fields of the parent struct. If we use this
in the definition of siginfo_t, we don't need to define lots of
innocuous-looking identifiers like 'si_pid' as macros expanding to
chains of field accessors. The catch, however, is that the compiler
used to compile *programs that use glibc* - not just glibc itself -
must accept the use of this feature (in system headers) even when
running in an older conformance mode.

This patch only touches siginfo_t, but if people like the idea, we
could also do it for several other types:

netinet/in.h (in6_addr)
sys/stat.h (stat)
utmp.h (utmp)
signal.h (sigaction, sigevent_t)
ucontext.h (ucontext_t)

and maybe also - these use names in the user namespace for the fields
that would be removed:

net/if.h (ifaddr)
ifaddrs.h (ifaddrs)
netinet/in6.h (ip6_hdr) (really should be bitfields instead)
netinet/icmp6.h (many)
net/if_ppp.h (ifpppstatsreq, ifpppcstatsreq)
net/if_shaper.h (shaperconf)
a.out.h (exec) (only some versions)
sys/quota.h (dqblk?) (the dq_* macros refer to a field that doesn't exist?!)

There are still more hits in sunrpc and nis, but since hopefully that
code is going to go away, I don't propose to mess with them. And
there may be even more that aren't caught by grepping for
'#define IDENT IDENT.IDENT'.

As a side note (and this could be split for commit if felt
appropriate), the siginfo_t field aliases 'si_int' and 'si_ptr' are
not in POSIX. There are a few uses of these within glibc itself, and
a handful more in third-party software (not glibc, not uclibc, and not
linux) so I have preserved them, but put them under __USE_MISC and
added a deprecation warning.

This passes the glibc testsuite on x86-64-linux, which probably
*doesn't* test the case where someone is compiling a program in
an older conformance mode that uses siginfo_t
(-std=c99 -D_XOPEN_SOURCE=600, perhaps).

What do you think?

zw

 * sysdeps/unix/sysv/linux/bits/types/siginfo_t.h (siginfo_t):
 Use C2011 anonymous union and anonymous struct-in-union features
 to define this type. Rename some public fields with their
 official names.
 (si_pid, si_uid, si_timerid, si_overrun, si_status, si_utime)
 (si_stime, si_value, si_addr, si_addr_lsb, si_lower, si_upper)
 (si_pkey, si_band, si_fd, si_call_addr, si_syscall, si_arch):
 Do not define as macros.
 (si_int, si_ptr): Define only when __USE_MISC, with deprecation
 warnings.
 * sysdeps/unix/sysv/linux/ia64/bits/siginfo-arch.h
 * sysdeps/unix/sysv/linux/sparc/bits/siginfo-arch.h
 * sysdeps/unix/sysv/linux/tile/bits/siginfo-arch.h
 (__SI_SIGFAULT_ADDL): Define all fields with their public names
 when __USE_GNU, or with impl-namespace names otherwise.
 (si_imm, si_segvflags, si_isr, si_trapno): Do not define as macros.

 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread)
 Use si_value.sival_ptr instead of si_ptr.
 * sysdeps/unix/sysv/linux/tst-getpid1.c (do_test):
 Use si_value.sival_int instead of si_int.

hjl/gmp 2017-08-22 12:02:20 UTC 2017-08-22
rshift.c: Replace assert with DEBUG and abort

Author: H.J. Lu
Author Date: 2017-08-22 00:07:36 UTC

rshift.c: Replace assert with DEBUG and abort

assert in stdlib/rshift.c should be for debug purpose only and there is
no such check in any rshift assembly implementations nor in lshift.c.
This patch replaces assert with DEBUG and abort, similar to lshift.c
so that generic GMP codes from libc.a can be linked with libc.so in
atest-exp, atest-exp2 and atest-sincos, which depend on the GMP
implementation in glibc.

 * stdlib/rshift.c (mpn_rshift): Replace ssert with DEBUG and
 abort.

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)

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

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.

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/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)

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.

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/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/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/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

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.

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.

1100 of 292 results

Other repositories

Name Last Modified
lp:glibc 2019-09-21
11 of 1 result
You can't create new repositories for GLibC.