summaryrefslogtreecommitdiff
path: root/debian/patches/git-updates.diff
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2019-12-06 23:02:13 +0100
committerAurelien Jarno <aurelien@aurel32.net>2019-12-06 23:02:13 +0100
commitb05e01055bb2576ea80980ecf9a250aa6d98e7b4 (patch)
treed2cad6e19314f3789c907e291762916c6118eec4 /debian/patches/git-updates.diff
parent05bdce24807e19564923c1d380fb5cb75f99ae54 (diff)
debian/patches/git-updates.diff: update from upstream stable branch.
Diffstat (limited to 'debian/patches/git-updates.diff')
-rw-r--r--debian/patches/git-updates.diff872
1 files changed, 866 insertions, 6 deletions
diff --git a/debian/patches/git-updates.diff b/debian/patches/git-updates.diff
index bfc9e81c..5b80c956 100644
--- a/debian/patches/git-updates.diff
+++ b/debian/patches/git-updates.diff
@@ -1,10 +1,73 @@
GIT update of https://sourceware.org/git/glibc.git/release/2.30/master from glibc-2.30
diff --git a/ChangeLog b/ChangeLog
-index cdb9e14881..8e29a549b9 100644
+index cdb9e14881..c4687dfd4c 100644
--- a/ChangeLog
+++ b/ChangeLog
-@@ -1,3 +1,25 @@
+@@ -1,3 +1,88 @@
++2019-08-15 Florian Weimer <fweimer@redhat.com>
++
++ * malloc/Makefile (tests): Only add tst-mxfast for
++ $(have-tunables).
++ * malloc/tst-mxfast.c: Fix copyright year.
++ (do_test): Fix GNU style issues. Use TEST_COMPARE instead of
++ assert for checks.
++
++2019-08-09 DJ Delorie <dj@redhat.com>
++
++ * elf/dl-tunables.list: Add glibc.malloc.mxfast.
++ * manual/tunables.texi: Document it.
++ * malloc/malloc.c (do_set_mxfast): New.
++ (__libc_mallopt): Call it.
++ * malloc/arena.c: Add mxfast tunable.
++ * malloc/tst-mxfast.c: New.
++ * malloc/Makefile: Add it.
++
++2019-08-08 Niklas Hambüchen <mail@nh2.me>
++ Carlos O'Donell <carlos@redhat.com>
++
++ [BZ #24026]
++ * malloc/malloc.c (__malloc_info): Account for top chunk.
++
++2019-11-01 Dragan Mladjenovic <dmladjenovic@wavecomp.com>
++
++ * sysdeps/unix/sysv/linux/mips/Makefile
++ (test-xfail-check-execstack):
++ Move under mips-has-gnustack != yes.
++ (CFLAGS-.o*, ASFLAGS-.o*): New rules.
++ Apply -Wa,-execstack if mips-force-execstack == yes.
++ * sysdeps/unix/sysv/linux/mips/configure: Regenerated.
++ * sysdeps/unix/sysv/linux/mips/configure.ac
++ (mips-force-execstack): New var.
++ Set to yes for hard-float builds with minimum_kernel < 4.8.0
++ or minimum_kernel not set at all.
++ (mips-has-gnustack): New var.
++ Use value of libc_cv_as_noexecstack
++ if mips-force-execstack != yes, otherwise set to no.
++
++2019-10-08 Gabriel F. T. Gomes <gabrielftg@linux.ibm.com>
++
++ * Makefile: Fix locale dependency for a couple of tests.
++ ($(objpfx)tst-strftime2.out): New rule.
++ ($(objpfx)tst-strftime3.out): Likewise.
++
++2019-09-20 Joseph Myers <joseph@codesourcery.com>
++
++ * sysdeps/unix/sysv/linux/riscv/vfork.S: Do not include
++ <linux/sched.h>.
++ (CLONE_VM): New macro.
++ (CLONE_VFORK): Likewise.
++
++2019-09-14 Aurelien Jarno <aurelien@aurel32.net>
++
++ [BZ #24986]
++ * sysdeps/unix/alpha/getegid.S: Move to ...
++ * sysdeps/unix/sysv/linux/alpha/getegid.S: ... here.
++ * sysdeps/unix/alpha/geteuid.S: Move to ...
++ * sysdeps/unix/sysv/linux/alpha/geteuid.S: ... here.
++ * sysdeps/unix/alpha/getppid.S: Move to ...
++ * sysdeps/unix/sysv/linux/alpha/getppid.S: ... here
++
+2019-09-08 Adhemerval Zanella <adhemerval.zanella@linaro.org>
+
+ * sysdeps/hppa/fpu/libm-test-ulps: Update.
@@ -31,25 +94,134 @@ index cdb9e14881..8e29a549b9 100644
* version.h (RELEASE): Set to "stable".
diff --git a/NEWS b/NEWS
-index ee9ed4de5a..09f2ce9752 100644
+index ee9ed4de5a..74826b9eb8 100644
--- a/NEWS
+++ b/NEWS
-@@ -4,6 +4,15 @@ See the end for copying conditions.
+@@ -4,6 +4,30 @@ See the end for copying conditions.
Please send GNU C library bug reports via <https://sourceware.org/bugzilla/>
using `glibc' in the "product" field.
+
+Version 2.30.1
+
++Security related changes:
++
++CVE-2019-19126: ld.so failed to ignore the LD_PREFER_MAP_32BIT_EXEC
++ environment variable during program execution after a security
++ transition, allowing local attackers to restrict the possible mapping
++ addresses for loaded libraries and thus bypass ASLR for a setuid
++ program. Reported by Marcin Kościelnicki.
++
+The following bugs are resolved with this release:
+
+ [24682] localedata: zh_CN first weekday should be Monday per GB/T
+ 7408-2005
+ [24867] malloc: Remove unwanted leading whitespace in malloc_info
++ [24986] alpha: new getegid, geteuid and getppid syscalls used
++ unconditionally
++ [25189] Don't use a custom wrapper macro around __has_include
++ [25203] libio: Disable vtable validation for pre-2.1 interposed handles
++ [25204] Ignore LD_PREFER_MAP_32BIT_EXEC for SUID programs
++ [25225] ld.so fails to link on x86 if GCC defaults to -fcf-protection
++ [25232] No const correctness for strchr et al. for Clang++
+
Version 2.30
+diff --git a/configure b/configure
+index c773c487b5..6d26b8246f 100755
+--- a/configure
++++ b/configure
+@@ -3777,11 +3777,32 @@ else
+ fi
+
+
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++
++int
++main ()
++{
++
++#ifndef __CET__
++#error no CET compiler support
++#endif
++ ;
++ return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++ libc_cv_compiler_default_cet=yes
++else
++ libc_cv_compiler_default_cet=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++
+ # Check whether --enable-cet was given.
+ if test "${enable_cet+set}" = set; then :
+ enableval=$enable_cet; enable_cet=$enableval
+ else
+- enable_cet=no
++ enable_cet=$libc_cv_compiler_default_cet
+ fi
+
+
+diff --git a/configure.ac b/configure.ac
+index 598ba6c4ae..7436485419 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -472,11 +472,18 @@ AC_ARG_ENABLE([mathvec],
+ [build_mathvec=$enableval],
+ [build_mathvec=notset])
+
++AC_TRY_COMPILE([], [
++#ifndef __CET__
++# error no CET compiler support
++#endif],
++ [libc_cv_compiler_default_cet=yes],
++ [libc_cv_compiler_default_cet=no])
++
+ AC_ARG_ENABLE([cet],
+ AC_HELP_STRING([--enable-cet],
+ [enable Intel Control-flow Enforcement Technology (CET), x86 only]),
+ [enable_cet=$enableval],
+- [enable_cet=no])
++ [enable_cet=$libc_cv_compiler_default_cet])
+
+ # We keep the original values in `$config_*' and never modify them, so we
+ # can write them unchanged into config.make. Everything else uses
+diff --git a/elf/dl-tunables.list b/elf/dl-tunables.list
+index 1fc2d8886b..525c3767b5 100644
+--- a/elf/dl-tunables.list
++++ b/elf/dl-tunables.list
+@@ -85,6 +85,11 @@ glibc {
+ tcache_unsorted_limit {
+ type: SIZE_T
+ }
++ mxfast {
++ type: SIZE_T
++ minval: 0
++ security_level: SXID_IGNORE
++ }
+ }
+ cpu {
+ hwcap_mask {
+diff --git a/libio/oldstdfiles.c b/libio/oldstdfiles.c
+index 2b861cd754..7503cdd62d 100644
+--- a/libio/oldstdfiles.c
++++ b/libio/oldstdfiles.c
+@@ -83,6 +83,11 @@ _IO_check_libio (void)
+ = stderr->_vtable_offset =
+ ((int) sizeof (struct _IO_FILE)
+ - (int) sizeof (struct _IO_FILE_complete));
++
++ if (_IO_stdin_.vtable != &_IO_old_file_jumps
++ || _IO_stdout_.vtable != &_IO_old_file_jumps
++ || _IO_stderr_.vtable != &_IO_old_file_jumps)
++ IO_set_accept_foreign_vtables (&_IO_vtable_check);
+ }
+ }
+
diff --git a/localedata/locales/bo_CN b/localedata/locales/bo_CN
index 90cbc7807b..9df91a1721 100644
--- a/localedata/locales/bo_CN
@@ -86,11 +258,110 @@ index 62a46415c1..cd4b33602a 100644
END LC_TIME
LC_MESSAGES
+diff --git a/malloc/Makefile b/malloc/Makefile
+index d2fba29953..742c515eb2 100644
+--- a/malloc/Makefile
++++ b/malloc/Makefile
+@@ -54,7 +54,7 @@ tests-internal += \
+ tst-dynarray-at-fail \
+
+ ifneq (no,$(have-tunables))
+-tests += tst-malloc-usable-tunables
++tests += tst-malloc-usable-tunables tst-mxfast
+ tests-static += tst-malloc-usable-static-tunables
+ endif
+
+@@ -196,6 +196,8 @@ tst-malloc-usable-static-ENV = $(tst-malloc-usable-ENV)
+ tst-malloc-usable-tunables-ENV = GLIBC_TUNABLES=glibc.malloc.check=3
+ tst-malloc-usable-static-tunables-ENV = $(tst-malloc-usable-tunables-ENV)
+
++tst-mxfast-ENV = GLIBC_TUNABLES=glibc.malloc.tcache_count=0:glibc.malloc.mxfast=0
++
+ ifeq ($(experimental-malloc),yes)
+ CPPFLAGS-malloc.c += -DUSE_TCACHE=1
+ else
+diff --git a/malloc/arena.c b/malloc/arena.c
+index 8309c1334c..a32eb403ec 100644
+--- a/malloc/arena.c
++++ b/malloc/arena.c
+@@ -236,6 +236,7 @@ TUNABLE_CALLBACK_FNDECL (set_tcache_max, size_t)
+ TUNABLE_CALLBACK_FNDECL (set_tcache_count, size_t)
+ TUNABLE_CALLBACK_FNDECL (set_tcache_unsorted_limit, size_t)
+ #endif
++TUNABLE_CALLBACK_FNDECL (set_mxfast, size_t)
+ #else
+ /* Initialization routine. */
+ #include <string.h>
+@@ -323,6 +324,7 @@ ptmalloc_init (void)
+ TUNABLE_GET (tcache_unsorted_limit, size_t,
+ TUNABLE_CALLBACK (set_tcache_unsorted_limit));
+ # endif
++ TUNABLE_GET (mxfast, size_t, TUNABLE_CALLBACK (set_mxfast));
+ #else
+ const char *s = NULL;
+ if (__glibc_likely (_environ != NULL))
diff --git a/malloc/malloc.c b/malloc/malloc.c
-index 00ce48cf58..343d89f489 100644
+index 00ce48cf58..8c68b21b2b 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
-@@ -5491,7 +5491,7 @@ __malloc_info (int options, FILE *fp)
+@@ -1621,7 +1621,7 @@ static INTERNAL_SIZE_T global_max_fast;
+
+ #define set_max_fast(s) \
+ global_max_fast = (((s) == 0) \
+- ? SMALLBIN_WIDTH : ((s + SIZE_SZ) & ~MALLOC_ALIGN_MASK))
++ ? MIN_CHUNK_SIZE / 2 : ((s + SIZE_SZ) & ~MALLOC_ALIGN_MASK))
+
+ static inline INTERNAL_SIZE_T
+ get_max_fast (void)
+@@ -5115,6 +5115,19 @@ do_set_tcache_unsorted_limit (size_t value)
+ }
+ #endif
+
++static inline int
++__always_inline
++do_set_mxfast (size_t value)
++{
++ if (value >= 0 && value <= MAX_FAST_SIZE)
++ {
++ LIBC_PROBE (memory_mallopt_mxfast, 2, value, get_max_fast ());
++ set_max_fast (value);
++ return 1;
++ }
++ return 0;
++}
++
+ int
+ __libc_mallopt (int param_number, int value)
+ {
+@@ -5134,13 +5147,7 @@ __libc_mallopt (int param_number, int value)
+ switch (param_number)
+ {
+ case M_MXFAST:
+- if (value >= 0 && value <= MAX_FAST_SIZE)
+- {
+- LIBC_PROBE (memory_mallopt_mxfast, 2, value, get_max_fast ());
+- set_max_fast (value);
+- }
+- else
+- res = 0;
++ do_set_mxfast (value);
+ break;
+
+ case M_TRIM_THRESHOLD:
+@@ -5406,6 +5413,12 @@ __malloc_info (int options, FILE *fp)
+
+ __libc_lock_lock (ar_ptr->mutex);
+
++ /* Account for top chunk. The top-most available chunk is
++ treated specially and is never in any bin. See "initial_top"
++ comments. */
++ avail = chunksize (ar_ptr->top);
++ nblocks = 1; /* Top always exists. */
++
+ for (size_t i = 0; i < NFASTBINS; ++i)
+ {
+ mchunkptr p = fastbin (ar_ptr, i);
+@@ -5491,7 +5504,7 @@ __malloc_info (int options, FILE *fp)
for (size_t i = 0; i < nsizes; ++i)
if (sizes[i].count != 0 && i != NFASTBINS)
@@ -99,6 +370,151 @@ index 00ce48cf58..343d89f489 100644
<size from=\"%zu\" to=\"%zu\" total=\"%zu\" count=\"%zu\"/>\n",
sizes[i].from, sizes[i].to, sizes[i].total, sizes[i].count);
+diff --git a/malloc/tst-mxfast.c b/malloc/tst-mxfast.c
+new file mode 100644
+index 0000000000..7a7750bc71
+--- /dev/null
++++ b/malloc/tst-mxfast.c
+@@ -0,0 +1,50 @@
++/* Test that glibc.malloc.mxfast tunable works.
++ Copyright (C) 2019 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, see
++ <http://www.gnu.org/licenses/>. */
++
++/* This test verifies that setting the glibc.malloc.mxfast tunable to
++ zero results in free'd blocks being returned to the small bins, not
++ the fast bins. */
++
++#include <malloc.h>
++#include <support/check.h>
++
++int
++do_test (void)
++{
++ struct mallinfo m;
++ char *volatile p1;
++ char *volatile p2;
++
++ /* Arbitrary value; must be in default fastbin range. */
++ p1 = malloc (3);
++ /* Something large so that p1 isn't a "top block" */
++ p2 = malloc (512);
++ free (p1);
++
++ m = mallinfo ();
++
++ /* This will fail if there are any blocks in the fastbins. */
++ TEST_COMPARE (m.smblks, 0);
++
++ /* To keep gcc happy. */
++ free (p2);
++
++ return 0;
++}
++
++#include <support/test-driver.c>
+diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
+index f1bd994a10..b1695376dc 100644
+--- a/misc/sys/cdefs.h
++++ b/misc/sys/cdefs.h
+@@ -412,14 +412,6 @@
+ # define __glibc_has_attribute(attr) 0
+ #endif
+
+-#ifdef __has_include
+-/* Do not use a function-like macro, so that __has_include can inhibit
+- macro expansion. */
+-# define __glibc_has_include __has_include
+-#else
+-# define __glibc_has_include(header) 0
+-#endif
+-
+ #if (!defined _Noreturn \
+ && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
+ && !__GNUC_PREREQ (4,7))
+diff --git a/string/string.h b/string/string.h
+index c38eea971f..608ed496b9 100644
+--- a/string/string.h
++++ b/string/string.h
+@@ -33,7 +33,8 @@ __BEGIN_DECLS
+ #include <stddef.h>
+
+ /* Tell the caller that we provide correct C++ prototypes. */
+-#if defined __cplusplus && __GNUC_PREREQ (4, 4)
++#if defined __cplusplus && (__GNUC_PREREQ (4, 4) \
++ || __glibc_clang_prereq (3, 5))
+ # define __CORRECT_ISO_CPP_STRING_H_PROTO
+ #endif
+
+diff --git a/string/test-strstr.c b/string/test-strstr.c
+index df6dbc251e..daed9a2705 100644
+--- a/string/test-strstr.c
++++ b/string/test-strstr.c
+@@ -139,16 +139,45 @@ check1 (void)
+ static void
+ check2 (void)
+ {
+- const char s1[] = ", enable_static, \0, enable_shared, ";
++ const char s1_stack[] = ", enable_static, \0, enable_shared, ";
++ const size_t s1_byte_count = 18;
++ const char *s2_stack = &(s1_stack[s1_byte_count]);
++ const size_t s2_byte_count = 18;
+ char *exp_result;
+- char *s2 = (void *) buf1 + page_size - 18;
++ const size_t page_size_real = getpagesize ();
+
+- strcpy (s2, s1);
+- exp_result = stupid_strstr (s1, s1 + 18);
++ /* Haystack at end of page. The following page is protected. */
++ char *s1_page_end = (void *) buf1 + page_size - s1_byte_count;
++ strcpy (s1_page_end, s1_stack);
++
++ /* Haystack which crosses a page boundary.
++ Note: page_size is at least 2 * getpagesize. See test_init. */
++ char *s1_page_cross = (void *) buf1 + page_size_real - 8;
++ strcpy (s1_page_cross, s1_stack);
++
++ /* Needle at end of page. The following page is protected. */
++ char *s2_page_end = (void *) buf2 + page_size - s2_byte_count;
++ strcpy (s2_page_end, s2_stack);
++
++ /* Needle which crosses a page boundary.
++ Note: page_size is at least 2 * getpagesize. See test_init. */
++ char *s2_page_cross = (void *) buf2 + page_size_real - 8;
++ strcpy (s2_page_cross, s2_stack);
++
++ exp_result = stupid_strstr (s1_stack, s2_stack);
+ FOR_EACH_IMPL (impl, 0)
+ {
+- check_result (impl, s1, s1 + 18, exp_result);
+- check_result (impl, s2, s1 + 18, exp_result);
++ check_result (impl, s1_stack, s2_stack, exp_result);
++ check_result (impl, s1_stack, s2_page_end, exp_result);
++ check_result (impl, s1_stack, s2_page_cross, exp_result);
++
++ check_result (impl, s1_page_end, s2_stack, exp_result);
++ check_result (impl, s1_page_end, s2_page_end, exp_result);
++ check_result (impl, s1_page_end, s2_page_cross, exp_result);
++
++ check_result (impl, s1_page_cross, s2_stack, exp_result);
++ check_result (impl, s1_page_cross, s2_page_end, exp_result);
++ check_result (impl, s1_page_cross, s2_page_cross, exp_result);
+ }
+ }
+
diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps
index 0f77dd2ed0..89c4527a81 100644
--- a/sysdeps/alpha/fpu/libm-test-ulps
@@ -365,3 +781,447 @@ index d0c4dea001..2c61a7ae91 100644
ifloat: 1
Function: "exp10_upward":
+diff --git a/sysdeps/s390/dl-procinfo.c b/sysdeps/s390/dl-procinfo.c
+index 44c9901800..1307ec41de 100644
+--- a/sysdeps/s390/dl-procinfo.c
++++ b/sysdeps/s390/dl-procinfo.c
+@@ -63,11 +63,11 @@ PROCINFO_CLASS const char _dl_s390_cap_flags[19][9]
+ #if !defined PROCINFO_DECL && defined SHARED
+ ._dl_s390_platforms
+ #else
+-PROCINFO_CLASS const char _dl_s390_platforms[9][7]
++PROCINFO_CLASS const char _dl_s390_platforms[10][7]
+ #endif
+ #ifndef PROCINFO_DECL
+ = {
+- "g5", "z900", "z990", "z9-109", "z10", "z196", "zEC12", "z13", "z14"
++ "g5", "z900", "z990", "z9-109", "z10", "z196", "zEC12", "z13", "z14", "z15"
+ }
+ #endif
+ #if !defined SHARED || defined PROCINFO_DECL
+diff --git a/sysdeps/s390/dl-procinfo.h b/sysdeps/s390/dl-procinfo.h
+index 3b1f6a642b..689e961ced 100644
+--- a/sysdeps/s390/dl-procinfo.h
++++ b/sysdeps/s390/dl-procinfo.h
+@@ -23,7 +23,7 @@
+
+ #define _DL_HWCAP_COUNT 19
+
+-#define _DL_PLATFORMS_COUNT 9
++#define _DL_PLATFORMS_COUNT 10
+
+ /* The kernel provides up to 32 capability bits with elf_hwcap. */
+ #define _DL_FIRST_PLATFORM 32
+diff --git a/sysdeps/s390/strstr-arch13.S b/sysdeps/s390/strstr-arch13.S
+index 929b026adf..faa969849e 100644
+--- a/sysdeps/s390/strstr-arch13.S
++++ b/sysdeps/s390/strstr-arch13.S
+@@ -164,7 +164,7 @@ ENTRY(STRSTR_ARCH13)
+ vfenezb %v19,%v18,%v18 /* Search zero in loaded needle bytes. */
+ veclb %v19,%v21 /* Zero index <= max loaded byte index? */
+ jle .Lneedle_loaded /* -> v18 contains full needle. */
+- vl %v16,0(%r3) /* Load needle beyond page boundary. */
++ vl %v18,0(%r3) /* Load needle beyond page boundary. */
+ vfenezb %v19,%v18,%v18
+ j .Lneedle_loaded
+ END(STRSTR_ARCH13)
+diff --git a/sysdeps/unix/alpha/getegid.S b/sysdeps/unix/alpha/getegid.S
+deleted file mode 100644
+index 167009d17a..0000000000
+--- a/sysdeps/unix/alpha/getegid.S
++++ /dev/null
+@@ -1,26 +0,0 @@
+-/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
+- This file is part of the GNU C Library.
+-
+- The GNU C Library is free software; you can redistribute it and/or
+- modify it under the terms of the GNU Lesser General Public
+- License as published by the Free Software Foundation; either
+- version 2.1 of the License, or (at your option) any later version.
+-
+- The GNU C Library is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+- Lesser General Public License for more details.
+-
+- You should have received a copy of the GNU Lesser General Public
+- License along with the GNU C Library. If not, see
+- <http://www.gnu.org/licenses/>. */
+-
+-#include <sysdep.h>
+-
+-
+-PSEUDO (__getegid, getxgid, 0)
+- MOVE (r1, r0)
+- ret
+-PSEUDO_END (__getegid)
+-
+-weak_alias (__getegid, getegid)
+diff --git a/sysdeps/unix/alpha/geteuid.S b/sysdeps/unix/alpha/geteuid.S
+deleted file mode 100644
+index 39413779f7..0000000000
+--- a/sysdeps/unix/alpha/geteuid.S
++++ /dev/null
+@@ -1,26 +0,0 @@
+-/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
+- This file is part of the GNU C Library.
+-
+- The GNU C Library is free software; you can redistribute it and/or
+- modify it under the terms of the GNU Lesser General Public
+- License as published by the Free Software Foundation; either
+- version 2.1 of the License, or (at your option) any later version.
+-
+- The GNU C Library is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+- Lesser General Public License for more details.
+-
+- You should have received a copy of the GNU Lesser General Public
+- License along with the GNU C Library. If not, see
+- <http://www.gnu.org/licenses/>. */
+-
+-#include <sysdep.h>
+-
+-
+-PSEUDO (__geteuid, getxuid, 0)
+- MOVE (r1, r0)
+- ret
+-PSEUDO_END (__geteuid)
+-
+-weak_alias (__geteuid, geteuid)
+diff --git a/sysdeps/unix/alpha/getppid.S b/sysdeps/unix/alpha/getppid.S
+deleted file mode 100644
+index 4d291181bd..0000000000
+--- a/sysdeps/unix/alpha/getppid.S
++++ /dev/null
+@@ -1,26 +0,0 @@
+-/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
+- This file is part of the GNU C Library.
+-
+- The GNU C Library is free software; you can redistribute it and/or
+- modify it under the terms of the GNU Lesser General Public
+- License as published by the Free Software Foundation; either
+- version 2.1 of the License, or (at your option) any later version.
+-
+- The GNU C Library is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+- Lesser General Public License for more details.
+-
+- You should have received a copy of the GNU Lesser General Public
+- License along with the GNU C Library. If not, see
+- <http://www.gnu.org/licenses/>. */
+-
+-#include <sysdep.h>
+-
+-
+-PSEUDO (__getppid, getxpid, 0)
+- MOVE (r1, r0)
+- ret
+-PSEUDO_END (__getppid)
+-
+-weak_alias (__getppid, getppid)
+diff --git a/sysdeps/unix/sysv/linux/alpha/getegid.S b/sysdeps/unix/sysv/linux/alpha/getegid.S
+new file mode 100644
+index 0000000000..167009d17a
+--- /dev/null
++++ b/sysdeps/unix/sysv/linux/alpha/getegid.S
+@@ -0,0 +1,26 @@
++/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library. If not, see
++ <http://www.gnu.org/licenses/>. */
++
++#include <sysdep.h>
++
++
++PSEUDO (__getegid, getxgid, 0)
++ MOVE (r1, r0)
++ ret
++PSEUDO_END (__getegid)
++
++weak_alias (__getegid, getegid)
+diff --git a/sysdeps/unix/sysv/linux/alpha/geteuid.S b/sysdeps/unix/sysv/linux/alpha/geteuid.S
+new file mode 100644
+index 0000000000..39413779f7
+--- /dev/null
++++ b/sysdeps/unix/sysv/linux/alpha/geteuid.S
+@@ -0,0 +1,26 @@
++/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library. If not, see
++ <http://www.gnu.org/licenses/>. */
++
++#include <sysdep.h>
++
++
++PSEUDO (__geteuid, getxuid, 0)
++ MOVE (r1, r0)
++ ret
++PSEUDO_END (__geteuid)
++
++weak_alias (__geteuid, geteuid)
+diff --git a/sysdeps/unix/sysv/linux/alpha/getppid.S b/sysdeps/unix/sysv/linux/alpha/getppid.S
+new file mode 100644
+index 0000000000..4d291181bd
+--- /dev/null
++++ b/sysdeps/unix/sysv/linux/alpha/getppid.S
+@@ -0,0 +1,26 @@
++/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library. If not, see
++ <http://www.gnu.org/licenses/>. */
++
++#include <sysdep.h>
++
++
++PSEUDO (__getppid, getxpid, 0)
++ MOVE (r1, r0)
++ ret
++PSEUDO_END (__getppid)
++
++weak_alias (__getppid, getppid)
+diff --git a/sysdeps/unix/sysv/linux/bits/statx.h b/sysdeps/unix/sysv/linux/bits/statx.h
+index 206878723f..aaccfdc2dc 100644
+--- a/sysdeps/unix/sysv/linux/bits/statx.h
++++ b/sysdeps/unix/sysv/linux/bits/statx.h
+@@ -26,11 +26,13 @@
+
+ /* Use "" to work around incorrect macro expansion of the
+ __has_include argument (GCC PR 80005). */
+-#if __glibc_has_include ("linux/stat.h")
+-# include "linux/stat.h"
+-# ifdef STATX_TYPE
+-# define __statx_timestamp_defined 1
+-# define __statx_defined 1
++#ifdef __has_include
++# if __has_include ("linux/stat.h")
++# include "linux/stat.h"
++# ifdef STATX_TYPE
++# define __statx_timestamp_defined 1
++# define __statx_defined 1
++# endif
+ # endif
+ #endif
+
+diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile
+index 8217f42e75..03044e7365 100644
+--- a/sysdeps/unix/sysv/linux/mips/Makefile
++++ b/sysdeps/unix/sysv/linux/mips/Makefile
+@@ -63,14 +63,25 @@ sysdep-dl-routines += dl-static
+
+ sysdep_routines += dl-vdso
+ endif
+-
+-# Supporting non-executable stacks on MIPS requires changes to both
+-# the Linux kernel and glibc. See
+-# <https://sourceware.org/ml/libc-alpha/2016-01/msg00567.html> and
+-# <https://sourceware.org/ml/libc-alpha/2016-01/msg00719.html>.
++# If the compiler doesn't use GNU.stack note,
++# this test is expected to fail.
++ifneq ($(mips-has-gnustack),yes)
+ test-xfail-check-execstack = yes
+ endif
++endif
+
+ ifeq ($(subdir),stdlib)
+ gen-as-const-headers += ucontext_i.sym
+ endif
++
++ifeq ($(mips-force-execstack),yes)
++CFLAGS-.o += -Wa,-execstack
++CFLAGS-.os += -Wa,-execstack
++CFLAGS-.op += -Wa,-execstack
++CFLAGS-.oS += -Wa,-execstack
++
++ASFLAGS-.o += -Wa,-execstack
++ASFLAGS-.os += -Wa,-execstack
++ASFLAGS-.op += -Wa,-execstack
++ASFLAGS-.oS += -Wa,-execstack
++endif
+diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure
+index 1ee7f41a36..25f98e0c7b 100644
+--- a/sysdeps/unix/sysv/linux/mips/configure
++++ b/sysdeps/unix/sysv/linux/mips/configure
+@@ -475,3 +475,44 @@ if test -z "$arch_minimum_kernel"; then
+ arch_minimum_kernel=4.5.0
+ fi
+ fi
++
++# Check if we are supposed to run on kernels older than 4.8.0. If so,
++# force executable stack to avoid potential runtime problems with fpu
++# emulation.
++# NOTE: The check below assumes that in absence of user-provided minumum_kernel
++# we will default to arch_minimum_kernel which is currently less than 4.8.0 for
++# all known configurations. If this changes, the check must be updated.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler must use executable stack" >&5
++$as_echo_n "checking whether the compiler must use executable stack... " >&6; }
++if ${libc_cv_mips_force_execstack+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ libc_cv_mips_force_execstack=no
++ if test $libc_mips_float = hard; then
++ if test -n "$minimum_kernel"; then
++
++ min_version=$((`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`))
++
++ if test $min_version -lt 264192; then
++ libc_cv_mips_force_execstack=yes
++ fi
++ else
++ libc_cv_mips_force_execstack=yes
++ fi
++ fi
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mips_force_execstack" >&5
++$as_echo "$libc_cv_mips_force_execstack" >&6; }
++
++libc_mips_has_gnustack=$libc_cv_as_noexecstack
++
++if test $libc_cv_mips_force_execstack = yes; then
++ libc_mips_has_gnustack=no
++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: forcing executable stack for pre-4.8.0 Linux kernels" >&5
++$as_echo "$as_me: WARNING: forcing executable stack for pre-4.8.0 Linux kernels" >&2;}
++fi
++
++config_vars="$config_vars
++mips-force-execstack = ${libc_cv_mips_force_execstack}"
++config_vars="$config_vars
++mips-has-gnustack = ${libc_mips_has_gnustack}"
+diff --git a/sysdeps/unix/sysv/linux/mips/configure.ac b/sysdeps/unix/sysv/linux/mips/configure.ac
+index 9147aa4582..3db1b32b08 100644
+--- a/sysdeps/unix/sysv/linux/mips/configure.ac
++++ b/sysdeps/unix/sysv/linux/mips/configure.ac
+@@ -134,3 +134,35 @@ if test -z "$arch_minimum_kernel"; then
+ arch_minimum_kernel=4.5.0
+ fi
+ fi
++
++# Check if we are supposed to run on kernels older than 4.8.0. If so,
++# force executable stack to avoid potential runtime problems with fpu
++# emulation.
++# NOTE: The check below assumes that in absence of user-provided minumum_kernel
++# we will default to arch_minimum_kernel which is currently less than 4.8.0 for
++# all known configurations. If this changes, the check must be updated.
++AC_CACHE_CHECK([whether the compiler must use executable stack],
++ libc_cv_mips_force_execstack, [dnl
++libc_cv_mips_force_execstack=no
++ if test $libc_mips_float = hard; then
++ if test -n "$minimum_kernel"; then
++ changequote(,)
++ min_version=$((`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`))
++ changequote([,])
++ if test $min_version -lt 264192; then
++ libc_cv_mips_force_execstack=yes
++ fi
++ else
++ libc_cv_mips_force_execstack=yes
++ fi
++ fi])
++
++libc_mips_has_gnustack=$libc_cv_as_noexecstack
++
++if test $libc_cv_mips_force_execstack = yes; then
++ libc_mips_has_gnustack=no
++ AC_MSG_WARN([forcing executable stack for pre-4.8.0 Linux kernels])
++fi
++
++LIBC_CONFIG_VAR([mips-force-execstack],[${libc_cv_mips_force_execstack}])
++LIBC_CONFIG_VAR([mips-has-gnustack],[${libc_mips_has_gnustack}])
+diff --git a/sysdeps/unix/sysv/linux/riscv/vfork.S b/sysdeps/unix/sysv/linux/riscv/vfork.S
+index 67373f181b..dc173d6b47 100644
+--- a/sysdeps/unix/sysv/linux/riscv/vfork.S
++++ b/sysdeps/unix/sysv/linux/riscv/vfork.S
+@@ -21,9 +21,12 @@
+ #include <sys/asm.h>
+ #include <sysdep.h>
+ #define __ASSEMBLY__
+-#include <linux/sched.h>
+ #include <asm/signal.h>
+
++#define CLONE_VM 0x00000100 /* Set if VM shared between processes. */
++#define CLONE_VFORK 0x00004000 /* Set if the parent wants the child to
++ wake it up on mm_release. */
++
+ .text
+ LEAF (__libc_vfork)
+
+diff --git a/sysdeps/unix/sysv/linux/test-errno-linux.c b/sysdeps/unix/sysv/linux/test-errno-linux.c
+index cb979d44bd..aaa9eadc0a 100644
+--- a/sysdeps/unix/sysv/linux/test-errno-linux.c
++++ b/sysdeps/unix/sysv/linux/test-errno-linux.c
+@@ -160,8 +160,9 @@ do_test (void)
+ fails |= test_wrp (EINVAL, poll, &pollfd, -1, 0);
+ /* quotactl returns ENOSYS for kernels not configured with
+ CONFIG_QUOTA, and may return EPERM if called within certain types
+- of containers. */
+- fails |= test_wrp2 (LIST (ENODEV, ENOSYS, EPERM),
++ of containers. Linux 5.4 added additional argument validation
++ and can return EINVAL. */
++ fails |= test_wrp2 (LIST (ENODEV, ENOSYS, EPERM, EINVAL),
+ quotactl, Q_GETINFO, NULL, -1, (caddr_t) &dqblk);
+ fails |= test_wrp (EINVAL, sched_getparam, -1, &sch_param);
+ fails |= test_wrp (EINVAL, sched_getscheduler, -1);
+diff --git a/sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h b/sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h
+index 975cbe2950..df2cdfdb6b 100644
+--- a/sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h
++++ b/sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h
+@@ -31,7 +31,8 @@
+ environment variable, LD_PREFER_MAP_32BIT_EXEC. */
+ #define EXTRA_LD_ENVVARS \
+ case 21: \
+- if (memcmp (envline, "PREFER_MAP_32BIT_EXEC", 21) == 0) \
++ if (!__libc_enable_secure \
++ && memcmp (envline, "PREFER_MAP_32BIT_EXEC", 21) == 0) \
+ GLRO(dl_x86_cpu_features).feature[index_arch_Prefer_MAP_32BIT_EXEC] \
+ |= bit_arch_Prefer_MAP_32BIT_EXEC; \
+ break;
+diff --git a/time/Makefile b/time/Makefile
+index a428f55245..63b8d735ea 100644
+--- a/time/Makefile
++++ b/time/Makefile
+@@ -57,6 +57,8 @@ include ../gen-locales.mk
+
+ $(objpfx)tst-ftime_l.out: $(gen-locales)
+ $(objpfx)tst-strptime.out: $(gen-locales)
++$(objpfx)tst-strftime2.out: $(gen-locales)
++$(objpfx)tst-strftime3.out: $(gen-locales)
+ endif
+
+ tz-cflags = -DTZDIR='"$(zonedir)"' \