glibc:zack/gtod-no-timezone

Last commit made on 2019-07-28
Get this branch:
git clone -b zack/gtod-no-timezone https://git.launchpad.net/glibc

Branch merges

Branch information

Name:
zack/gtod-no-timezone
Repository:
lp:glibc

Recent commits

3f64999... by Zack Weinberg

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.

50ce3ea... by Florian Weimer

gconv: Check reference count in __gconv_release_cache [BZ #24677]

This fixes a regression introduced in commit
7e740ab2e7be7d83b75513aa406e0b10875f7f9c ("libio: Fix gconv-related
memory leak [BZ #24583]").

__gconv_release_cache is only ever called with heap-allocated
arrays which contain at least one member. The statically allocated
ASCII steps are filtered out by __wcsmbs_close_conv.

7e68156... by "H.J. Lu" <email address hidden>

x86-64: Compile branred.c with -mprefer-vector-width=128 [BZ #24603]

When compiled with -O3 and AVX, GCC 8 and 9 optimize some loops in
sysdeps/ieee754/dbl-64/branred.c with 256-bit vector instructions,
which leads to store forward stall:

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

There is no easy fix in compiler. This patch limits vector width to
128 bits to work around this issue. It improves performance of sin
and cos by more than 40% on Skylake compiled with -O3 -march=skylake.

Tested with GCC 7/8/9 on x86-64.

 [BZ #24603]
 * sysdeps/x86_64/configure.ac: Check if -mprefer-vector-width=128
 works.
 * sysdeps/x86_64/configure: Regenerated.
 * sysdeps/x86_64/fpu/Makefile (CFLAGS-branred.c): New. Set
 to -mprefer-vector-width=128 if supported.

82c664e... by Florian Weimer

build-many-glibcs.py: Use Linux 5.2 by default

7854ebf... by Florian Weimer

Linux: Use in-tree copy of SO_ constants for !__USE_MISC [BZ #24532]

The kernel changes for a 64-bit time_t on 32-bit architectures
resulted in <asm/socket.h> indirectly including <linux/posix_types.h>.
The latter is not namespace-clean for the POSIX version of
<sys/socket.h>.

This issue has persisted across several Linux releases, so this commit
creates our own copy of the SO_* definitions for !__USE_MISC mode.

The new test socket/tst-socket-consts ensures that the copy is
consistent with the kernel definitions (which vary across
architectures). The test is tricky to get right because CPPFLAGS
includes include/libc-symbols.h, which in turn defines _GNU_SOURCE
unconditionally.

Tested with build-many-glibcs.py. I verified that a discrepancy in
the definitions actually results in a failure of the
socket/tst-socket-consts test.

35e038c... by Tulio Magno Quites Machado Filho <email address hidden>

test-container: Install with $(all-subdirs) [BZ #24794]

Whenever a sub-make is created, it inherits the variable subdirs from its
parent. This is also true when make check is called with a restricted
list of subdirs. In this scenario, make install is executed "partially"
and testroot.pristine ends up with an incomplete installation.

 [BZ #24794]
 * Makefile (testroot.pristine/install.stamp): Pass
 subdirs='$(all-subdirs)' to make install.

Reviewed-by: DJ Delorie <email address hidden>

95da14d... by Tulio Magno Quites Machado Filho <email address hidden>

test-container: Avoid copying unintended system libraries

Some DSOs are distributed in hardware capability directories, e.g.
/usr/lib64/power7/libc.so.6
Whenever the processor is able to use one of these hardware-enabled
DSOs, testroot.pristine ends up with copies of glibc-provided libraries
from the system because it can't overwrite or remove them.

This patch avoids the unintended copies by executing ld.so with the same
arguments passed to each glibc test.

 * Makefile (testroot.pristine/install.stamp): Execute ld.so with
 the same arguments used in all tests.

dcf36bc... by Szabolcs Nagy <email address hidden>

Add NEWS entry about the new AArch64 IFUNC resolver call ABI

The new IFUNC resolver call ABI was introduced in

commit 2b8a3c86e7606cf1b0a997dad8af2d45ae8989c3
Commit: Szabolcs Nagy <email address hidden>
CommitDate: 2019-07-04 11:13:32 +0100

    aarch64: new ifunc resolver ABI

See the commit log and the comments in sys/ifunc.h for details.

c7e4b68... by Diego

locale/C-translit.h.in: Cyrillic -> ASCII transliteration [BZ #2872]

This patch adds Cyrillic to plain ASCII transliteration table according
to GOST 7.79-2000 System B standard to the C locale.

 [BZ #2872]
 * locale/C-translit.h.in: Add Cyrillic transliteration.

1f7097d... by Florian Weimer

Linux: Update syscall-names.list to Linux 5.2

This adds the system call names fsconfig, fsmount, fsopen, fspick,
move_mount, open_tree.

Tested with build-many-glibcs.py.