glibc:fw/bug16145

Last commit made on 2017-03-09
Get this branch:
git clone -b fw/bug16145 https://git.launchpad.net/glibc

Branch merges

Branch information

Name:
fw/bug16145
Repository:
lp:glibc

Recent commits

60a91a2... by Florian Weimer

WIP reorganization to improve scalability of localtime

c9611e6... by Florian Weimer

Isolate global timezone variables in <time/time-variables.h>

This change makes it more explicit which subsystems access these
variables (which are thread safety hazards).

9a56f87... by Yury Norov <email address hidden>

Test for correct setting of errno.

This patch adds tests for POSIX and Linux specific syscalls
that implemented with syscall templates machinery. The reason
of tests is to receive the expected error code and test if
it's handled properly by glibc.

2017-03-08 Yury Norov <email address hidden>
     Zack Weinberg <email address hidden>

 * posix/test-errno.c: New file.
 * posix/Makefile (tests): Add test-errno.
 * sysdeps/unix/sysv/linux/test-errno.c: New file.
 * sysdeps/unix/sysv/linux/Makefile (tests): Add test-errno.

72280a9... by Stefan Liebler <email address hidden>

S390: Regenerate ULPs

Updated ulps file.
There are still fails for long double catan / catanh
due to MPC bug. See post from Joseph Myers:
https://www.sourceware.org/ml/libc-alpha/2017-03/msg00099.html

ChangeLog:

 * sysdeps/s390/fpu/libm-test-ulps: Regenerated.

596d547... by Florian Weimer

Fix auto-merge issue in ChangeLog

6e3b522... by Florian Weimer

tzset: Clean up preprocessor macros min, max, sign

8492c4d... by Florian Weimer

timezone: Remove TZNAME_MAX limit from sysconf [BZ #15576]

glibc does not impose a limit, and POSIX does not allow a
sysconf limit which changes during the lifetime of a process.

1c1243b... by Siddhesh Poyarekar <email address hidden>

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.
 * elf/tst-env-setuid.c (test_parent): Test LD_HWCAP_MASK.
 (test_child): Likewise.
 * elf/Makefile (tst-env-setuid-ENV): Add LD_HWCAP_MASK.

a7055e5... by Adhemerval Zanella <email address hidden>

hppa: set __IPC_64 as zero for SysV IPC calls

In 1e5834c38a22 ("Refactor Linux ipc_priv header") a different
approach to passing __IPC_64 as zero was created. Hppa kernel ABI
requires to oass __IPC_64 as zero since it does not set
CONFIG_ARCH_WANT_IPC_PARSE_VERSION in the kernel.

Checked on hppa-linux-gnu with some adjustments to avoid BZ#21016
(basically by removing hppa compat implementations and adjusting
required headers).

 * sysdeps/unix/sysv/linux/hppa/ipc_priv.h: New file.

022c9fe... by Stefan Liebler <email address hidden>

S390: Optimize atomic macros.

This patch activates C11 atomic builtins by defining
USE_ATOMIC_COMPILER_BUILTINS to 1.
Note:
E.g. in nptl/pthread_key_delete.c if compiled with GCCs 6 and before,
an extra stack-frame is generated and the old value is stored on stack
before cs instruction but it never loads this value from stack.
An unreleased GCC 7 omit those stack operations.

E.g. in nptl/pthread_once.c the condition code of cs instruction is
evaluated by a sequence of ipm, sra, compare and jump instructions instead
of one conditional jump instruction. This also occurs with an unreleased
GCC 7.

These shortcomings does not really hurt. Nevertheless, the gcc guys are
investigating those ones and plan to fix them before GCC 7 release.

The atomic_fetch_abc_def C11 builtins are now using load-and-abc instructions
on z196 zarch and higher cpus instead of a loop with compare-and-swap
instruction.

Some of the non-C11 atomic macros from include/atomic.h are now implemented
with help of the C11 atomic builtins. The other non-C11 atomic macros
are using the macros defined here.

ChangeLog:

 * sysdeps/s390/atomic-machine.h
 (USE_ATOMIC_COMPILER_BUILTINS): Define to 1.
 (__arch_compare_and_exchange_val_8_acq,
 __arch_compare_and_exchange_val_16_acq,
 __arch_compare_and_exchange_val_32_acq,
 __arch_compare_and_exchange_val_64_acq):
 Delete macro.
 (atomic_compare_and_exchange_val_acq,
 atomic_compare_and_exchange_val_rel,
 atomic_compare_and_exchange_bool_acq,
 catomic_compare_and_exchange_bool_acq,
 atomic_exchange_acq, atomic_exchange_rel,
 atomic_exchange_and_add_acq,
 atomic_exchange_and_add_rel,
 catomic_exchange_and_add, atomic_or_val,
 atomic_or, catomic_or, atomic_bit_test_set,
 atomic_and_val, atomic_and, catomic_and):
 Define macros with help of C11 atomic builtins.