commit b2f31923332807d9c755995699953ef86ca1feff (HEAD -> gentoo/2.35, gentoo/gentoo/2.35)
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Mon May 16 18:41:43 2022 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:14:24 2022 +0200

    csu: Implement and use _dl_early_allocate during static startup
    
    This implements mmap fallback for a brk failure during TLS
    allocation.
    
    scripts/tls-elf-edit.py is updated to support the new patching method.
    The script no longer requires that in the input object is of ET_DYN
    type.
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit f787e138aa0bf677bf74fa2a08595c446292f3d7)
    (cherry picked from commit 72d9dcfd16468ed143a2800288476835f7a8c2a4)

 csu/libc-tls.c                              | 11 ++--
 elf/Makefile                                | 19 +++++++
 elf/dl-early_allocate.c                     | 30 +++++++++++
 elf/tst-tls-allocation-failure-static.c     | 31 +++++++++++
 scripts/tst-elf-edit.py                     | 34 +++++++++---
 sysdeps/generic/ldsodefs.h                  |  5 ++
 sysdeps/unix/sysv/linux/dl-early_allocate.c | 82 +++++++++++++++++++++++++++++
 7 files changed, 202 insertions(+), 10 deletions(-)

commit e88c9a8387dd0a94a87a4b4eb45fac7c92680260
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Mon May 16 18:41:43 2022 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:14:04 2022 +0200

    Linux: Introduce __brk_call for invoking the brk system call
    
    Alpha and sparc can now use the generic implementation.
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit b57ab258c1140bc45464b4b9908713e3e0ee35aa)
    (cherry picked from commit b5ddf33c6e63d89658450da4c85362349c7fe522)

 sysdeps/unix/sysv/linux/alpha/brk_call.h           | 28 +++++++++++
 sysdeps/unix/sysv/linux/brk.c                      |  3 +-
 sysdeps/unix/sysv/linux/brk_call.h                 | 25 ++++++++++
 sysdeps/unix/sysv/linux/sparc/brk.c                | 58 ----------------------
 .../sysv/linux/{alpha/brk.c => sparc/brk_call.h}   | 35 ++++++-------
 5 files changed, 71 insertions(+), 78 deletions(-)

commit 23143a8d92ae33daca51ba79fe244742302e729a
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Mon May 9 18:15:16 2022 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:13:47 2022 +0200

    Linux: Implement a useful version of _startup_fatal
    
    On i386 and ia64, the TCB is not available at this point.
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit a2a6bce7d7e52c1c34369a7da62c501cc350bc31)
    (cherry picked from commit 2d05ba7f8ef979947e910a37ae8115a816eb4d08)

 sysdeps/unix/sysv/linux/i386/startup.h | 23 ++++----------------
 sysdeps/unix/sysv/linux/ia64/startup.h | 22 +++++++++++++++++++
 sysdeps/unix/sysv/linux/startup.h      | 39 ++++++++++++++++++++++++++++++++++
 3 files changed, 65 insertions(+), 19 deletions(-)

commit 9a8041fd2aab921054d10aa68c1c024eb39559eb
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Mon May 9 18:15:16 2022 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:13:31 2022 +0200

    ia64: Always define IA64_USE_NEW_STUB as a flag macro
    
    And keep the previous definition if it exists.  This allows
    disabling IA64_USE_NEW_STUB while keeping USE_DL_SYSINFO defined.
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit 18bd9c3d3b1b6a9182698c85354578d1d58e9d64)
    (cherry picked from commit 55ee3afa0d1d09ea1b3eeba9b59281c7e3fc3e17)

 sysdeps/unix/sysv/linux/ia64/brk.c    |  5 ++---
 sysdeps/unix/sysv/linux/ia64/sysdep.h | 23 +++++++++++++----------
 2 files changed, 15 insertions(+), 13 deletions(-)

commit 67878c1e7bba3d06e15139de94a550cae05ab485
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Wed May 4 15:37:21 2022 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:13:13 2022 +0200

    Linux: Define MMAP_CALL_INTERNAL
    
    Unlike MMAP_CALL, this avoids a TCB dependency for an errno update
    on failure.
    
    <mmap_internal.h> cannot be included as is on several architectures
    due to the definition of page_unit, so introduce a separate header
    file for the definition of MMAP_CALL and MMAP_CALL_INTERNAL,
    <mmap_call.h>.
    
    Reviewed-by: Stefan Liebler <stli@linux.ibm.com>
    (cherry picked from commit c1b68685d438373efe64e5f076f4215723004dfb)
    (cherry picked from commit d66cca3fbb12539aa72a4c24c2f5b2bb0197b306)

 sysdeps/unix/sysv/linux/mmap_call.h                | 22 ++++++++++++++++++++++
 sysdeps/unix/sysv/linux/mmap_internal.h            |  6 +-----
 .../linux/s390/{mmap_internal.h => mmap_call.h}    | 14 +++++++-------
 3 files changed, 30 insertions(+), 12 deletions(-)

commit bdf69d13ae6546852f1b0592bce90d7c7c87d43d
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Wed May 4 15:37:21 2022 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:12:54 2022 +0200

    i386: Honor I386_USE_SYSENTER for 6-argument Linux system calls
    
    Introduce an int-80h-based version of __libc_do_syscall and use
    it if I386_USE_SYSENTER is defined as 0.
    
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    (cherry picked from commit 60f0f2130d30cfd008ca39743027f1e200592dff)
    (cherry picked from commit a7b122a7b45d0cffebbe94e7aedf8634f74d84b9)

 sysdeps/unix/sysv/linux/i386/Makefile              |  2 +-
 .../unix/sysv/linux/i386/libc-do-syscall-int80.S   | 25 ++++++++++++++++++++++
 sysdeps/unix/sysv/linux/i386/sysdep.h              | 13 +++++++++--
 3 files changed, 37 insertions(+), 3 deletions(-)

commit 6f24dade779b693c24286723a209982760f59ce2
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Wed May 4 15:37:21 2022 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:12:36 2022 +0200

    i386: Remove OPTIMIZE_FOR_GCC_5 from Linux libc-do-syscall.S
    
    After commit a78e6a10d0b50d0ca80309775980fc99944b1727
    ("i386: Remove broken CAN_USE_REGISTER_ASM_EBP (bug 28771)"),
    it is never defined.
    
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    (cherry picked from commit 6e5c7a1e262961adb52443ab91bd2c9b72316402)
    (cherry picked from commit d1772c937680eac35256434eca70f6d396f4b7f5)

 sysdeps/unix/sysv/linux/i386/libc-do-syscall.S | 3 ---
 1 file changed, 3 deletions(-)

commit 14c309619eda2256f7f3314050be334632a77939
Author:     Fangrui Song <maskray@google.com>
AuthorDate: Tue Apr 19 15:52:27 2022 -0700
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:12:18 2022 +0200

    elf: Remove __libc_init_secure
    
    After 73fc4e28b9464f0e13edc719a5372839970e7ddb,
    __libc_enable_secure_decided is always 0 and a statically linked
    executable may overwrite __libc_enable_secure without considering
    AT_SECURE.
    
    The __libc_enable_secure has been correctly initialized in _dl_aux_init,
    so just remove __libc_enable_secure_decided and __libc_init_secure.
    This allows us to remove some startup_get*id functions from
    22b79ed7f413cd980a7af0cf258da5bf82b6d5e5.
    
    Reviewed-by: Florian Weimer <fweimer@redhat.com>
    (cherry picked from commit 3e9acce8c50883b6cd8a3fb653363d9fa21e1608)
    (cherry picked from commit 58bb3aeaae711d2229bacfc784b7879af2e4f771)

 csu/libc-start.c                       |  3 ---
 elf/enbl-secure.c                      | 10 ----------
 include/libc-internal.h                |  3 ---
 include/unistd.h                       |  1 -
 sysdeps/generic/startup.h              | 24 ------------------------
 sysdeps/mach/hurd/enbl-secure.c        | 30 ------------------------------
 sysdeps/mach/hurd/i386/init-first.c    |  4 ----
 sysdeps/unix/sysv/linux/i386/startup.h | 24 ------------------------
 8 files changed, 99 deletions(-)

commit 80d910caf2d3f19e5f6fa5b1ee4ff4bd4b5893cd
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Mon Feb 28 11:50:41 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:12:01 2022 +0200

    Linux: Consolidate auxiliary vector parsing (redo)
    
    And optimize it slightly.
    
    This is commit 8c8510ab2790039e58995ef3a22309582413d3ff revised.
    
    In _dl_aux_init in elf/dl-support.c, use an explicit loop
    and -fno-tree-loop-distribute-patterns to avoid memset.
    
    Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
    (cherry picked from commit 73fc4e28b9464f0e13edc719a5372839970e7ddb)
    (cherry picked from commit 0a5c6c9d99073c0772a9753600f0d8885efa9163)

 elf/Makefile                                 |   5 ++
 elf/dl-support.c                             |  85 +++-----------------
 sysdeps/unix/sysv/linux/alpha/dl-auxv.h      |  18 ++---
 sysdeps/unix/sysv/linux/dl-parse_auxv.h      |  61 ++++++++++++++
 sysdeps/unix/sysv/linux/dl-sysdep.c          | 114 ++++++++-------------------
 sysdeps/unix/sysv/linux/powerpc/dl-auxv.h    |  14 +---
 sysdeps/unix/sysv/linux/powerpc/dl-support.c |   4 +
 7 files changed, 118 insertions(+), 183 deletions(-)

commit 5caece3270b13642a6f81809091ca25c3247ed7a
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Fri Feb 11 19:03:04 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:11:44 2022 +0200

    Linux: Include <dl-auxv.h> in dl-sysdep.c only for SHARED
    
    Otherwise, <dl-auxv.h> on POWER ends up being included twice,
    once in dl-sysdep.c, once in dl-support.c.  That leads to a linker
    failure due to multiple definitions of _dl_cache_line_size.
    
    Fixes commit d96d2995c1121d3310102afda2deb1f35761b5e6
    ("Revert "Linux: Consolidate auxiliary vector parsing").
    
    (cherry picked from commit 098c795e85fbd05c5ef59c2d0ce59529331bea27)
    (cherry picked from commit 76304dfdaf0b979fdb2797787ec75e46aea0e8b4)

 sysdeps/unix/sysv/linux/dl-sysdep.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

commit b4776b19a3da96cd6c94e32f0d4a6ffb90f52908
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Fri Feb 11 16:01:19 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:11:17 2022 +0200

    Revert "Linux: Consolidate auxiliary vector parsing"
    
    This reverts commit 8c8510ab2790039e58995ef3a22309582413d3ff.  The
    revert is not perfect because the commit included a bug fix for
    _dl_sysdep_start with an empty argv, introduced in commit
    2d47fa68628e831a692cba8fc9050cef435afc5e ("Linux: Remove
    DL_FIND_ARG_COMPONENTS"), and this bug fix is kept.
    
    The revert is necessary because the reverted commit introduced an
    early memset call on aarch64, which leads to crash due to lack of TCB
    initialization.
    
    (cherry picked from commit d96d2995c1121d3310102afda2deb1f35761b5e6)
    (cherry picked from commit 788eb21ff0deb0ef7cb203de5e4df7898ca1d82c)

 elf/dl-support.c                             |  80 +++++++++++++++++++-
 sysdeps/unix/sysv/linux/alpha/dl-auxv.h      |  18 +++--
 sysdeps/unix/sysv/linux/dl-parse_auxv.h      |  61 ---------------
 sysdeps/unix/sysv/linux/dl-sysdep.c          | 109 +++++++++++++++++++--------
 sysdeps/unix/sysv/linux/powerpc/dl-auxv.h    |  14 +++-
 sysdeps/unix/sysv/linux/powerpc/dl-support.c |   4 -
 6 files changed, 180 insertions(+), 106 deletions(-)

commit 8b74661a17e6b1d7d321c1019b0cf8a19b4a1fa0
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Thu Feb 3 10:58:59 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:10:56 2022 +0200

    Linux: Consolidate auxiliary vector parsing
    
    And optimize it slightly.
    
    The large switch statement in _dl_sysdep_start can be replaced with
    a large array.  This reduces source code and binary size.  On
    i686-linux-gnu:
    
    Before:
    
       text    data     bss     dec     hex filename
       7791      12       0    7803    1e7b elf/dl-sysdep.os
    
    After:
    
       text    data     bss     dec     hex filename
       7135      12       0    7147    1beb elf/dl-sysdep.os
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit 8c8510ab2790039e58995ef3a22309582413d3ff)
    (cherry picked from commit 150039ff07d19d2566c9d91b2a1368fb05451639)

 elf/dl-support.c                             |  80 +------------------
 sysdeps/unix/sysv/linux/alpha/dl-auxv.h      |  18 ++---
 sysdeps/unix/sysv/linux/dl-parse_auxv.h      |  61 +++++++++++++++
 sysdeps/unix/sysv/linux/dl-sysdep.c          | 111 ++++++++-------------------
 sysdeps/unix/sysv/linux/powerpc/dl-auxv.h    |  14 +---
 sysdeps/unix/sysv/linux/powerpc/dl-support.c |   4 +
 6 files changed, 107 insertions(+), 181 deletions(-)

commit 3e8a3e3bd0666eb3ea17404934f118bd86871eae
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Thu Feb 3 10:58:59 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:10:35 2022 +0200

    Linux: Assume that NEED_DL_SYSINFO_DSO is always defined
    
    The definition itself is still needed for generic code.
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit f19fc997a5754a6c0bb9e43618f0597e878061f7)
    (cherry picked from commit 3948c6ca896bdbf4d1ce08afac8a477d990c03cd)

 sysdeps/unix/sysv/linux/dl-sysdep.c   | 8 ++------
 sysdeps/unix/sysv/linux/m68k/sysdep.h | 4 +---
 2 files changed, 3 insertions(+), 9 deletions(-)

commit 76116ca83efcd58e2b38a67314d2a652738432bf
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Thu Feb 3 10:58:59 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:10:17 2022 +0200

    Linux: Remove DL_FIND_ARG_COMPONENTS
    
    The generic definition is always used since the Native Client
    port has been removed.
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit 2d47fa68628e831a692cba8fc9050cef435afc5e)
    (cherry picked from commit 29f833f5abe03f89cc830e362474b389545aa139)

 sysdeps/unix/sysv/linux/dl-sysdep.c | 25 ++++++++++---------------
 1 file changed, 10 insertions(+), 15 deletions(-)

commit ce76950ede3a12b9b0055915c40bb2470b6749b6
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Thu Feb 3 10:58:59 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:10:00 2022 +0200

    Linux: Remove HAVE_AUX_SECURE, HAVE_AUX_XID, HAVE_AUX_PAGESIZE
    
    They are always defined.
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit b9c3d3382f6f50e9723002deb2dc8127de720fa6)
    (cherry picked from commit 1695c5e0f66d2714b1f4bf0e38b20ebebbc6d1d2)

 sysdeps/unix/sysv/linux/dl-sysdep.c | 55 +------------------------------------
 sysdeps/unix/sysv/linux/ldsodefs.h  | 12 --------
 2 files changed, 1 insertion(+), 66 deletions(-)

commit 55a2c9f64c59087833ee09665c6f53efc451461d
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Thu Feb 3 10:58:59 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:09:44 2022 +0200

    elf: Merge dl-sysdep.c into the Linux version
    
    The generic version is the de-facto Linux implementation.  It
    requires an auxiliary vector, so Hurd does not use it.
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit 91c0a47ffb66e7cd802de870686465db3b3976a0)
    (cherry picked from commit 756d583c9eca5aa494822963a5063cfa214d1e11)

 elf/dl-sysdep.c                     | 352 +-----------------------------------
 sysdeps/unix/sysv/linux/dl-sysdep.c | 347 +++++++++++++++++++++++++++++++++--
 2 files changed, 337 insertions(+), 362 deletions(-)

commit cf698699d8c770844d525f7f5615fbaa9fb45551
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Thu Apr 21 20:52:30 2022 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:09:26 2022 +0200

    x86: Optimize {str|wcs}rchr-evex
    
    The new code unrolls the main loop slightly without adding too much
    overhead and minimizes the comparisons for the search CHAR.
    
    Geometric Mean of all benchmarks New / Old: 0.755
    See email for all results.
    
    Full xcheck passes on x86_64 with and without multiarch enabled.
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    
    (cherry picked from commit c966099cdc3e0fdf92f63eac09b22fa7e5f5f02d)
    (cherry picked from commit 2c4fc8e5ca742c6a3a1933799495bb0b00a807f0)

 sysdeps/x86_64/multiarch/strrchr-evex.S | 471 ++++++++++++++++++++------------
 1 file changed, 290 insertions(+), 181 deletions(-)

commit e9caab33d948fdec639bd97719d13dfceaf4fbd5
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Thu Apr 21 20:52:29 2022 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:09:09 2022 +0200

    x86: Optimize {str|wcs}rchr-avx2
    
    The new code unrolls the main loop slightly without adding too much
    overhead and minimizes the comparisons for the search CHAR.
    
    Geometric Mean of all benchmarks New / Old: 0.832
    See email for all results.
    
    Full xcheck passes on x86_64 with and without multiarch enabled.
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    
    (cherry picked from commit df7e295d18ffa34f629578c0017a9881af7620f6)
    (cherry picked from commit fdbc8439acfd42149fdad411df7f74dcb1b3a168)

 sysdeps/x86_64/multiarch/strrchr-avx2.S | 426 ++++++++++++++++++++------------
 1 file changed, 269 insertions(+), 157 deletions(-)

commit 1420bacb1307f3b9f81d41bcd00f7a5eea10822f
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Thu Apr 21 20:52:28 2022 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:08:52 2022 +0200

    x86: Optimize {str|wcs}rchr-sse2
    
    The new code unrolls the main loop slightly without adding too much
    overhead and minimizes the comparisons for the search CHAR.
    
    Geometric Mean of all benchmarks New / Old: 0.741
    See email for all results.
    
    Full xcheck passes on x86_64 with and without multiarch enabled.
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    
    (cherry picked from commit 5307aa9c1800f36a64c183c091c9af392c1fa75c)
    (cherry picked from commit b05c0c8b285f3531aa48e9cef9d507804c6db77e)

 sysdeps/x86_64/multiarch/strrchr-sse2.S |   2 +-
 sysdeps/x86_64/multiarch/wcsrchr-sse2.S |   3 +-
 sysdeps/x86_64/strrchr.S                | 510 +++++++++++++++++++++-----------
 sysdeps/x86_64/wcsrchr.S                | 268 +----------------
 4 files changed, 339 insertions(+), 444 deletions(-)

commit 8fb22b5ab36083d5f56c6e149599a088cbfeea9c
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Fri Apr 22 10:53:13 2022 -0700
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:08:33 2022 +0200

    x86-64: Fix SSE2 memcmp and SSSE3 memmove for x32
    
    Clear the upper 32 bits in RDX (memory size) for x32 to fix
    
    FAIL: string/tst-size_t-memcmp
    FAIL: string/tst-size_t-memcmp-2
    FAIL: string/tst-size_t-memcpy
    FAIL: wcsmbs/tst-size_t-wmemcmp
    
    on x32 introduced by
    
    8804157ad9 x86: Optimize memcmp SSE2 in memcmp.S
    26b2478322 x86: Reduce code size of mem{move|pcpy|cpy}-ssse3
    
    Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
    (cherry picked from commit 8ea20ee5f6145de4bff9481d3e09ac36ba9df8f3)
    (cherry picked from commit bc35e22be4ca69f3e2c2e1403ac30d028e092a38)

 sysdeps/x86_64/memcmp.S | 4 ++++
 1 file changed, 4 insertions(+)

commit ad78b461abe766119d98400b5b62518b1ba46899
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Tue Apr 19 17:52:33 2022 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:08:13 2022 +0200

    x86: Fix missing __wmemcmp def for disable-multiarch build
    
    commit 8804157ad9da39631703b92315460808eac86b0c
    Author: Noah Goldstein <goldstein.w.n@gmail.com>
    Date:   Fri Apr 15 12:27:59 2022 -0500
    
        x86: Optimize memcmp SSE2 in memcmp.S
    
    Only defined wmemcmp and missed __wmemcmp. This commit fixes that by
    defining __wmemcmp and setting wmemcmp as a weak alias to __wmemcmp.
    
    Both multiarch and disable-multiarch builds succeed and full xchecks
    pass.
    
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    (cherry picked from commit c72a1a062a1ded52719802c07ab459e1fd54d2a6)
    (cherry picked from commit 4d1841deb740f23ab063a65fd875e53934b65883)

 sysdeps/x86_64/multiarch/wmemcmp-sse2.S | 8 ++------
 sysdeps/x86_64/wmemcmp.S                | 6 ++++--
 2 files changed, 6 insertions(+), 8 deletions(-)

commit b3b97dd4b8ff7121a2fc92a447efd9907fafcd83
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Fri Apr 15 12:28:01 2022 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:07:57 2022 +0200

    x86: Cleanup page cross code in memcmp-avx2-movbe.S
    
    Old code was both inefficient and wasted code size. New code (-62
    bytes) and comparable or better performance in the page cross case.
    
    geometric_mean(N=20) of page cross cases New / Original: 0.960
    
    size, align0, align1, ret, New Time/Old Time
       1,   4095,      0,   0,             1.001
       1,   4095,      0,   1,             0.999
       1,   4095,      0,  -1,               1.0
       2,   4094,      0,   0,               1.0
       2,   4094,      0,   1,               1.0
       2,   4094,      0,  -1,               1.0
       3,   4093,      0,   0,               1.0
       3,   4093,      0,   1,               1.0
       3,   4093,      0,  -1,               1.0
       4,   4092,      0,   0,             0.987
       4,   4092,      0,   1,               1.0
       4,   4092,      0,  -1,               1.0
       5,   4091,      0,   0,             0.984
       5,   4091,      0,   1,             1.002
       5,   4091,      0,  -1,             1.005
       6,   4090,      0,   0,             0.993
       6,   4090,      0,   1,             1.001
       6,   4090,      0,  -1,             1.003
       7,   4089,      0,   0,             0.991
       7,   4089,      0,   1,               1.0
       7,   4089,      0,  -1,             1.001
       8,   4088,      0,   0,             0.875
       8,   4088,      0,   1,             0.881
       8,   4088,      0,  -1,             0.888
       9,   4087,      0,   0,             0.872
       9,   4087,      0,   1,             0.879
       9,   4087,      0,  -1,             0.883
      10,   4086,      0,   0,             0.878
      10,   4086,      0,   1,             0.886
      10,   4086,      0,  -1,             0.873
      11,   4085,      0,   0,             0.878
      11,   4085,      0,   1,             0.881
      11,   4085,      0,  -1,             0.879
      12,   4084,      0,   0,             0.873
      12,   4084,      0,   1,             0.889
      12,   4084,      0,  -1,             0.875
      13,   4083,      0,   0,             0.873
      13,   4083,      0,   1,             0.863
      13,   4083,      0,  -1,             0.863
      14,   4082,      0,   0,             0.838
      14,   4082,      0,   1,             0.869
      14,   4082,      0,  -1,             0.877
      15,   4081,      0,   0,             0.841
      15,   4081,      0,   1,             0.869
      15,   4081,      0,  -1,             0.876
      16,   4080,      0,   0,             0.988
      16,   4080,      0,   1,              0.99
      16,   4080,      0,  -1,             0.989
      17,   4079,      0,   0,             0.978
      17,   4079,      0,   1,             0.981
      17,   4079,      0,  -1,              0.98
      18,   4078,      0,   0,             0.981
      18,   4078,      0,   1,              0.98
      18,   4078,      0,  -1,             0.985
      19,   4077,      0,   0,             0.977
      19,   4077,      0,   1,             0.979
      19,   4077,      0,  -1,             0.986
      20,   4076,      0,   0,             0.977
      20,   4076,      0,   1,             0.986
      20,   4076,      0,  -1,             0.984
      21,   4075,      0,   0,             0.977
      21,   4075,      0,   1,             0.983
      21,   4075,      0,  -1,             0.988
      22,   4074,      0,   0,             0.983
      22,   4074,      0,   1,             0.994
      22,   4074,      0,  -1,             0.993
      23,   4073,      0,   0,              0.98
      23,   4073,      0,   1,             0.992
      23,   4073,      0,  -1,             0.995
      24,   4072,      0,   0,             0.989
      24,   4072,      0,   1,             0.989
      24,   4072,      0,  -1,             0.991
      25,   4071,      0,   0,              0.99
      25,   4071,      0,   1,             0.999
      25,   4071,      0,  -1,             0.996
      26,   4070,      0,   0,             0.993
      26,   4070,      0,   1,             0.995
      26,   4070,      0,  -1,             0.998
      27,   4069,      0,   0,             0.993
      27,   4069,      0,   1,             0.999
      27,   4069,      0,  -1,               1.0
      28,   4068,      0,   0,             0.997
      28,   4068,      0,   1,               1.0
      28,   4068,      0,  -1,             0.999
      29,   4067,      0,   0,             0.996
      29,   4067,      0,   1,             0.999
      29,   4067,      0,  -1,             0.999
      30,   4066,      0,   0,             0.991
      30,   4066,      0,   1,             1.001
      30,   4066,      0,  -1,             0.999
      31,   4065,      0,   0,             0.988
      31,   4065,      0,   1,             0.998
      31,   4065,      0,  -1,             0.998
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    
    (cherry picked from commit 23102686ec67b856a2d4fd25ddaa1c0b8d175c4f)
    (cherry picked from commit cee9939f67607483110bad9db84c62ce9d71721b)

 sysdeps/x86_64/multiarch/memcmp-avx2-movbe.S | 98 +++++++++++++++++-----------
 1 file changed, 61 insertions(+), 37 deletions(-)

commit cdcb01450f9d460c0d81b1fe730c9a9df2af57da
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Fri Apr 15 12:28:00 2022 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:07:34 2022 +0200

    x86: Remove memcmp-sse4.S
    
    Code didn't actually use any sse4 instructions since `ptest` was
    removed in:
    
    commit 2f9062d7171850451e6044ef78d91ff8c017b9c0
    Author: Noah Goldstein <goldstein.w.n@gmail.com>
    Date:   Wed Nov 10 16:18:56 2021 -0600
    
        x86: Shrink memcmp-sse4.S code size
    
    The new memcmp-sse2 implementation is also faster.
    
    geometric_mean(N=20) of page cross cases SSE2 / SSE4: 0.905
    
    Note there are two regressions preferring SSE2 for Size = 1 and Size =
    65.
    
    Size = 1:
    size, align0, align1, ret, New Time/Old Time
       1,      1,      1,   0,               1.2
       1,      1,      1,   1,             1.197
       1,      1,      1,  -1,               1.2
    
    This is intentional. Size == 1 is significantly less hot based on
    profiles of GCC11 and Python3 than sizes [4, 8] (which is made
    hotter).
    
    Python3 Size = 1        -> 13.64%
    Python3 Size = [4, 8]   -> 60.92%
    
    GCC11   Size = 1        ->  1.29%
    GCC11   Size = [4, 8]   -> 33.86%
    
    size, align0, align1, ret, New Time/Old Time
       4,      4,      4,   0,             0.622
       4,      4,      4,   1,             0.797
       4,      4,      4,  -1,             0.805
       5,      5,      5,   0,             0.623
       5,      5,      5,   1,             0.777
       5,      5,      5,  -1,             0.802
       6,      6,      6,   0,             0.625
       6,      6,      6,   1,             0.813
       6,      6,      6,  -1,             0.788
       7,      7,      7,   0,             0.625
       7,      7,      7,   1,             0.799
       7,      7,      7,  -1,             0.795
       8,      8,      8,   0,             0.625
       8,      8,      8,   1,             0.848
       8,      8,      8,  -1,             0.914
       9,      9,      9,   0,             0.625
    
    Size = 65:
    size, align0, align1, ret, New Time/Old Time
      65,      0,      0,   0,             1.103
      65,      0,      0,   1,             1.216
      65,      0,      0,  -1,             1.227
      65,     65,      0,   0,             1.091
      65,      0,     65,   1,              1.19
      65,     65,     65,  -1,             1.215
    
    This is because A) the checks in range [65, 96] are now unrolled 2x
    and B) because smaller values <= 16 are now given a hotter path. By
    contrast the SSE4 version has a branch for Size = 80. The unrolled
    version has get better performance for returns which need both
    comparisons.
    
    size, align0, align1, ret, New Time/Old Time
     128,      4,      8,   0,             0.858
     128,      4,      8,   1,             0.879
     128,      4,      8,  -1,             0.888
    
    As well, out of microbenchmark environments that are not full
    predictable the branch will have a real-cost.
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    
    (cherry picked from commit 7cbc03d03091d5664060924789afe46d30a5477e)
    (cherry picked from commit 0909286ffabddd7e59cf85a539e8d43406819952)

 sysdeps/x86_64/multiarch/Makefile          |   2 -
 sysdeps/x86_64/multiarch/ifunc-impl-list.c |   4 -
 sysdeps/x86_64/multiarch/ifunc-memcmp.h    |   4 -
 sysdeps/x86_64/multiarch/memcmp-sse4.S     | 803 -----------------------------
 4 files changed, 813 deletions(-)

commit 15c6515c050a075fe154684124ed8b5acefc52e4
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Fri Apr 15 12:27:59 2022 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:07:10 2022 +0200

    x86: Optimize memcmp SSE2 in memcmp.S
    
    New code save size (-303 bytes) and has significantly better
    performance.
    
    geometric_mean(N=20) of page cross cases New / Original: 0.634
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    
    (cherry picked from commit 8804157ad9da39631703b92315460808eac86b0c)
    (cherry picked from commit 5a8df6485c584e2b0e957ec6b9070437a724911a)

 sysdeps/x86_64/memcmp.S                  | 884 ++++++++++++++++++-------------
 sysdeps/x86_64/memcmpeq.S                |   2 +-
 sysdeps/x86_64/multiarch/Makefile        |   2 +-
 sysdeps/x86_64/multiarch/memcmp-sse2.S   |   4 +-
 sysdeps/x86_64/multiarch/memcmpeq-sse2.S |   4 +-
 sysdeps/x86_64/multiarch/wmemcmp-c.c     |   9 -
 sysdeps/x86_64/multiarch/wmemcmp-sse2.S  |  25 +
 sysdeps/x86_64/wmemcmp.S                 |  21 +
 8 files changed, 575 insertions(+), 376 deletions(-)

commit db5effda222218f77bb2062858cb26e628200566
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Fri Mar 25 17:13:33 2022 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:06:53 2022 +0200

    x86: Small improvements for wcslen
    
    Just a few QOL changes.
        1. Prefer `add` > `lea` as it has high execution units it can run
           on.
        2. Don't break macro-fusion between `test` and `jcc`
        3. Reduce code size by removing gratuitous padding bytes (-90
           bytes).
    
    geometric_mean(N=20) of all benchmarks New / Original: 0.959
    
    All string/memory tests pass.
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    
    (cherry picked from commit 244b415d386487521882debb845a040a4758cb18)
    (cherry picked from commit af0865571a973d72da8cec29001ed411e12556b0)

 sysdeps/x86_64/wcslen.S | 86 +++++++++++++++++++++++--------------------------
 1 file changed, 41 insertions(+), 45 deletions(-)

commit 655e865c99691979eddc8b2fcf9e2a7904663cba
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Wed Mar 23 16:57:46 2022 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:06:34 2022 +0200

    x86: Remove AVX str{n}casecmp
    
    The rational is:
    
    1. SSE42 has nearly identical logic so any benefit is minimal (3.4%
       regression on Tigerlake using SSE42 versus AVX across the
       benchtest suite).
    2. AVX2 version covers the majority of targets that previously
       prefered it.
    3. The targets where AVX would still be best (SnB and IVB) are
       becoming outdated.
    
    All in all the saving the code size is worth it.
    
    All string/memory tests pass.
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    
    (cherry picked from commit 305769b2a15c2e96f9e1b5195d3c4e0d6f0f4b68)
    (cherry picked from commit 3b710e32d8381809c69a6d9b2a1ee9c8afb2c3c2)

 sysdeps/x86_64/multiarch/Makefile           |   2 -
 sysdeps/x86_64/multiarch/ifunc-impl-list.c  |  12 --
 sysdeps/x86_64/multiarch/ifunc-strcasecmp.h |   4 -
 sysdeps/x86_64/multiarch/strcasecmp_l-avx.S |  22 ---
 sysdeps/x86_64/multiarch/strcmp-sse42.S     | 240 ++++++++++++----------------
 sysdeps/x86_64/multiarch/strncase_l-avx.S   |  22 ---
 6 files changed, 105 insertions(+), 197 deletions(-)

commit 103a45d8e2b03d8f534c553d4933aa718a46b728
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Thu Mar 24 18:56:13 2022 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:06:15 2022 +0200

    x86: Add EVEX optimized str{n}casecmp
    
    geometric_mean(N=40) of all benchmarks EVEX / SSE42: .621
    
    All string/memory tests pass.
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    
    (cherry picked from commit 84e7c46df4086873eae28a1fb87d2cf5388b1e16)
    (cherry picked from commit fc5d42bf826b37e56b3a4f41e63e31c6d4ea5f8e)

 sysdeps/x86_64/multiarch/Makefile            |   2 +
 sysdeps/x86_64/multiarch/ifunc-impl-list.c   |  16 ++
 sysdeps/x86_64/multiarch/ifunc-strcasecmp.h  |   5 +
 sysdeps/x86_64/multiarch/strcasecmp_l-evex.S |  23 +++
 sysdeps/x86_64/multiarch/strcmp-evex.S       | 290 +++++++++++++++++++++++----
 sysdeps/x86_64/multiarch/strncase_l-evex.S   |  25 +++
 6 files changed, 321 insertions(+), 40 deletions(-)

commit 76706bdf8b711951e45df220e894f1ba86069b85
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Thu Mar 24 18:56:12 2022 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:05:59 2022 +0200

    x86: Add AVX2 optimized str{n}casecmp
    
    geometric_mean(N=40) of all benchmarks AVX2 / SSE42: .702
    
    All string/memory tests pass.
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    
    (cherry picked from commit bbf81222343fed5cd704001a2ae0d86c71544151)
    (cherry picked from commit 33fcf8344fe037dab408d2fe057a9d5f9abb05b7)

 sysdeps/x86_64/multiarch/Makefile                |   4 +
 sysdeps/x86_64/multiarch/ifunc-impl-list.c       |  28 +++
 sysdeps/x86_64/multiarch/ifunc-strcasecmp.h      |  12 ++
 sysdeps/x86_64/multiarch/strcasecmp_l-avx2-rtm.S |  15 ++
 sysdeps/x86_64/multiarch/strcasecmp_l-avx2.S     |  23 +++
 sysdeps/x86_64/multiarch/strcmp-avx2.S           | 237 ++++++++++++++++++++---
 sysdeps/x86_64/multiarch/strncase_l-avx2-rtm.S   |  16 ++
 sysdeps/x86_64/multiarch/strncase_l-avx2.S       |  27 +++
 8 files changed, 331 insertions(+), 31 deletions(-)

commit 9266e73d729be350b55939bcae1ab7ba397d8ac9
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Wed Mar 23 16:57:38 2022 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:05:41 2022 +0200

    x86: Optimize str{n}casecmp TOLOWER logic in strcmp-sse42.S
    
    Slightly faster method of doing TOLOWER that saves an
    instruction.
    
    Also replace the hard coded 5-byte no with .p2align 4. On builds with
    CET enabled this misaligned entry to strcasecmp.
    
    geometric_mean(N=40) of all benchmarks New / Original: .920
    
    All string/memory tests pass.
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    
    (cherry picked from commit d154758e618ec9324f5d339c46db0aa27e8b1226)
    (cherry picked from commit 3496d64d6934ba34d636864a550dcf1828b5a987)

 sysdeps/x86_64/multiarch/strcmp-sse42.S | 83 ++++++++++++++-------------------
 1 file changed, 35 insertions(+), 48 deletions(-)

commit dfe9a29e72142d20ec1a30f1bfae6818b8e71f09
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Wed Mar 23 16:57:36 2022 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:05:22 2022 +0200

    x86: Optimize str{n}casecmp TOLOWER logic in strcmp.S
    
    Slightly faster method of doing TOLOWER that saves an
    instruction.
    
    Also replace the hard coded 5-byte no with .p2align 4. On builds with
    CET enabled this misaligned entry to strcasecmp.
    
    geometric_mean(N=40) of all benchmarks New / Original: .894
    
    All string/memory tests pass.
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    
    (cherry picked from commit 670b54bc585ea4a94f3b2e9272ba44aa6b730b73)
    (cherry picked from commit 283982b36211e694755ef74592f2a1d70369aff3)

 sysdeps/x86_64/strcmp.S | 64 ++++++++++++++++++++++---------------------------
 1 file changed, 29 insertions(+), 35 deletions(-)

commit c8905b0563873e588b3814715e41cb28a4116823
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Wed Mar 23 16:57:29 2022 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:04:59 2022 +0200

    x86: Remove strspn-sse2.S and use the generic implementation
    
    The generic implementation is faster.
    
    geometric_mean(N=20) of all benchmarks New / Original: .710
    
    All string/memory tests pass.
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    
    (cherry picked from commit 9c8a6ad620b49a27120ecdd7049c26bf05900397)
    (cherry picked from commit 420cd6f155bf3dd4ff252843991ebe896e35c7ec)

 .../multiarch/{strspn-sse2.S => strspn-sse2.c}     |   8 +-
 sysdeps/x86_64/strspn.S                            | 112 ---------------------
 2 files changed, 4 insertions(+), 116 deletions(-)

commit 5c76a8c16b733fabcd9a2a9d3e3e56ca986bd179
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Wed Mar 23 16:57:27 2022 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:04:40 2022 +0200

    x86: Remove strpbrk-sse2.S and use the generic implementation
    
    The generic implementation is faster (see strcspn commit).
    
    All string/memory tests pass.
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    
    (cherry picked from commit 653358535280a599382cb6c77538a187dac6a87f)
    (cherry picked from commit 4b61d7652164786786c4b154e2903929281fd09e)

 sysdeps/x86_64/multiarch/{strpbrk-sse2.S => strpbrk-sse2.c} | 9 ++++-----
 sysdeps/x86_64/strpbrk.S                                    | 3 ---
 2 files changed, 4 insertions(+), 8 deletions(-)

commit 8fe3be421d65d76ca06cc2e3ed9f83e4111dcc73
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Wed Mar 23 16:57:26 2022 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:04:20 2022 +0200

    x86: Remove strcspn-sse2.S and use the generic implementation
    
    The generic implementation is faster.
    
    geometric_mean(N=20) of all benchmarks New / Original: .678
    
    All string/memory tests pass.
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    
    (cherry picked from commit fe28e7d9d9535ebab4081d195c553b4fbf39d9ae)
    (cherry picked from commit 2fef1961a7ba992c51df04dc6c5bffdfd5adb41b)

 .../multiarch/{strcspn-sse2.S => strcspn-sse2.c}   |   8 +-
 sysdeps/x86_64/strcspn.S                           | 119 ---------------------
 2 files changed, 4 insertions(+), 123 deletions(-)

commit 50d0c8b976c19786b5e35eaf6a3053dc80ade2ec
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Wed Mar 23 16:57:24 2022 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:04:00 2022 +0200

    x86: Optimize strspn in strspn-c.c
    
    Use _mm_cmpeq_epi8 and _mm_movemask_epi8 to get strlen instead of
    _mm_cmpistri. Also change offset to unsigned to avoid unnecessary
    sign extensions.
    
    geometric_mean(N=20) of all benchmarks that dont fallback on
    sse2; New / Original: .901
    
    All string/memory tests pass.
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    
    (cherry picked from commit 412d10343168b05b8cf6c3683457cf9711d28046)
    (cherry picked from commit 1ed2813eb14526934091ecf65184747b4b5582dc)

 sysdeps/x86_64/multiarch/strspn-c.c | 86 +++++++++++++++++--------------------
 1 file changed, 39 insertions(+), 47 deletions(-)

commit 78125796ee40001eeb5587344ceaac9e61becad0
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Wed Mar 23 16:57:22 2022 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:03:39 2022 +0200

    x86: Optimize strcspn and strpbrk in strcspn-c.c
    
    Use _mm_cmpeq_epi8 and _mm_movemask_epi8 to get strlen instead of
    _mm_cmpistri. Also change offset to unsigned to avoid unnecessary
    sign extensions.
    
    geometric_mean(N=20) of all benchmarks that dont fallback on
    sse2/strlen; New / Original: .928
    
    All string/memory tests pass.
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    
    (cherry picked from commit 30d627d477d7255345a4b713cf352ac32d644d61)
    (cherry picked from commit 3214c878f2a4546f296d9892169c06b3676c3133)

 sysdeps/x86_64/multiarch/strcspn-c.c | 83 ++++++++++++++++--------------------
 1 file changed, 37 insertions(+), 46 deletions(-)

commit 475cab596df14e8cf80f6189a1041664feb275cb
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Wed Mar 23 16:57:18 2022 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:03:14 2022 +0200

    x86: Code cleanup in strchr-evex and comment justifying branch
    
    Small code cleanup for size: -81 bytes.
    
    Add comment justifying using a branch to do NULL/non-null return.
    
    All string/memory tests pass and no regressions in benchtests.
    
    geometric_mean(N=20) of all benchmarks New / Original: .985
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    
    (cherry picked from commit ec285ea90415458225623ddc0492ae3f705af043)
    (cherry picked from commit ff9772ac190c101a5f6e68f4fb7ce852326ffe27)

 sysdeps/x86_64/multiarch/strchr-evex.S | 146 ++++++++++++++++++---------------
 1 file changed, 80 insertions(+), 66 deletions(-)

commit 87600da9b2e76c14fccb5b03d8b6afe59ca3cfb3
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Wed Mar 23 16:57:16 2022 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:02:53 2022 +0200

    x86: Code cleanup in strchr-avx2 and comment justifying branch
    
    Small code cleanup for size: -53 bytes.
    
    Add comment justifying using a branch to do NULL/non-null return.
    
    All string/memory tests pass and no regressions in benchtests.
    
    geometric_mean(N=20) of all benchmarks Original / New: 1.00
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    
    (cherry picked from commit a6fbf4d51e9ba8063c4f8331564892ead9c67344)
    (cherry picked from commit 424bbd4d2502c43cf36372d588cbca161cafea43)

 sysdeps/x86_64/multiarch/strchr-avx2.S | 204 +++++++++++++++++----------------
 1 file changed, 107 insertions(+), 97 deletions(-)

commit f3493b13a7e43b8c482c099e67bd4f7747e6f66d
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Thu Feb 10 11:23:24 2022 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:02:31 2022 +0200

    x86_64: Remove bcopy optimizations
    
    The symbols is not present in current POSIX specification and compiler
    already generates memmove call.
    
    (cherry picked from commit bf92893a14ebc161b08b28acc24fa06ae6be19cb)
    (cherry picked from commit 0a10b8b181d0ad84c5f8a7c42f4932528b2964bc)

 sysdeps/x86_64/multiarch/bcopy.S | 7 -------
 1 file changed, 7 deletions(-)

commit e8729c1ae0b7c0d96268416acf5a73c9f44a4373
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Sun Feb 13 18:46:23 2022 -0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:02:13 2022 +0200

    x86-64: Define __memcmpeq in ld.so
    
    Define __memcmpeq in ld.so so that compiler can generate __memcmpeq call
    when compiling for ld.so.
    
    (cherry picked from commit a5659cf27d3ce6101c1632715d18ab6321755340)
    (cherry picked from commit f0a53588da7d6b642eeabdbd934d799ed0df2b8f)

 sysdeps/x86_64/multiarch/memcmpeq-sse2.S | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

commit 7cf4605c6b0f459fa2256e9e39a07878e43f3537
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Thu Feb 10 11:52:50 2022 -0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:01:55 2022 +0200

    x86-64: Remove bzero weak alias in SS2 memset
    
    commit 3d9f171bfb5325bd5f427e9fc386453358c6e840
    Author: H.J. Lu <hjl.tools@gmail.com>
    Date:   Mon Feb 7 05:55:15 2022 -0800
    
        x86-64: Optimize bzero
    
    added the optimized bzero.  Remove bzero weak alias in SS2 memset to
    avoid undefined __bzero in memset-sse2-unaligned-erms.
    
    (cherry picked from commit 0fb8800029d230b3711bf722b2a47db92d0e273f)
    (cherry picked from commit a1336230489a2ff4ff3e8da9c96227de69ba19e5)

 sysdeps/x86_64/multiarch/memset-sse2-unaligned-erms.S | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

commit 017bd8baec9bb1f1d9e6bbcdcebaa5f7c50ec6f5
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Sat Feb 5 11:52:33 2022 -0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:01:35 2022 +0200

    x86_64/multiarch: Sort sysdep_routines and put one entry per line
    
    (cherry picked from commit c328d0152d4b14cca58407ec68143894c8863004)
    (cherry picked from commit 18baf86f51dc34bcdd1f4b26018795908dd46477)

 sysdeps/x86_64/multiarch/Makefile | 78 ++++++++++++++++++++++++---------------
 1 file changed, 48 insertions(+), 30 deletions(-)

commit 18bc73cb1fab687bfa6c03f721f5dcef99339c05
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Sat Feb 5 11:06:01 2022 -0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:01:16 2022 +0200

    x86: Improve L to support L(XXX_SYMBOL (YYY, ZZZ))
    
    (cherry picked from commit 1283948f236f209b7d3f44b69a42b96806fa6da0)
    (cherry picked from commit d422197a6974390f7f46ffdd64df72e778bb4ae7)

 sysdeps/x86/sysdep.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

commit b768c278d03536c64a6ea1f9b70bd151b2f7a57e
Author:     Siddhesh Poyarekar <siddhesh@sourceware.org>
AuthorDate: Fri May 13 10:01:47 2022 +0530
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 17 23:00:55 2022 +0200

    fortify: Ensure that __glibc_fortify condition is a constant [BZ #29141]
    
    The fix c8ee1c85 introduced a -1 check for object size without also
    checking that object size is a constant.  Because of this, the tree
    optimizer passes in gcc fail to fold away one of the branches in
    __glibc_fortify and trips on a spurious Wstringop-overflow.  The warning
    itself is incorrect and the branch does go away eventually in DCE in the
    rtl passes in gcc, but the constant check is a helpful hint to simplify
    code early, so add it in.
    
    Resolves: BZ #29141
    Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    (cherry picked from commit 58947e1fa593cff7b5513d5e8e0c81b0131984b4)

 misc/sys/cdefs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit e3b181535d855532ffe20ed0a9c70983909983b9
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Fri Apr 29 17:00:53 2022 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 14 23:33:10 2022 +0200

    dlfcn: Implement the RTLD_DI_PHDR request type for dlinfo
    
    The information is theoretically available via dl_iterate_phdr as
    well, but that approach is very slow if there are many shared
    objects.
    
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    Tested-by: Carlos O'Donell <carlos@rehdat.com>
    (cherry picked from commit d056c212130280c0a54d9a4f72170ec621b70ce5)
    (cherry picked from commit 28ea43f8d64f0dd1f2de75525157730e1532e600)

 dlfcn/Makefile          |   4 ++
 dlfcn/dlfcn.h           |   7 ++-
 dlfcn/dlinfo.c          |  13 ++++-
 dlfcn/tst-dlinfo-phdr.c | 125 ++++++++++++++++++++++++++++++++++++++++++++++++
 manual/dynlink.texi     |  15 ++++--
 5 files changed, 159 insertions(+), 5 deletions(-)

commit 5ef3d4e835615a8dfc2753ae56d9cd3cee65fc8a
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Fri Apr 29 17:00:48 2022 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 14 23:32:53 2022 +0200

    manual: Document the dlinfo function
    
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    Tested-by: Carlos O'Donell <carlos@rehdat.com>
    (cherry picked from commit 93804a1ee084d4bdc620b2b9f91615c7da0fabe1)
    (cherry picked from commit 78f82ab4ef839b52df022234aff63e2d4d7f264f)

 manual/dynlink.texi | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 70 insertions(+), 1 deletion(-)

commit 46f49bad6ea9ed196223354905098eeb55df1ae2
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Fri May 6 11:34:18 2022 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 14 23:32:34 2022 +0200

    NEWS: Add a bug fix entry for BZ #29109
    
    (cherry picked from commit bbb017a2bb2983de297f3d443c59221fbff92e30)

 NEWS | 2 ++
 1 file changed, 2 insertions(+)

commit 3a90182bc0b309cb74a46bb05dfd34ae20321818
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Mon May 2 12:39:43 2022 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 14 23:32:15 2022 +0200

    linux: Fix posix_spawn return code if clone fails (BZ#29109)
    
    The __clone_internal returns the error on errno.
    
    Checked on x86_64-linux-gnu.
    
    (cherry picked from commit 71e2a681f18f617ab962bf8a139bd86d4d440e22)
    (cherry picked from commit 5c0d94d780598a298c9e8685fd811fab9664c368)

 sysdeps/unix/sysv/linux/spawni.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 2de1f231dc066e3a80233aca31697d128169f84d
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Thu Mar 24 15:50:33 2022 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 14 23:31:57 2022 +0200

    x86: Fix fallback for wcsncmp_avx2 in strcmp-avx2.S [BZ #28896]
    
    Overflow case for __wcsncmp_avx2_rtm should be __wcscmp_avx2_rtm not
    __wcscmp_avx2.
    
    commit ddf0992cf57a93200e0c782e2a94d0733a5a0b87
    Author: Noah Goldstein <goldstein.w.n@gmail.com>
    Date:   Sun Jan 9 16:02:21 2022 -0600
    
        x86: Fix __wcsncmp_avx2 in strcmp-avx2.S [BZ# 28755]
    
    Set the wrong fallback function for `__wcsncmp_avx2_rtm`. It was set
    to fallback on to `__wcscmp_avx2` instead of `__wcscmp_avx2_rtm` which
    can cause spurious aborts.
    
    This change will need to be backported.
    
    All string/memory tests pass.
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    
    (cherry picked from commit 9fef7039a7d04947bc89296ee0d187bc8d89b772)
    (cherry picked from commit 059e36d9ed5f5c3c6fc1ab8e12cd0cf226dd3e0a)

 sysdeps/x86/tst-strncmp-rtm.c          | 15 +++++++++++++++
 sysdeps/x86_64/multiarch/strcmp-avx2.S |  2 +-
 2 files changed, 16 insertions(+), 1 deletion(-)

commit 15cbadc47aba7153b1d6b4e35284b5d2cb756781
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Tue Feb 15 20:27:21 2022 -0600
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 14 23:31:37 2022 +0200

    x86: Fix bug in strncmp-evex and strncmp-avx2 [BZ #28895]
    
    Logic can read before the start of `s1` / `s2` if both `s1` and `s2`
    are near the start of a page. To avoid having the result contimated by
    these comparisons the `strcmp` variants would mask off these
    comparisons. This was missing in the `strncmp` variants causing
    the bug. This commit adds the masking to `strncmp` so that out of
    range comparisons don't affect the result.
    
    test-strcmp, test-strncmp, test-wcscmp, and test-wcsncmp all pass as
    well a full xcheck on x86_64 linux.
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    
    (cherry picked from commit e108c02a5e23c8c88ce66d8705d4a24bb6b9a8bf)
    (cherry picked from commit 676f7bcf11ad0bdae098a45fd7d48c1040cde4e1)

 string/test-strncmp.c                  | 20 +++++++++++++++-----
 sysdeps/x86_64/multiarch/strcmp-avx2.S |  1 +
 sysdeps/x86_64/multiarch/strcmp-evex.S |  1 +
 3 files changed, 17 insertions(+), 5 deletions(-)

commit 75aa9f93cd5ce12ffb51aabc6f0ec6576915daba
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Sat Feb 12 00:45:00 2022 -0600
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 14 23:31:21 2022 +0200

    x86: Set .text section in memset-vec-unaligned-erms
    
    commit 3d9f171bfb5325bd5f427e9fc386453358c6e840
    Author: H.J. Lu <hjl.tools@gmail.com>
    Date:   Mon Feb 7 05:55:15 2022 -0800
    
        x86-64: Optimize bzero
    
    Remove setting the .text section for the code. This commit
    adds that back.
    
    (cherry picked from commit 7912236f4a597deb092650ca79f33504ddb4af28)
    (cherry picked from commit c394d7e11a2cc5d99dc1ba3833727c37536d4838)

 sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S | 1 +
 1 file changed, 1 insertion(+)

commit 78b1af2e4decc9053a67c05c2b400f6457fcb360
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Mon Feb 7 05:55:15 2022 -0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 14 23:31:06 2022 +0200

    x86-64: Optimize bzero
    
    memset with zero as the value to set is by far the majority value (99%+
    for Python3 and GCC).
    
    bzero can be slightly more optimized for this case by using a zero-idiom
    xor for broadcasting the set value to a register (vector or GPR).
    
    Co-developed-by: Noah Goldstein <goldstein.w.n@gmail.com>
    (cherry picked from commit 3d9f171bfb5325bd5f427e9fc386453358c6e840)
    (cherry picked from commit de0cd691b2095912f9128fabfb572d835938d655)

 sysdeps/x86_64/memset.S                            |   8 +
 sysdeps/x86_64/multiarch/Makefile                  | 213 +++++++++++++--------
 sysdeps/x86_64/multiarch/bzero.c                   | 106 ++++++++++
 sysdeps/x86_64/multiarch/ifunc-impl-list.c         |  42 ++++
 .../multiarch/memset-avx2-unaligned-erms-rtm.S     |   1 +
 .../x86_64/multiarch/memset-avx2-unaligned-erms.S  |   6 +
 .../multiarch/memset-avx512-unaligned-erms.S       |   3 +
 .../x86_64/multiarch/memset-evex-unaligned-erms.S  |   3 +
 .../x86_64/multiarch/memset-sse2-unaligned-erms.S  |   1 +
 .../x86_64/multiarch/memset-vec-unaligned-erms.S   | 110 ++++++++---
 10 files changed, 384 insertions(+), 109 deletions(-)

commit 3b3a04bc588106ba0ff1ef2056dd43cdfdfa03e9
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Mon Feb 7 00:32:23 2022 -0600
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 14 23:30:49 2022 +0200

    x86: Remove SSSE3 instruction for broadcast in memset.S (SSE2 Only)
    
    commit b62ace2740a106222e124cc86956448fa07abf4d
    Author: Noah Goldstein <goldstein.w.n@gmail.com>
    Date:   Sun Feb 6 00:54:18 2022 -0600
    
        x86: Improve vec generation in memset-vec-unaligned-erms.S
    
    Revert usage of 'pshufb' in broadcast logic as it is an SSSE3
    instruction and memset.S is restricted to only SSE2 instructions.
    
    (cherry picked from commit 1b0c60f95bbe2eded80b2bb5be75c0e45b11cde1)
    (cherry picked from commit 0bf9c8b5feb8c73517ab4dbf47533875021e7c1c)

 sysdeps/x86_64/memset.S | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

commit a585c9f8950039de2232f68c1620a547d6b6feac
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Sun Feb 6 00:54:18 2022 -0600
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 14 23:30:34 2022 +0200

    x86: Improve vec generation in memset-vec-unaligned-erms.S
    
    No bug.
    
    Split vec generation into multiple steps. This allows the
    broadcast in AVX2 to use 'xmm' registers for the L(less_vec)
    case. This saves an expensive lane-cross instruction and removes
    the need for 'vzeroupper'.
    
    For SSE2 replace 2x 'punpck' instructions with zero-idiom 'pxor' for
    byte broadcast.
    
    Results for memset-avx2 small (geomean of N = 20 benchset runs).
    
    size, New Time, Old Time, New / Old
       0,    4.100,    3.831,     0.934
       1,    5.074,    4.399,     0.867
       2,    4.433,    4.411,     0.995
       4,    4.487,    4.415,     0.984
       8,    4.454,    4.396,     0.987
      16,    4.502,    4.443,     0.987
    
    All relevant string/wcsmbs tests are passing.
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    
    (cherry picked from commit b62ace2740a106222e124cc86956448fa07abf4d)
    (cherry picked from commit 58596411ade4cacb76f4144117c40ab28e823b03)

 sysdeps/x86_64/memset.S                            |  21 ++-
 .../x86_64/multiarch/memset-avx2-unaligned-erms.S  |  18 ++-
 .../multiarch/memset-avx512-unaligned-erms.S       |  18 ++-
 .../x86_64/multiarch/memset-evex-unaligned-erms.S  |  18 ++-
 .../x86_64/multiarch/memset-vec-unaligned-erms.S   | 164 +++++++++++++--------
 5 files changed, 152 insertions(+), 87 deletions(-)

commit 2fcc1b6fa95a930cbc63b8bc11cfd08493875e60
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Fri Feb 4 11:11:08 2022 -0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 14 23:30:17 2022 +0200

    x86-64: Fix strcmp-evex.S
    
    Change "movl %edx, %rdx" to "movl %edx, %edx" in:
    
    commit 8418eb3ff4b781d31c4ed5dc6c0bd7356bc45db9
    Author: Noah Goldstein <goldstein.w.n@gmail.com>
    Date:   Mon Jan 10 15:35:39 2022 -0600
    
        x86: Optimize strcmp-evex.S
    
    (cherry picked from commit 0e0199a9e02ebe42e2b36958964d63f03573c382)
    (cherry picked from commit 36766c02afa5255fbd8676e5d25eaa9ca07141de)

 sysdeps/x86_64/multiarch/strcmp-evex.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 8aeb31068314158eb76a098d7ce8a0b59d995ff2
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Fri Feb 4 11:09:10 2022 -0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 14 23:30:01 2022 +0200

    x86-64: Fix strcmp-avx2.S
    
    Change "movl %edx, %rdx" to "movl %edx, %edx" in:
    
    commit b77b06e0e296f1a2276c27a67e1d44f2cfa38d45
    Author: Noah Goldstein <goldstein.w.n@gmail.com>
    Date:   Mon Jan 10 15:35:38 2022 -0600
    
        x86: Optimize strcmp-avx2.S
    
    (cherry picked from commit c15efd011cea3d8f0494269eb539583215a1feed)
    (cherry picked from commit 250e277797b8e368ce55e0101c76864f52d2b29e)

 sysdeps/x86_64/multiarch/strcmp-avx2.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 59650bdf19c352e33764277a746337267c68a382
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Mon Jan 10 15:35:39 2022 -0600
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 14 23:29:44 2022 +0200

    x86: Optimize strcmp-evex.S
    
    Optimization are primarily to the loop logic and how the page cross
    logic interacts with the loop.
    
    The page cross logic is at times more expensive for short strings near
    the end of a page but not crossing the page. This is done to retest
    the page cross conditions with a non-faulty check and to improve the
    logic for entering the loop afterwards. This is only particular cases,
    however, and is general made up for by more than 10x improvements on
    the transition from the page cross -> loop case.
    
    The non-page cross cases as well are nearly universally improved.
    
    test-strcmp, test-strncmp, test-wcscmp, and test-wcsncmp all pass.
    
    Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
    (cherry picked from commit 8418eb3ff4b781d31c4ed5dc6c0bd7356bc45db9)
    (cherry picked from commit 34ef8109458ff5d7263892f330cc06ad3e19d6a7)

 sysdeps/x86_64/multiarch/strcmp-evex.S | 1712 +++++++++++++++++---------------
 1 file changed, 919 insertions(+), 793 deletions(-)

commit f7f842a91e86f16fc263a70111a0f0e4a937f990
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Mon Jan 10 15:35:38 2022 -0600
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 14 23:29:26 2022 +0200

    x86: Optimize strcmp-avx2.S
    
    Optimization are primarily to the loop logic and how the page cross
    logic interacts with the loop.
    
    The page cross logic is at times more expensive for short strings near
    the end of a page but not crossing the page. This is done to retest
    the page cross conditions with a non-faulty check and to improve the
    logic for entering the loop afterwards. This is only particular cases,
    however, and is general made up for by more than 10x improvements on
    the transition from the page cross -> loop case.
    
    The non-page cross cases are improved most for smaller sizes [0, 128]
    and go about even for (128, 4096]. The loop page cross logic is
    improved so some more significant speedup is seen there as well.
    
    test-strcmp, test-strncmp, test-wcscmp, and test-wcsncmp all pass.
    
    Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
    (cherry picked from commit b77b06e0e296f1a2276c27a67e1d44f2cfa38d45)
    (cherry picked from commit b68e782f8e16fc3f45ab967c291cfb9628e59f6e)

 sysdeps/x86_64/multiarch/strcmp-avx2.S | 1592 +++++++++++++++++++-------------
 1 file changed, 940 insertions(+), 652 deletions(-)

commit 911d1207ebc36f31540f6765da2c347f453bfe2c
Author:     Siddhesh Poyarekar <siddhesh@sourceware.org>
AuthorDate: Wed May 4 15:56:47 2022 +0530
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 14 23:29:08 2022 +0200

    manual: Clarify that abbreviations of long options are allowed
    
    The man page and code comments clearly state that abbreviations of long
    option names are recognized correctly as long as they are unique.
    Document this fact in the glibc manual as well.
    
    Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    Reviewed-by: Florian Weimer <fweimer@redhat.com>
    Reviewed-by: Andreas Schwab <schwab@linux-m68k.org>
    (cherry picked from commit db1efe02c9f15affc3908d6ae73875b82898a489)
    (cherry picked from commit ec5b79aac7688bb1ff807376acfcc9b9afd4dcbf)

 manual/getopt.texi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

commit fb25ccfde8ff4978914655990f424511d204cc00
Author:     Joseph Myers <joseph@codesourcery.com>
AuthorDate: Mon Mar 28 13:16:48 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 14 23:28:51 2022 +0200

    Add HWCAP2_AFP, HWCAP2_RPRES from Linux 5.17 to AArch64 bits/hwcap.h
    
    Add the new HWCAP2_AFP and HWCAP2_RPRES constants from Linux 5.17.
    Tested with build-many-glibcs.py for aarch64-linux-gnu.
    
    (cherry picked from commit 866c599182e87f116440b5d854f9e99533c48eb3)
    (cherry picked from commit 0bcba53020b8f4363acefb1697cf6f026cbaa170)

 sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h | 2 ++
 1 file changed, 2 insertions(+)

commit 8932f83a28af908a5e2839296269377ec2c9e055
Author:     Joseph Myers <joseph@codesourcery.com>
AuthorDate: Mon Feb 21 22:49:36 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 14 23:28:35 2022 +0200

    Add SOL_MPTCP, SOL_MCTP from Linux 5.16 to bits/socket.h
    
    Linux 5.16 adds constants SOL_MPTCP and SOL_MCTP to the getsockopt /
    setsockopt levels; add these constants to bits/socket.h.
    
    Tested for x86_64.
    
    (cherry picked from commit fdc1ae67fef27eea1445bab4bdfe2f0fb3bc7aa1)
    (cherry picked from commit 95759abbf3c33e66e1e2663f80406eae3dd66587)

 sysdeps/unix/sysv/linux/bits/socket.h | 2 ++
 1 file changed, 2 insertions(+)

commit cffe259f04d0b8399797c2c0f162702dd2b2c880
Author:     Joseph Myers <joseph@codesourcery.com>
AuthorDate: Thu Mar 24 15:35:27 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 14 23:28:19 2022 +0200

    Update kernel version to 5.17 in tst-mman-consts.py
    
    This patch updates the kernel version in the test tst-mman-consts.py
    to 5.17.  (There are no new MAP_* constants covered by this test in
    5.17 that need any other header changes.)
    
    Tested with build-many-glibcs.py.
    
    (cherry picked from commit 23808a422e6036accaba7236fd3b9a0d7ab7e8ee)
    (cherry picked from commit eed29011f9b29317a4025b2a6e04a531663a1023)

 sysdeps/unix/sysv/linux/tst-mman-consts.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 9e2ea606828ea6a9bc1378bf00ad8bc768111df3
Author:     Joseph Myers <joseph@codesourcery.com>
AuthorDate: Wed Feb 16 14:19:24 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 14 23:28:04 2022 +0200

    Update kernel version to 5.16 in tst-mman-consts.py
    
    This patch updates the kernel version in the test tst-mman-consts.py
    to 5.16.  (There are no new MAP_* constants covered by this test in
    5.16 that need any other header changes.)
    
    Tested with build-many-glibcs.py.
    
    (cherry picked from commit 790a607e234aa10d4b977a1b80aebe8a2acac970)
    (cherry picked from commit e72c363a15402ea2714d3519f2e126a416d1123b)

 sysdeps/unix/sysv/linux/tst-mman-consts.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit f20c7b2543a467912d45ae06a5f8684b2bca2f52
Author:     Joseph Myers <joseph@codesourcery.com>
AuthorDate: Wed Mar 23 17:11:56 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 14 23:27:50 2022 +0200

    Update syscall lists for Linux 5.17
    
    Linux 5.17 has one new syscall, set_mempolicy_home_node.  Update
    syscall-names.list and regenerate the arch-syscall.h headers with
    build-many-glibcs.py update-syscalls.
    
    Tested with build-many-glibcs.py.
    
    (cherry picked from commit 8ef9196b26793830515402ea95aca2629f7721ec)
    (cherry picked from commit edc06fdd62331d400553675b79c30ce77bef4357)

 sysdeps/unix/sysv/linux/aarch64/arch-syscall.h           | 1 +
 sysdeps/unix/sysv/linux/alpha/arch-syscall.h             | 1 +
 sysdeps/unix/sysv/linux/arc/arch-syscall.h               | 1 +
 sysdeps/unix/sysv/linux/arm/arch-syscall.h               | 1 +
 sysdeps/unix/sysv/linux/csky/arch-syscall.h              | 1 +
 sysdeps/unix/sysv/linux/hppa/arch-syscall.h              | 1 +
 sysdeps/unix/sysv/linux/i386/arch-syscall.h              | 1 +
 sysdeps/unix/sysv/linux/ia64/arch-syscall.h              | 1 +
 sysdeps/unix/sysv/linux/m68k/arch-syscall.h              | 1 +
 sysdeps/unix/sysv/linux/microblaze/arch-syscall.h        | 1 +
 sysdeps/unix/sysv/linux/mips/mips32/arch-syscall.h       | 1 +
 sysdeps/unix/sysv/linux/mips/mips64/n32/arch-syscall.h   | 1 +
 sysdeps/unix/sysv/linux/mips/mips64/n64/arch-syscall.h   | 1 +
 sysdeps/unix/sysv/linux/nios2/arch-syscall.h             | 1 +
 sysdeps/unix/sysv/linux/or1k/arch-syscall.h              | 1 +
 sysdeps/unix/sysv/linux/powerpc/powerpc32/arch-syscall.h | 1 +
 sysdeps/unix/sysv/linux/powerpc/powerpc64/arch-syscall.h | 1 +
 sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h        | 1 +
 sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h        | 1 +
 sysdeps/unix/sysv/linux/s390/s390-32/arch-syscall.h      | 1 +
 sysdeps/unix/sysv/linux/s390/s390-64/arch-syscall.h      | 1 +
 sysdeps/unix/sysv/linux/sh/arch-syscall.h                | 1 +
 sysdeps/unix/sysv/linux/sparc/sparc32/arch-syscall.h     | 1 +
 sysdeps/unix/sysv/linux/sparc/sparc64/arch-syscall.h     | 1 +
 sysdeps/unix/sysv/linux/syscall-names.list               | 5 +++--
 sysdeps/unix/sysv/linux/x86_64/64/arch-syscall.h         | 1 +
 sysdeps/unix/sysv/linux/x86_64/x32/arch-syscall.h        | 1 +
 27 files changed, 29 insertions(+), 2 deletions(-)

commit 2b7525170f9f4d481e69bee9b6f989c41eadbef4
Author:     DJ Delorie <dj@redhat.com>
AuthorDate: Wed Mar 30 17:44:02 2022 -0400
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 14 23:27:32 2022 +0200

    posix/glob.c: update from gnulib
    
    Copied from gnulib/lib/glob.c in order to fix rhbz 1982608
    Also fixes swbz 25659
    
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    Tested-by: Carlos O'Donell <carlos@redhat.com>
    (cherry picked from commit 7c477b57a31487eda516db02b9e04f22d1a6e6af)
    (cherry picked from commit dde291ab531010d604e8cda4483a2e94fc5d606d)

 posix/glob.c                            | 70 +++++++++++++++++++++++++++------
 sysdeps/unix/sysv/linux/glob64-time64.c |  1 +
 2 files changed, 59 insertions(+), 12 deletions(-)

commit fa40b9c8102fb6fc26d98c226f45d55fcae43393
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Wed Apr 27 13:40:30 2022 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 14 23:27:17 2022 +0200

    linux: Fix fchmodat with AT_SYMLINK_NOFOLLOW for 64 bit time_t (BZ#29097)
    
    The AT_SYMLINK_NOFOLLOW emulation ues the default 32 bit stat internal
    calls, which fails with EOVERFLOW if the file constains timestamps
    beyond 2038.
    
    Checked on i686-linux-gnu.
    
    (cherry picked from commit 118a2aee07f64d605b6668cbe195c1f44eac6be6)
    (cherry picked from commit 7d96aa2d7dba5a7d9c80334f1860445bd76fdc7b)

 NEWS                               |  2 ++
 io/Makefile                        |  8 +++++---
 io/tst-lchmod-time64.c             |  2 ++
 io/tst-lchmod.c                    | 22 +++++++++++++++++++++-
 sysdeps/unix/sysv/linux/fchmodat.c |  4 ++--
 5 files changed, 32 insertions(+), 6 deletions(-)

commit 1b652401ab217cb729a26bc6475cd0dd003d6acf
Author:     Carlos O'Donell <carlos@redhat.com>
AuthorDate: Tue Apr 26 10:52:41 2022 -0400
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 14 23:27:02 2022 +0200

    i386: Regenerate ulps
    
    These failures were caught while building glibc master for Fedora
    Rawhide which is built with '-mtune=generic -msse2 -mfpmath=sse'
    using gcc 11.3 (gcc-11.3.1-2.fc35) on a Cascadelake Intel Xeon
    processor.
    
    (cherry picked from commit e465d97653311c3687aee49de782177353acfe86)
    (cherry picked from commit 14b1e32a4d366efacd6c54e7be8c2bfcc088dd6f)

 sysdeps/i386/fpu/libm-test-ulps                | 2 +-
 sysdeps/i386/i686/fpu/multiarch/libm-test-ulps | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

commit fb4014e53447c373eda0122429d7250f04117003
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Wed Apr 27 13:59:26 2022 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 14 23:26:47 2022 +0200

    linux: Fix missing internal 64 bit time_t stat usage
    
    These are two missing spots initially done by 52a5fe70a2c77935.
    
    Checked on i686-linux-gnu.
    
    (cherry picked from commit 834ddd0432f68d6dc85b6aac95065721af0d86e9)
    (cherry picked from commit ef875993483a1fa5253f98f8341f717ea5e53f53)

 sysdeps/unix/sysv/linux/faccessat.c | 4 ++--
 sysdeps/unix/sysv/linux/pathconf.c  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

commit 0c980aaba9e35716ba3a76f90efb34c6cfb5ec3f
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Tue Feb 8 15:22:49 2022 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 14 23:26:31 2022 +0200

    elf: Fix DFS sorting algorithm for LD_TRACE_LOADED_OBJECTS with missing libraries (BZ #28868)
    
    On _dl_map_object the underlying file is not opened in trace mode
    (in other cases where the underlying file can't be opened,
    _dl_map_object  quits with an error).  If there any missing libraries
    being processed, they will not be considered on final nlist size
    passed on _dl_sort_maps later in the function.  And it is then used by
    _dl_sort_maps_dfs on the stack allocated working maps:
    
    222   /* Array to hold RPO sorting results, before we copy back to  maps[].  */
    223   struct link_map *rpo[nmaps];
    224
    225   /* The 'head' position during each DFS iteration. Note that we start at
    226      one past the last element due to first-decrement-then-store (see the
    227      bottom of above dfs_traversal() routine).  */
    228   struct link_map **rpo_head = &rpo[nmaps];
    
    However while transversing the 'l_initfini' on dfs_traversal it will
    still consider the l_faked maps and thus update rpo more times than the
    allocated working 'rpo', overflowing the stack object.
    
    As suggested in bugzilla, one option would be to avoid sorting the maps
    for trace mode.  However I think ignoring l_faked object does make
    sense (there is one less constraint to call the sorting function), it
    allows a slight less stack usage for trace, and it is slight simpler
    solution.
    
    The tests does trigger the stack overflow, however I tried to make
    it more generic to check different scenarios or missing objects.
    
    Checked on x86_64-linux-gnu.
    
    Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    (cherry picked from commit 3a0588ae48fb35384a6bd33f9b66403badfa1262)
    (cherry picked from commit 10fe3cd309b32c003a6b98e08928e7d6007caecf)

 NEWS                    |   2 +
 elf/Makefile            |  54 ++++++++++++++++++++++++
 elf/dl-deps.c           |   2 +
 elf/dl-sort-maps.c      |   4 +-
 elf/libtracemod1-1.c    |   1 +
 elf/libtracemod2-1.c    |   1 +
 elf/libtracemod3-1.c    |   1 +
 elf/libtracemod4-1.c    |   1 +
 elf/libtracemod5-1.c    |   1 +
 elf/tst-trace1.exp      |   4 ++
 elf/tst-trace2.exp      |   6 +++
 elf/tst-trace3.exp      |   6 +++
 elf/tst-trace4.exp      |   6 +++
 elf/tst-trace5.exp      |   6 +++
 scripts/tst-ld-trace.py | 108 ++++++++++++++++++++++++++++++++++++++++++++++++
 15 files changed, 202 insertions(+), 1 deletion(-)

commit 14e50e08c0c60f4b7554bd0042a58573d2104641
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Fri Apr 22 19:34:52 2022 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 14 23:26:12 2022 +0200

    scripts/glibcelf.py: Mark as UNSUPPORTED on Python 3.5 and earlier
    
    enum.IntFlag and enum.EnumMeta._missing_ support are not part of
    earlier Python versions.
    
    (cherry picked from commit b571f3adffdcbed23f35ea39b0ca43809dbb4f5b)
    (cherry picked from commit cb4d670d8f0f6ef4725094ea18a62729d852ce67)

 scripts/glibcelf.py | 6 ++++++
 1 file changed, 6 insertions(+)

commit a757db6ab3a75d2072e906e301b7dc06e3175576
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Tue Apr 26 14:23:02 2022 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 14 23:25:54 2022 +0200

    dlfcn: Do not use rtld_active () to determine ld.so state (bug 29078)
    
    When audit modules are loaded, ld.so initialization is not yet
    complete, and rtld_active () returns false even though ld.so is
    mostly working.  Instead, the static dlopen hook is used, but that
    does not work at all because this is not a static dlopen situation.
    
    Commit 466c1ea15f461edb8e3ffaf5d86d708876343bbf ("dlfcn: Rework
    static dlopen hooks") moved the hook pointer into _rtld_global_ro,
    which means that separate protection is not needed anymore and the
    hook pointer can be checked directly.
    
    The guard for disabling libio vtable hardening in _IO_vtable_check
    should stay for now.
    
    Fixes commit 8e1472d2c1e25e6eabc2059170731365f6d5b3d1 ("ld.so:
    Examine GLRO to detect inactive loader [BZ #20204]").
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit 8dcb6d0af07fda3607b541857e4f3970a74ed55b)
    (cherry picked from commit 106b7e0e45b258672a9c6f0e1de96baeb17a513f)

 NEWS                 |   1 +
 dlfcn/dladdr.c       |   2 +-
 dlfcn/dladdr1.c      |   2 +-
 dlfcn/dlclose.c      |   2 +-
 dlfcn/dlerror.c      |   2 +-
 dlfcn/dlinfo.c       |   2 +-
 dlfcn/dlmopen.c      |   2 +-
 dlfcn/dlopen.c       |   2 +-
 dlfcn/dlopenold.c    |   2 +-
 dlfcn/dlsym.c        |   2 +-
 dlfcn/dlvsym.c       |   2 +-
 elf/Makefile         |   6 +++
 elf/dl-libc.c        |   8 ++--
 elf/tst-audit26.c    |  35 +++++++++++++++++
 elf/tst-auditmod26.c | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++
 15 files changed, 160 insertions(+), 14 deletions(-)

commit b4b62c0c1f3f460a58ed7f4e46f14a33c49f52ae
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Tue Apr 26 14:22:10 2022 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 14 23:25:31 2022 +0200

    INSTALL: Rephrase -with-default-link documentation
    
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    (cherry picked from commit c935789bdf40ba22b5698da869d3a4789797e09f)
    (cherry picked from commit e5cf8ccca655c0eb831574785a6087f3950852eb)

 INSTALL             |  8 ++++----
 manual/install.texi | 10 +++++-----
 2 files changed, 9 insertions(+), 9 deletions(-)

commit 2571bcf3cbeec84fc79f3f9e4ca761d915de7538
Author:     Joan Bruguera <joanbrugueram@gmail.com>
AuthorDate: Mon Apr 11 19:49:56 2022 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 14 23:25:16 2022 +0200

    misc: Fix rare fortify crash on wchar funcs. [BZ 29030]
    
    If `__glibc_objsize (__o) == (size_t) -1` (i.e. `__o` is unknown size), fortify
    checks should pass, and `__whatever_alias` should be called.
    
    Previously, `__glibc_objsize (__o) == (size_t) -1` was explicitly checked, but
    on commit a643f60c53876b, this was moved into `__glibc_safe_or_unknown_len`.
    
    A comment says the -1 case should work as: "The -1 check is redundant because
    since it implies that __glibc_safe_len_cond is true.". But this fails when:
    * `__s > 1`
    * `__osz == -1` (i.e. unknown size at compile time)
    * `__l` is big enough
    * `__l * __s <= __osz` can be folded to a constant
    (I only found this to be true for `mbsrtowcs` and other functions in wchar2.h)
    
    In this case `__l * __s <= __osz` is false, and `__whatever_chk_warn` will be
    called by `__glibc_fortify` or `__glibc_fortify_n` and crash the program.
    
    This commit adds the explicit `__osz == -1` check again.
    moc crashes on startup due to this, see: https://bugs.archlinux.org/task/74041
    
    Minimal test case (test.c):
        #include <wchar.h>
    
        int main (void)
        {
            const char *hw = "HelloWorld";
            mbsrtowcs (NULL, &hw, (size_t)-1, NULL);
            return 0;
        }
    
    Build with:
        gcc -O2 -Wp,-D_FORTIFY_SOURCE=2 test.c -o test && ./test
    
    Output:
        *** buffer overflow detected ***: terminated
    
    Fixes: BZ #29030
    Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
    Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    (cherry picked from commit 33e03f9cd2be4f2cd62f93fda539cc07d9c8130e)
    (cherry picked from commit c8ee1c85c07b3c9eaef46355cb1095300855e8fa)

 debug/tst-fortify.c |  5 +++++
 misc/sys/cdefs.h    | 12 ++++++------
 2 files changed, 11 insertions(+), 6 deletions(-)

commit 4630bcf573932ed8d1d51d57426fb25710ab660a
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Mon Apr 11 11:30:31 2022 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 14 23:24:56 2022 +0200

    Default to --with-default-link=no (bug 25812)
    
    This is necessary to place the libio vtables into the RELRO segment.
    New tests elf/tst-relro-ldso and elf/tst-relro-libc are added to
    verify that this is what actually happens.
    
    The new tests fail on ia64 due to lack of (default) RELRO support
    inbutils, so they are XFAILed there.
    
    (cherry picked from commit 198abcbb94618730dae1b3f4393efaa49e0ec8c7)
    (cherry picked from commit 499a60179657d2945c6ad01bdac90e8427a6310e)

 INSTALL                               |   6 ++
 NEWS                                  |   1 +
 configure                             |  65 +---------------
 configure.ac                          |  55 +-------------
 elf/Makefile                          |  33 ++++++++
 elf/tst-relro-symbols.py              | 137 ++++++++++++++++++++++++++++++++++
 manual/install.texi                   |   6 ++
 sysdeps/unix/sysv/linux/ia64/Makefile |   6 ++
 8 files changed, 191 insertions(+), 118 deletions(-)

commit 92b30fe9e9434ffba9ffe78c67c500bb08b67b75
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Mon Apr 11 11:28:08 2022 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 14 23:24:35 2022 +0200

    scripts: Add glibcelf.py module
    
    Hopefully, this will lead to tests that are easier to maintain.  The
    current approach of parsing readelf -W output using regular expressions
    is not necessarily easier than parsing the ELF data directly.
    
    This module is still somewhat incomplete (e.g., coverage of relocation
    types and versioning information is missing), but it is sufficient to
    perform basic symbol analysis or program header analysis.
    
    The EM_* mapping for architecture-specific constant classes (e.g.,
    SttX86_64) is not yet implemented.  The classes are defined for the
    benefit of elf/tst-glibcelf.py.
    
    Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    (cherry picked from commit 30035d67728a846fa39749cd162afd278ac654c4)
    (cherry picked from commit 70f1eecdc12dbfc742f29844be215eacf51c5014)

 elf/Makefile        |    7 +
 elf/tst-glibcelf.py |  260 ++++++++++++
 scripts/glibcelf.py | 1135 +++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 1402 insertions(+)

commit 837b4e3a243414e31c681a39531cc2085d87a74d
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Wed Apr 20 12:01:43 2022 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 14 23:23:42 2022 +0200

    nptl: Fix pthread_cancel cancelhandling atomic operations
    
    The 404656009b reversion did not setup the atomic loop to set the
    cancel bits correctly.  The fix is essentially what pthread_cancel
    did prior 26cfbb7162ad.
    
    Checked on x86_64-linux-gnu and aarch64-linux-gnu.
    
    (cherry picked from commit 62be9681677e7ce820db721c126909979382d379)
    (cherry picked from commit 68d3a9a69696b46f2e552330dd0de5512c36302d)

 nptl/pthread_cancel.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

commit ecbe0602fba2c359946084f0f8dae677a7dc0aad (tag: gentoo/glibc-2.35-6)
Author:     Fangrui Song <maskray@google.com>
AuthorDate: Wed Apr 20 10:24:15 2022 -0700
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Apr 20 23:37:32 2022 +0200

    m68k: Handle fewer relocations for RTLD_BOOTSTRAP (#BZ29071)
    
    m68k is a non-PI_STATIC_AND_HIDDEN arch which uses a GOT relocation when
    loading the address of a jump table. The GOT load may be reordered
    before processing R_68K_RELATIVE relocations, leading to an
    unrelocated/incorrect jump table, which will cause a crash.
    
    The foolproof approach is to add an optimization barrier (e.g. calling
    an non-inlinable function after relative relocations are resolved). That
    is non-trivial given the current code structure, so just use the simple
    approach to avoid the jump table: handle only the essential reloctions
    for RTLD_BOOTSTRAP code.
    
    This is based on Andreas Schwab's patch and fixed ld.so crash on m68k.
    
    Reviewed-by: Adheemrval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit a8e9b5b8079d18116ca69c9797e77804ecf2ee7e)

 sysdeps/m68k/dl-machine.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

commit 284836ea26f90941551cabbb8d6286cf1d06bd09
Author:     =Joshua Kinard <kumba@gentoo.org>
AuthorDate: Mon Apr 18 09:55:08 2022 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Apr 18 19:12:39 2022 +0200

    mips: Fix mips64n32 64 bit time_t stat support (BZ#29069)
    
    Add missing support initially added by 4e8521333bea6e89fcef1020
    (which missed n32 stat).
    
    (cherry picked from commit 78fb88827362fbd2cc8aa32892ae5b015106e25c)
    (cherry picked from commit 8e8d46d59809824054dde501b0ba0e331a747078)

 NEWS                                            |  2 ++
 sysdeps/unix/sysv/linux/mips/bits/struct_stat.h | 38 +++++++++++++++----------
 2 files changed, 25 insertions(+), 15 deletions(-)

commit 2c34b2dfa242629b8c7174dab4a6af3b84faab22
Author:     Samuel Thibault <samuel.thibault@ens-lyon.org>
AuthorDate: Tue Apr 12 22:14:34 2022 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Apr 18 19:12:20 2022 +0200

    hurd: Fix arbitrary error code
    
    ELIBBAD is Linux-specific.
    
    (cherry picked from commit 67ab66541dc1164540abda284645e38be90b5119)
    (cherry picked from commit bd415684df590b14d4970acc93ad28719fffe4c1)

 nss/nss_test_errno.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit e54a0543278b7ca411f0e149ffb3305f641335e4
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Wed Apr 6 12:24:42 2022 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Apr 18 19:12:03 2022 +0200

    nptl: Handle spurious EINTR when thread cancellation is disabled (BZ#29029)
    
    Some Linux interfaces never restart after being interrupted by a signal
    handler, regardless of the use of SA_RESTART [1].  It means that for
    pthread cancellation, if the target thread disables cancellation with
    pthread_setcancelstate and calls such interfaces (like poll or select),
    it should not see spurious EINTR failures due the internal SIGCANCEL.
    
    However recent changes made pthread_cancel to always sent the internal
    signal, regardless of the target thread cancellation status or type.
    To fix it, the previous semantic is restored, where the cancel signal
    is only sent if the target thread has cancelation enabled in
    asynchronous mode.
    
    The cancel state and cancel type is moved back to cancelhandling
    and atomic operation are used to synchronize between threads.  The
    patch essentially revert the following commits:
    
      8c1c0aae20 nptl: Move cancel type out of cancelhandling
      2b51742531 nptl: Move cancel state out of cancelhandling
      26cfbb7162 nptl: Remove CANCELING_BITMASK
    
    However I changed the atomic operation to follow the internal C11
    semantic and removed the MACRO usage, it simplifies a bit the
    resulting code (and removes another usage of the old atomic macros).
    
    Checked on x86_64-linux-gnu, i686-linux-gnu, aarch64-linux-gnu,
    and powerpc64-linux-gnu.
    
    [1] https://man7.org/linux/man-pages/man7/signal.7.html
    
    Reviewed-by: Florian Weimer <fweimer@redhat.com>
    Tested-by: Aurelien Jarno <aurelien@aurel32.net>
    
    (cherry-picked from commit 404656009b459658138ed1bd18f3c6cf3863e6a6)
    
    (cherry picked from commit ba9c42ac0e265bf1e4ec1075fa20e7166fda8bfc)

 NEWS                           |   2 +
 manual/process.texi            |   3 +-
 nptl/allocatestack.c           |   2 -
 nptl/cancellation.c            |  50 +++++++---
 nptl/cleanup_defer.c           |  42 +++++++--
 nptl/descr.h                   |  41 +++++---
 nptl/libc-cleanup.c            |  39 +++++++-
 nptl/pthread_cancel.c          | 110 ++++++++++++++++------
 nptl/pthread_join_common.c     |   7 +-
 nptl/pthread_setcancelstate.c  |  26 +++++-
 nptl/pthread_setcanceltype.c   |  31 +++++-
 nptl/pthread_testcancel.c      |   9 +-
 sysdeps/nptl/dl-tls_init_tp.c  |   3 -
 sysdeps/nptl/pthreadP.h        |   2 +-
 sysdeps/pthread/Makefile       |   1 +
 sysdeps/pthread/tst-cancel29.c | 207 +++++++++++++++++++++++++++++++++++++++++
 16 files changed, 484 insertions(+), 91 deletions(-)

commit a2b2c202b954e65e8b289408609c93d83cfc3ee3
Author:     Stefan Liebler <stli@linux.ibm.com>
AuthorDate: Wed Apr 13 14:36:09 2022 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Apr 18 19:11:42 2022 +0200

    S390: Add new s390 platform z16.
    
    The new IBM z16 is added to platform string array.
    The macro _DL_PLATFORMS_COUNT is incremented.
    
    _dl_hwcaps_subdir is extended by "z16" if HWCAP_S390_VXRS_PDE2
    is set. HWCAP_S390_NNPA is not tested in _dl_hwcaps_subdirs_active
    as those instructions may be replaced or removed in future.
    
    tst-glibc-hwcaps.c is extended in order to test z16 via new marker5.
    
    A fatal glibc error is dumped if glibc was build with architecture
    level set for z16, but run on an older machine. (See dl-hwcap-check.h)
    
    (cherry picked from commit 2376944b9e5c0364b9fb473e4d8dabca31b57167)
    (cherry picked from commit 6583d534458e7f8beec8d0766b6db0bdaae6749c)

 elf/Makefile                             |  8 ++++++++
 elf/tst-glibc-hwcaps-cache.script        |  6 ++++++
 sysdeps/s390/dl-procinfo.c               |  5 +++--
 sysdeps/s390/dl-procinfo.h               |  2 +-
 sysdeps/s390/s390-64/Makefile            | 25 +++++++++++++++++++++++--
 sysdeps/s390/s390-64/dl-hwcap-check.h    |  6 +++++-
 sysdeps/s390/s390-64/dl-hwcaps-subdirs.c | 11 +++++++++--
 sysdeps/s390/s390-64/tst-glibc-hwcaps.c  |  8 ++++++--
 8 files changed, 61 insertions(+), 10 deletions(-)

commit 1a1f95f166f0d8edd26251a30fbc2c1768afd36b
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Wed Apr 13 14:18:28 2022 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Apr 18 19:11:18 2022 +0200

    elf: Fix memory leak in _dl_find_object_update (bug 29062)
    
    The count can be zero if an object has already been loaded as
    an indirect dependency (so that l_searchlist.r_list in its link
    map is still NULL) is promoted to global scope via RTLD_GLOBAL.
    
    Fixes commit 5d28a8962dc ("elf: Add _dl_find_object function").
    
    (cherry picked from commit 4a41fc3cd9cea9223ea4f13f9c766a1e149a0ccc)
    (cherry picked from commit cc9a4a664faac44fe62b6300b878cf5be514658b)

 NEWS                 | 1 +
 elf/dl-find_object.c | 5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

commit 75eb0d9dacbd878059b2d54c9ddadd6f0f887c2b
Author:     Carlos O'Donell <carlos@redhat.com>
AuthorDate: Tue Apr 12 13:26:10 2022 -0400
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Apr 18 19:10:51 2022 +0200

    NEWS: Move PLT tracking slowdown to glibc 2.35.
    
    In commit 063f9ba220f434c7f30dd65c4cff17c0c458a7cf the NEWS section
    was accidentally added to the glibc 2.34 NEWS section. The NEWS entry
    should have been added to glibc 2.35 which contained the committed
    fix. This moves the NEWS entry to correct section.
    
    (cherry picked from commit 2fe48f52833cf698374a9e607e447edec892e5c9)
    (cherry picked from commit db03235895150a91fb5bd84dd3f49b4d8ec8bc72)

 NEWS | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

commit de4b8a6e635cdfb2c9893b86bc7c395e39b2d662 (tag: gentoo/glibc-2.35-5)
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: Thu Mar 31 01:01:41 2022 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Mar 31 01:01:41 2022 +0200

    Revert "Revert "clone-internal.c: make clone3 syscall optional""
    
    Was still needed after all, for zoom of all things...
    
    This reverts commit 6fc74e0bcd0104bf39e599075d729c9d7dd07104.

 sysdeps/unix/sysv/linux/clone-internal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 6fc74e0bcd0104bf39e599075d729c9d7dd07104 (tag: gentoo/glibc-2.35-4)
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: Sun Mar 20 23:54:51 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 20 23:54:51 2022 +0100

    Revert "clone-internal.c: make clone3 syscall optional"
    
    This reverts commit 06b01dfa4e29b5a6838dd9050f3e9418c5dc77f5.

 sysdeps/unix/sysv/linux/clone-internal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit f64954807b2a32410182ac0cae77768c8da71a3c
Author:     John David Anglin <danglin@gcc.gnu.org>
AuthorDate: Tue Mar 15 23:04:39 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 20 23:53:52 2022 +0100

    hppa: Use END instead of PSEUDO_END in swapcontext.S
    
    (cherry picked from commit 7a5c440102d4ec7fafd9bbd98eca9bd90ecaaafd)
    (cherry picked from commit 9be62976af04f4166a2c1cc5a842ef07bf223860)

 sysdeps/unix/sysv/linux/hppa/swapcontext.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 5061fd34c9f08c6fdbcc4b9f6eb44addd9bd19c5
Author:     John David Anglin <danglin@gcc.gnu.org>
AuthorDate: Tue Mar 15 15:12:03 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 20 23:53:27 2022 +0100

    hppa: Implement swapcontext in assembler (bug 28960)
    
    When swapcontext.c is compiled without -g, the following error occurs:
    Error: CFI instruction used without previous .cfi_startproc
    
    Fix by converting swapcontext routine to assembler.
    
    (cherry picked from commit d05e6dc8d1032e1732542a48e0fb895432008b6e)
    (cherry picked from commit 01d5214bb44990323fa8474b7e4119949ac9733f)

 sysdeps/unix/sysv/linux/hppa/swapcontext.S | 72 ++++++++++++++++++++++++++
 sysdeps/unix/sysv/linux/hppa/swapcontext.c | 82 ------------------------------
 2 files changed, 72 insertions(+), 82 deletions(-)

commit 304c8d3e16fd7af17e7a1e05f4f2a04c72e0db1b
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Fri Mar 11 08:23:56 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 20 23:53:10 2022 +0100

    nss: Protect against errno changes in function lookup (bug 28953)
    
    dlopen may clobber errno.  The nss_test_errno module uses an ELF
    constructor to achieve that, but there could be internal errors
    during dlopen that cause this, too.  Therefore, the NSS framework
    has to guard against such errno clobbers.
    
    __nss_module_get_function is currently the only function that calls
    __nss_module_load, so it is sufficient to save and restore errno
    around this call.
    
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    (cherry picked from commit 9bdf92c79d63b42f931101bb6df87129c408b0c4)
    (cherry picked from commit 123bd1ec66d2d7ea4683e9563bd94adc67f41544)

 NEWS                     |  1 +
 nss/Makefile             | 15 +++++++++---
 nss/nss_module.c         | 12 +++++++++-
 nss/nss_test_errno.c     | 58 +++++++++++++++++++++++++++++++++++++++++++++
 nss/tst-nss-test_errno.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 143 insertions(+), 4 deletions(-)

commit 638eecd0b62cf1b7902f21417a6bfae9e503fe0b
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Fri Mar 11 08:23:56 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 20 23:52:42 2022 +0100

    nss: Do not mention NSS test modules in <gnu/lib-names.h>
    
    They are not actually installed.  Use the nss_files version instead
    in nss/Makefile, similar to how __nss_shlib_revision is derived
    from LIBNSS_FILES_SO.
    
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    (cherry picked from commit aefc79ab5ad4bb9feea2876720cec70dca7cd8ed)
    (cherry picked from commit c54c5cd8e30ef82041b525ca4880685c673357ee)

 nss/Makefile   | 13 +++++--------
 shlib-versions |  5 -----
 2 files changed, 5 insertions(+), 13 deletions(-)

commit 045a54d41754cf8bafd4f7cd4809d7fa087a42b0
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Mon Feb 28 11:50:41 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 20 23:52:23 2022 +0100

    io: Add fsync call in tst-stat
    
    io/tst-stat and io/tst-stat-lfs fail sporadically on the Fedora
    builders, and this change hopefully helps to avoid the issue.
    
    (cherry picked from commit ae132284092edc5885315b44cd17d5ea91177e49)
    (cherry picked from commit 3149f47b808288ccfbf4e56234bc07bdae139708)

 io/tst-stat.c | 4 ++++
 1 file changed, 4 insertions(+)

commit fd939e8740a97b3ffc5816cebb7be947c7b560af
Author:     Sam James <sam@gentoo.org>
AuthorDate: Mon Mar 7 01:59:53 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Mar 7 02:02:01 2022 +0100

    Drop glibc lock when returning early
    
    Fixes 1bcdcd4fec9bfe2f1d3fef67a43825903f6a5f2b
    
    Bug: https://bugs.gentoo.org/828070
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
    (cherry picked from commit 81f6a812264e375a695e5b00e2906da8102cc9b6)

 nss/nss_database.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

commit fd396d11c40ebafc117b8827ca109d75faacf1dc
Author:     John David Anglin <danglin@gcc.gnu.org>
AuthorDate: Mon Feb 28 15:47:38 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 6 16:01:13 2022 +0100

    nptl: Fix cleanups for stack grows up [BZ# 28899]
    
    _STACK_GROWS_DOWN is defined to 0 when the stack grows up.  The
    code in unwind.c used `#ifdef _STACK_GROWS_DOWN' to selct the
    stack grows down define for FRAME_LEFT.  As a result, the
    _STACK_GROWS_DOWN define was always selected and cleanups were
    incorrectly sequenced when the stack grows up.
    
    (cherry picked from commit 2bbc694df279020a6620096d31c1e05c93966f9b)
    (cherry picked from commit e30c1c73da3f220f5bf0063a1d0344f8280311e7)

 nptl/unwind.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit fc481833a266b0d7012a37763287a165b05647c4
Author:     John David Anglin <danglin@gcc.gnu.org>
AuthorDate: Tue Feb 22 18:51:35 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 6 16:00:57 2022 +0100

    hppa: Fix warnings from _dl_lookup_address
    
    This change fixes two warnings from _dl_lookup_address.
    
    The first warning comes from dropping the volatile keyword from
    desc in the call to _dl_read_access_allowed.  We now have a full
    atomic barrier between loading desc[0] and the access check, so
    desc no longer needs to be declared as volatile.
    
    The second warning comes from the implicit declaration of
    _dl_fix_reloc_arg.  This is fixed by including dl-runtime.h and
    declaring _dl_fix_reloc_arg in dl-runtime.h.
    
    (cherry picked from commit d2224ffbddc9d25ed5b0e34c212018c32d1e5a95)
    (cherry picked from commit ca0570fee323349bac834cf3bf3aef712f09cdc1)

 sysdeps/hppa/dl-fptr.c      | 15 ++++++++-------
 sysdeps/hppa/dl-lookupcfg.h |  1 +
 sysdeps/hppa/dl-runtime.c   |  4 ++--
 sysdeps/hppa/dl-runtime.h   |  3 +++
 4 files changed, 14 insertions(+), 9 deletions(-)

commit 4ad584fa7e9ce6f7de057cd1f4758ae4392d0644
Author:     John David Anglin <danglin@gcc.gnu.org>
AuthorDate: Tue Feb 22 17:28:46 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 6 16:00:40 2022 +0100

    hppa: Revise gettext trampoline design
    
    The current getcontext return trampoline is overly complex and it
    unnecessarily clobbers several registers.  By saving the context
    pointer (r26) in the context, __getcontext_ret can restore any
    registers not restored by setcontext.  This allows getcontext to
    save and restore the entire register context present when getcontext
    is entered.  We use the unused oR0 context slot for the return
    from __getcontext_ret.
    
    While this is not directly useful in C, it can be exploited in
    assembly code.  Registers r20, r23, r24 and r25 are not clobbered
    in the call path to getcontext.  This allows a small simplification
    of swapcontext.
    
    It also allows saving and restoring the 6-bit SAR register in the
    LSB of the oSAR context slot.  The getcontext flag value can be
    stored in the MSB of the oSAR slot.
    
    (cherry picked from commit 9e7e5fda38471e00d1190479ea91d7b08ae3e304)
    (cherry picked from commit d82d9cdff40492d46f75d5d12b3c9e2ac0c422fe)

 sysdeps/unix/sysv/linux/hppa/getcontext.S  | 50 ++++++++++++++++--------------
 sysdeps/unix/sysv/linux/hppa/setcontext.S  |  6 +++-
 sysdeps/unix/sysv/linux/hppa/swapcontext.c | 10 ++----
 3 files changed, 35 insertions(+), 31 deletions(-)

commit 42a00b98af74cf0d2513bd1aebccf77d9cd523df
Author:     John David Anglin <danglin@gcc.gnu.org>
AuthorDate: Fri Feb 18 20:38:25 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 6 16:00:22 2022 +0100

    hppa: Fix swapcontext
    
    This change fixes the failure of stdlib/tst-setcontext2 and
    stdlib/tst-setcontext7 on hppa.  The implementation of swapcontext
    in C is broken.  C saves the return pointer (rp) and any non
    call-clobbered registers (in this case r3, r4 and r5) on the
    stack.  However, the setcontext call in swapcontext pops the
    stack and subsequent calls clobber the saved registers.  When
    the context in oucp is restored, both tests fault.
    
    Here we rewrite swapcontext in assembly code to avoid using
    the stack for register values that need to be used after
    restoration.  The getcontext and setcontext routines are
    revised to save and restore register ret1 for normal returns.
    We copy the oucp pointer to ret1.  This allows access to
    the old context after calling getcontext and setcontext.
    
    (cherry picked from commit 71b108d7eb33b2bf3e61d5e92d2a47f74c1f7d96)
    (cherry picked from commit 2631d3b3a68108661deca311c3fc159a4ce62983)

 sysdeps/unix/sysv/linux/hppa/getcontext.S  |  3 ++
 sysdeps/unix/sysv/linux/hppa/setcontext.S  |  3 ++
 sysdeps/unix/sysv/linux/hppa/swapcontext.c | 59 ++++++++++++++++++++++++++----
 3 files changed, 58 insertions(+), 7 deletions(-)

commit 83b383c11642ef252bf4b553e7e63115525aa228
Author:     John David Anglin <danglin@gcc.gnu.org>
AuthorDate: Mon Feb 14 15:14:49 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 6 16:00:04 2022 +0100

    Fix elf/tst-audit2 on hppa
    
    The test elf/tst-audit2 fails on hppa with a segmentation fault in the
    long branch stub used to call malloc from calloc.  This occurs because
    the test is not a PIC executable and calloc is called from the dynamic
    linker before the dp register is initialized in _dl_start_user.
    
    The fix is to move the dp register initialization into
    elf_machine_runtime_setup.  Since the address of $global$ can't be
    loaded directly, we continue to use the DT_PLTGOT value from the
    the main_map to initialize dp.
    
    (cherry picked from commit 2e20cd63c96555d650c525ad5633475e8f11bed4)
    (cherry picked from commit 1f770811785e6c79db995b0390d1ef4e67e87d44)

 sysdeps/hppa/dl-machine.h | 24 ++++++++++--------------
 1 file changed, 10 insertions(+), 14 deletions(-)

commit d3e239c834520c0aa019f9a46aa51b44f7637726
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Fri Feb 4 15:54:59 2022 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 6 15:59:46 2022 +0100

    hppa: Fix bind-now audit (BZ #28857)
    
    On hppa, a function pointer returned by la_symbind is actually a function
    descriptor has the plabel bit set (bit 30).  This must be cleared to get
    the actual address of the descriptor.  If the descriptor has been bound,
    the first word of the descriptor is the physical address of theA function,
    otherwise, the first word of the descriptor points to a trampoline in the
    PLT.
    
    This patch also adds a workaround on tests because on hppa (and it seems
    to be the only ABI I have see it), some shared library adds a dynamic PLT
    relocation to am empty symbol name:
    
    $ readelf -r elf/tst-audit25mod1.so
    [...]
    Relocation section '.rela.plt' at offset 0x464 contains 6 entries:
     Offset     Info    Type            Sym.Value  Sym. Name + Addend
    00002008  00000081 R_PARISC_IPLT                508
    [...]
    
    It breaks some assumptions on the test, where a symbol with an empty
    name ("") is passed on la_symbind.
    
    Checked on x86_64-linux-gnu and hppa-linux-gnu.
    
    (Cherry-pick picked from 9e94f57484a2aba0fe67ea2059b5843f651887c2)
    
    (cherry picked from commit c60e6a458b8e2efc39c81d372a88d258009eb1b7)

 NEWS                        | 1 +
 elf/Makefile                | 2 +-
 elf/dl-audit.c              | 3 ++-
 elf/tst-auditmod24a.c       | 4 +++-
 elf/tst-auditmod24d.c       | 4 +++-
 elf/tst-auditmod25.c        | 2 +-
 sysdeps/hppa/dl-lookupcfg.h | 8 +++++---
 7 files changed, 16 insertions(+), 8 deletions(-)

commit e66e0a730911cc2c5c9b6cf9f46384389be58ca1
Author:     Arjun Shankar <arjun@redhat.com>
AuthorDate: Thu Feb 24 21:43:09 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 6 15:59:26 2022 +0100

    localedef: Handle symbolic links when generating locale-archive
    
    Whenever locale data for any locale included symbolic links, localedef
    would throw the error "incomplete set of locale files" and exclude it
    from the generated locale archive.  This commit fixes that.
    
    Co-authored-by: Florian Weimer <fweimer@redhat.com>
    
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    (cherry picked from commit ea89d5bbd9e5e514b606045d909e6ab87d851c88)
    (cherry picked from commit 90797f49722b69818780b1111c0ecc9dbbbf0bdf)

 locale/programs/locarchive.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit f0af399b3cc4ff87e771b0ec90305cea38c53825
Author:     Carlos O'Donell <carlos@redhat.com>
AuthorDate: Thu Feb 3 16:01:52 2022 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Feb 25 18:34:38 2022 +0100

    localedata: Do not generate output if warnings were present.
    
    With LC_MONETARY parsing fixed we can now generate locales
    without forcing output with '-c'.
    
    Removing '-c' from localedef invocation is the equivalent of
    using -Werror for localedef.  The glibc locale sources should
    always be clean and free from warnings.
    
    We remove '-c' from both test locale generation and the targets
    used for installing locales e.g. install-locale-archive, and
    install-locale-files.
    
    Tested on x86_64 and i686 without regressions.
    Tested with install-locale-archive target.
    Tested with install-locale-files target.
    
    Reviewed-by: DJ Delorie <dj@redhat.com>
    (cherry picked from commit 1c7a34567d21fbd3b706c77cd794956b43daefe7)
    (cherry picked from commit 732dd3a63d39c7ca77e817b462285c14551c8b49)

 localedata/Makefile      |  4 ++--
 localedata/gen-locale.sh | 10 ++++++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

commit 83cc8517c38e0da2f30c07e1568bc9b20f5b848a
Author:     Carlos O'Donell <carlos@redhat.com>
AuthorDate: Thu Feb 3 16:51:59 2022 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Feb 25 18:33:57 2022 +0100

    localedef: Update LC_MONETARY handling (Bug 28845)
    
    ISO C17, POSIX Issue 7, and ISO 30112 all allow the char*
    types to be empty strings i.e. "", integer or char values to
    be -1 or CHAR_MAX respectively, with the exception of
    decimal_point which must be non-empty in ISO C. Note that
    the defaults for mon_grouping vary, but are functionaly
    equivalent e.g. "\177" (no further grouping reuqired) vs.
    "" (no grouping defined for all groups).
    
    We include a broad comment talking about harmonizing ISO C,
    POSIX, ISO 30112, and the default C/POSIX locale for glibc.
    
    We reorder all setting based on locale/categories.def order.
    
    We soften all missing definitions from errors to warnings when
    defaults exist.
    
    Given that ISO C, POSIX and ISO 30112 allow the empty string
    we change LC_MONETARY handling of mon_decimal_point to allow
    the empty string.  If mon_decimal_point is not defined at all
    then we pick the existing legacy glibc default value of
    <U002E> i.e. ".".
    
    We also set the default for mon_thousands_sep_wc at the
    same time as mon_thousands_sep, but this is not a change in
    behaviour, it is always either a matching value or L'\0',
    but if in the future we change the default to a non-empty
    string we would need to update both at the same time.
    
    Tested on x86_64 and i686 without regressions.
    Tested with install-locale-archive target.
    Tested with install-locale-files target.
    
    Reviewed-by: DJ Delorie <dj@redhat.com>
    (cherry picked from commit 2ab8b74567dc0a9a3c98696e6444881997dd6c49)
    (cherry picked from commit 3feecd80013c822a12d4b01c5c25e155dfbc6e2f)

 locale/programs/ld-monetary.c | 182 +++++++++++++++++++++++++++++++++---------
 1 file changed, 146 insertions(+), 36 deletions(-)

commit 1e226b4007391d9f7c1321069463fe7d70c3a5ac
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: Fri Feb 25 18:33:39 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Feb 25 18:33:39 2022 +0100

    Revert "localedef: Update LC_MONETARY handling (Bug 28845)"
    
    This reverts commit 4551706550ad424963dd19d60d7025f64dbd0663.

 locale/programs/ld-monetary.c | 172 +++++++++---------------------------------
 1 file changed, 36 insertions(+), 136 deletions(-)

commit 454163c6b66cee8313dfe102adbfcf8e3f508265
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Thu Feb 24 07:58:36 2022 -0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Feb 25 18:32:34 2022 +0100

    NEWS: Add a bug fix entry for BZ #28688
    
    (cherry picked from commit a787325e8316830f8d9a118aac5afee3c0e75617)

 NEWS | 1 +
 1 file changed, 1 insertion(+)

commit 67a1303eacb412e8f900c4aac3512b2e3cb8574c
Author:     Stafford Horne <shorne@gmail.com>
AuthorDate: Sat Feb 12 08:17:55 2022 +0900
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Feb 25 18:32:16 2022 +0100

    resolv: Fix tst-resolv tests for 2.35 ABIs and later
    
    The commit 737e873b30 ("resolv: Do not build libanl.so for ABIs starting
    at 2.35") disabled building libanl for ports supporting only 2.35 and
    later like OpenRISC.
    
    However, the if statement was not updated quite correctly and the change
    ends up disabling many tst-resolv* tests.  This was not supposed to be
    done and it causes test dependency errors like:
    
         make: Entering directory 'gnu-home/glibc/resolv'
         make: *** No rule to make target 'gnu-home/build-glibc/resolv/tst-resolv-res_ninit.out', needed by 'gnu-home/build-glibc/resolv/mtrace-tst-resolv-res_ninit.out'. Stop.
         make: Leaving directory 'gnu-home/glibc/resolv'
    
    This patch move the extra-libs += libanl definition and condition down
    to be closer to other libanl definitions.  The $(have-GLIBC_2.34)
    condition now includes libanl-routines and libanl-shared-only-routines as
    well.
    
    Also, I have added a comment to endif of $(have-thread-library) to help
    show the bondary of the have-thread-library definitions.
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit ee5d27bea53626c0187f77feec2c883f2c6ac4b3)
    (cherry picked from commit 264ad5d7d66c0f18587860d62498b8f2a9001400)

 resolv/Makefile | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

commit aaacd19df6add937a02eb9223c5c1daee84374ab
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Sun Feb 6 11:12:24 2022 -0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Feb 25 18:31:45 2022 +0100

    elf: Replace tst-audit24bmod2.so with tst-audit24bmod2
    
    Replace tst-audit24bmod2.so with tst-audit24bmod2 to silence:
    
    make[2]: Entering directory '/export/gnu/import/git/gitlab/x86-glibc/elf'
    Makefile:2201: warning: overriding recipe for target '/export/build/gnu/tools-build/glibc-gitlab/build-x86_64-linux/elf/tst-audit24bmod2.so'
    ../Makerules:765: warning: ignoring old recipe for target '/export/build/gnu/tools-build/glibc-gitlab/build-x86_64-linux/elf/tst-audit24bmod2.so'
    
    (cherry picked from commit fa7ad1df1915c8a62f50e3a5b7e10f9c7118cd7f)
    (cherry picked from commit e247a3b1188f6c4b623bbfbe19bb415153c66637)

 elf/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 34ad69c93b5856a0b8ac2d3369db608b4e0dcd3e (tag: gentoo/glibc-2.35-3)
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Tue Feb 15 06:57:11 2022 -0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Feb 21 23:10:08 2022 +0100

    elf: Check invalid hole in PT_LOAD segments [BZ #28838]
    
    Changes in v2:
    
    1. Update commit log.
    
    commit 163f625cf9becbb82dfec63a29e566324129c0cd
    Author: H.J. Lu <hjl.tools@gmail.com>
    Date:   Tue Dec 21 12:35:47 2021 -0800
    
        elf: Remove excessive p_align check on PT_LOAD segments [BZ #28688]
    
    removed the p_align check against the page size.  It caused the loader
    error or crash on elf/tst-p_align3 when loading elf/tst-p_alignmod3.so,
    which has the invalid p_align in PT_LOAD segments, added by
    
    commit d8d94863ef125a392b929732b37e07dc927fbcd1
    Author: H.J. Lu <hjl.tools@gmail.com>
    Date:   Tue Dec 21 13:42:28 2021 -0800
    
    The loader failure caused by a negative length passed to __mprotect is
    random, depending on architecture and toolchain.  Update _dl_map_segments
    to detect invalid holes.  This fixes BZ #28838.
    
    Reviewed-by: Florian Weimer <fweimer@redhat.com>
    (cherry picked from commit 2c0915cbf570cb9c8a65f1d20a55c5a7238e5b63)
    (cherry picked from commit 1dd783fafdbc30bd82e078ccab42b9539d3274a5)

 elf/dl-map-segments.h | 3 +++
 1 file changed, 3 insertions(+)

commit 0210b3e97bc1dcffbd095695e60254e9e2b9da46
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Fri Feb 18 19:07:11 2022 -0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Feb 21 23:09:43 2022 +0100

    NEWS: Add a bug fix entry for BZ #28896
    
    (cherry picked from commit 3226ffde07ae2bef3c2f57ad018829320f2922ee)

 NEWS | 2 ++
 1 file changed, 2 insertions(+)

commit 55d11c902d8e805e3c56527529ec34d57063d7df
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Fri Feb 18 17:00:25 2022 -0600
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Feb 21 23:09:26 2022 +0100

    x86: Fix TEST_NAME to make it a string in tst-strncmp-rtm.c
    
    Previously TEST_NAME was passing a function pointer. This didn't fail
    because of the -Wno-error flag (to allow for overflow sizes passed
    to strncmp/wcsncmp)
    
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    (cherry picked from commit b98d0bbf747f39770e0caba7e984ce9f8f900330)
    (cherry picked from commit 676f85759c5cd1eeb081e8b1c1c05a4f0fa3b92b)

 sysdeps/x86/tst-strncmp-rtm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

commit 00e6ed0b691282cf1a31c4bd5cee04b688cc4d3f
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Fri Feb 18 14:19:15 2022 -0600
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Feb 21 23:09:07 2022 +0100

    x86: Test wcscmp RTM in the wcsncmp overflow case [BZ #28896]
    
    In the overflow fallback strncmp-avx2-rtm and wcsncmp-avx2-rtm would
    call strcmp-avx2 and wcscmp-avx2 respectively. This would have
    not checks around vzeroupper and would trigger spurious
    aborts. This commit fixes that.
    
    test-strcmp, test-strncmp, test-wcscmp, and test-wcsncmp all pass on
    AVX2 machines with and without RTM.
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    
    (cherry picked from commit 7835d611af0854e69a0c71e3806f8fe379282d6f)
    (cherry picked from commit d001088e221ab3f89d78ce3e914e97206a27c94b)

 sysdeps/x86/Makefile          |  5 ++++-
 sysdeps/x86/tst-strncmp-rtm.c | 32 +++++++++++++++++++++++---------
 sysdeps/x86/tst-wcsncmp-rtm.c | 21 +++++++++++++++++++++
 3 files changed, 48 insertions(+), 10 deletions(-)

commit 5db9ac6cb139cad1b9f6a25d10563502cd509c87
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Tue Feb 15 08:18:15 2022 -0600
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Feb 21 23:08:48 2022 +0100

    x86: Fallback {str|wcs}cmp RTM in the ncmp overflow case [BZ #28896]
    
    In the overflow fallback strncmp-avx2-rtm and wcsncmp-avx2-rtm would
    call strcmp-avx2 and wcscmp-avx2 respectively. This would have
    not checks around vzeroupper and would trigger spurious
    aborts. This commit fixes that.
    
    test-strcmp, test-strncmp, test-wcscmp, and test-wcsncmp all pass on
    AVX2 machines with and without RTM.
    
    Co-authored-by: H.J. Lu <hjl.tools@gmail.com>
    
    (cherry picked from commit c6272098323153db373f2986c67786ea8c85f1cf)
    (cherry picked from commit fd412fff6d2bd322ec24ebd13fab196efc6c5506)

 sysdeps/x86/Makefile                        |  2 +-
 sysdeps/x86/tst-strncmp-rtm.c               | 17 ++++++++++++++++-
 sysdeps/x86_64/multiarch/strcmp-avx2.S      |  2 +-
 sysdeps/x86_64/multiarch/strncmp-avx2-rtm.S |  1 +
 sysdeps/x86_64/multiarch/strncmp-avx2.S     |  1 +
 sysdeps/x86_64/multiarch/wcsncmp-avx2-rtm.S |  2 +-
 sysdeps/x86_64/multiarch/wcsncmp-avx2.S     |  2 +-
 7 files changed, 22 insertions(+), 5 deletions(-)

commit 48252feaf549302a0196fd4f336b32f70ebd0f8a
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: Mon Feb 21 22:25:54 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Feb 21 22:25:54 2022 +0100

    Fix build
    
    Restore bracket that accidentally got lost in aa1d70e59ee6ad1503bc853da75afb35d51381be
    
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 nss/nss_database.c | 1 +
 1 file changed, 1 insertion(+)

commit 849b1b6a9d9b541b73f96dcddcac60d706ac3832
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Thu Feb 17 08:10:35 2022 -0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Feb 17 21:43:50 2022 +0100

    string: Add a testcase for wcsncmp with SIZE_MAX [BZ #28755]
    
    Verify that wcsncmp (L("abc"), L("abd"), SIZE_MAX) == 0.  The new test
    fails without
    
    commit ddf0992cf57a93200e0c782e2a94d0733a5a0b87
    Author: Noah Goldstein <goldstein.w.n@gmail.com>
    Date:   Sun Jan 9 16:02:21 2022 -0600
    
        x86: Fix __wcsncmp_avx2 in strcmp-avx2.S [BZ# 28755]
    
    and
    
    commit 7e08db3359c86c94918feb33a1182cd0ff3bb10b
    Author: Noah Goldstein <goldstein.w.n@gmail.com>
    Date:   Sun Jan 9 16:02:28 2022 -0600
    
        x86: Fix __wcsncmp_evex in strcmp-evex.S [BZ# 28755]
    
    This is for BZ #28755.
    
    Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com>
    
    (cherry picked from commit aa5a720056d37cf24924c138a3dbe6dace98e97c)
    (cherry picked from commit a30807b7db924d31681e9c6e98e78f2f46a2640c)

 string/test-strncmp.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

commit 26a19f0defc5d9b9ae173e31a2717c61f1727fdb
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Mon Feb 14 10:35:30 2022 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Feb 17 01:27:28 2022 +0100

    linux: Use socket-constants-time64.h on tst-socket-timestamp-compat
    
    The kernel header might not define the SO_TIMESTAMP{NS}_OLD or
    SO_TIMESTAMP{NS}_NEW if it older than v5.1.
    
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
    
    (cherry picked from commit fee62d6c6285548027e222c8dae597fec6577f23)
    (cherry picked from commit f055faf801cbffd9a0311774589de1cc745ccbe4)

 .../unix/sysv/linux/tst-socket-timestamp-compat.c  | 25 +++++++++++-----------
 1 file changed, 13 insertions(+), 12 deletions(-)

commit ccc1d0c9b6418c3ab5886a0a909deb9b6cfa27c6
Author:     Dmitry V. Levin <ldv@altlinux.org>
AuthorDate: Sat Feb 5 08:00:00 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Feb 17 01:26:45 2022 +0100

    linux: fix accuracy of get_nprocs and get_nprocs_conf [BZ #28865]
    
    get_nprocs() and get_nprocs_conf() use various methods to obtain an
    accurate number of processors.  Re-introduce __get_nprocs_sched() as
    a source of information, and fix the order in which these methods are
    used to return the most accurate information.  The primary source of
    information used in both functions remains unchanged.
    
    This also changes __get_nprocs_sched() error return value from 2 to 0,
    but all its users are already prepared to handle that.
    
    Old fallback order:
      get_nprocs:
        /sys/devices/system/cpu/online -> /proc/stat -> 2
      get_nprocs_conf:
        /sys/devices/system/cpu/ -> /proc/stat -> 2
    
    New fallback order:
      get_nprocs:
        /sys/devices/system/cpu/online -> /proc/stat -> sched_getaffinity -> 2
      get_nprocs_conf:
        /sys/devices/system/cpu/ -> /proc/stat -> sched_getaffinity -> 2
    
    Fixes: 342298278e ("linux: Revert the use of sched_getaffinity on get_nproc")
    Closes: BZ #28865
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    
    (cherry picked from commit e1d32b836410767270a3adf1f82b1a47e6e4cd51)
    (cherry picked from commit 491f2ef1f0ff849490f374917957018d07ee0586)

 NEWS                                  |  2 +
 sysdeps/unix/sysv/linux/getsysstats.c | 94 +++++++++++++++++++++++------------
 2 files changed, 65 insertions(+), 31 deletions(-)

commit aa1d70e59ee6ad1503bc853da75afb35d51381be
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Sat Feb 12 19:40:58 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Feb 12 19:43:48 2022 +0100

    Fix segfault in getpwuid when stat fails (BZ #28752)
    
    [azanella proposed this patch to sam when discussing the issue,
     but it's not anywhere upstream yet- dilfridge]
    
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28752
    Bug: https://bugs.gentoo.org/828070
    (cherry picked from commit 1bcdcd4fec9bfe2f1d3fef67a43825903f6a5f2b)

 nss/nss_database.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

commit 4551706550ad424963dd19d60d7025f64dbd0663 (tag: gentoo/glibc-2.35-2)
Author:     Carlos O'Donell <carlos@redhat.com>
AuthorDate: Fri Feb 4 21:56:59 2022 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Feb 11 23:34:51 2022 +0100

    localedef: Update LC_MONETARY handling (Bug 28845)
    
    ISO C17, POSIX Issue 7, and ISO 30112 all allow the char*
    types to be empty strings i.e. "", integer or char values to
    be -1 or CHAR_MAX respectively, with the exception of
    decimal_point which must be non-empty in ISO C.
    
    We include a broad comment talking about harmonizing ISO C,
    POSIX, ISO 30112, and the default C/POSIX locale for glibc.
    
    We reorder all setting based on locale/categories.def order.
    
    We soften all missing definitions from errors to warnings when
    defaults exist.
    
    Given that ISO C, POSIX and ISO 30112 allow the empty string
    we change LC_MONETARY handling of mon_decimal_point to allow
    the empty string.  If mon_decimal_point is not defined at all
    then we pick the existing legacy glibc default value of
    <U002E> i.e. ".".
    
    We also set the default for mon_thousands_sep_wc at the
    same time as mon_thousands_sep, but this is not a change in
    behaviour, it is always either a matching value or L'\0',
    but if in the future we change the default to a non-empty
    string we would need to update both at the same time.
    
    Tested on x86_64 and i686 without regressions.
    Tested with install-locale-archive target.
    Tested with install-locale-files target.

 locale/programs/ld-monetary.c | 172 +++++++++++++++++++++++++++++++++---------
 1 file changed, 136 insertions(+), 36 deletions(-)

commit 5b431f9947e1a41e2a130046f5b3b3bc1bfadeb9 (tag: gentoo/glibc-2.35-1)
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Fri Apr 17 09:59:51 2020 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Feb 3 23:53:16 2022 +0100

    dirent: Deprecate getdirentries
    
    The interface has some issues:
    
      1. It is build on top getdents on Linux and requires handling
         non-LFS call using LFS getdents.
    
      2. It is not wildly used and the non-LFS support is as problematic
         as non-LFS readdir.  glibc only exports the LFS getdents.
    
      3. It is not a direct replacement over BSD since on some plataform
         its signature has changed (FreeBSD 11, for instance, used to
         set the offset as a 'long' and changed to 'off_t' on version 12).
    
    The idea is to eventually move the symbols to compat ones.

 NEWS                             |  6 ++++++
 dirent/dirent.h                  | 14 ++++++++++----
 sysdeps/unix/sysv/linux/Makefile |  4 ++++
 3 files changed, 20 insertions(+), 4 deletions(-)

commit f61e4e688f5dda508c511c38d4565e39f76d2f49
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Tue Oct 20 16:00:43 2020 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Feb 3 23:48:36 2022 +0100

    linux: Use getdents64 on readdir64 compat implementation
    
    It uses a similar strategy from the non-LFS readdir that also
    uses getdents64 internally and uses a translation buffer to return
    the compat readdir64 entry.
    
    It allows to remove __old_getdents64.
    
    Checked on i686-linux-gnu.

 sysdeps/unix/sysv/linux/getdents64.c |  93 -------------------------------
 sysdeps/unix/sysv/linux/olddirent.h  |   2 -
 sysdeps/unix/sysv/linux/opendir.c    |  15 ++++-
 sysdeps/unix/sysv/linux/readdir64.c  | 104 ++++++++++++++++++++++-------------
 4 files changed, 79 insertions(+), 135 deletions(-)

commit 8a104d7cc15bc96067a13fc99cf96377e00de690
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Tue Apr 14 11:14:22 2020 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Feb 3 23:48:33 2022 +0100

    linux: Add __old_readdir64_unlocked
    
    And use it __old_readdir64_r.
    
    Checked on i686-linux-gnu.

 sysdeps/unix/sysv/linux/olddirent.h   |  2 +
 sysdeps/unix/sysv/linux/readdir64.c   | 21 +++++++---
 sysdeps/unix/sysv/linux/readdir64_r.c | 79 ++++++++---------------------------
 3 files changed, 35 insertions(+), 67 deletions(-)

commit 537d7871c3a23cc5c0a0c82d2aae7701031232cb
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Mon Apr 13 08:35:40 2020 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Feb 3 23:48:30 2022 +0100

    linux: Add __readdir64_unlocked
    
    And use it on readdir_r implementation.
    
    Checked on i686-linux-gnu.

 include/dirent.h                      |  1 +
 sysdeps/unix/sysv/linux/readdir64.c   | 20 ++++++---
 sysdeps/unix/sysv/linux/readdir64_r.c | 80 ++++++++---------------------------
 3 files changed, 33 insertions(+), 68 deletions(-)

commit c5156366343c9e56b4dcbd6b3c0f8d24f48b4b65
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Mon Apr 13 18:09:20 2020 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Feb 3 23:48:27 2022 +0100

    linux: Set internal DIR filepos as off64_t [BZ #23960, BZ #24050]
    
    It allows to obtain the expected entry offset on telldir and set
    it correctly on seekdir on platforms where long int is smaller
    than off64_t.
    
    On such cases telldir will mantain an internal list that maps the
    DIR object off64_t offsets to the returned long int (the function
    return value).  The seekdir will then set the correct offset from
    the internal list using the telldir as the list key.
    
    It also removes the overflow check on readdir and the returned value
    will be truncated by the non-LFS off_t size.  As Joseph has noted
    in BZ #23960 comment #22, d_off is an opaque value and since
    telldir/seekdir works regardless of the returned dirent d_off value.
    
    Finally it removed the requirement to check for overflow values on
    telldir (BZ #24050).
    
    Checked on x86_64-linux-gnu, i686-linux-gnu, powerpc-linux-gnu,
    and arm-linux-gnueabihf.

 dirent/Makefile                     |   2 +-
 dirent/tst-seekdir2.c               | 158 ++++++++++++++++++++++++++++++++++++
 sysdeps/unix/sysv/linux/closedir.c  |   4 +
 sysdeps/unix/sysv/linux/dirstream.h |   6 +-
 sysdeps/unix/sysv/linux/opendir.c   |   3 +
 sysdeps/unix/sysv/linux/readdir.c   |   1 +
 sysdeps/unix/sysv/linux/rewinddir.c |   5 ++
 sysdeps/unix/sysv/linux/seekdir.c   |  36 ++++++--
 sysdeps/unix/sysv/linux/telldir.c   |  47 ++++++++++-
 sysdeps/unix/sysv/linux/telldir.h   |  64 +++++++++++++++
 10 files changed, 317 insertions(+), 9 deletions(-)

commit f438c98e2872d2db0b9bbdf95b279434f1d4e4d0
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Tue Oct 20 13:37:15 2020 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Feb 3 23:48:24 2022 +0100

    linux: Use getdents64 on non-LFS readdir
    
    The opendir allocates a translation buffer to be used to return the
    non-LFS readdir entry.  The obtained dirent64 struct is translated
    to the temporary buffer on each readdir call.
    
    Entries that overflow d_off/d_ino and the buffer reallocation failure
    (in case of large d_name) are ignored.
    
    Checked on x86_64-linux-gnu and i686-linux-gnu.

 sysdeps/unix/sysv/linux/closedir.c  |  4 ++
 sysdeps/unix/sysv/linux/dirstream.h |  5 ++
 sysdeps/unix/sysv/linux/opendir.c   | 21 ++++++++
 sysdeps/unix/sysv/linux/readdir.c   | 97 +++++++++++++++++++++++++++----------
 4 files changed, 101 insertions(+), 26 deletions(-)

commit 2ce49f9fafd95f3e2487a31c9a0302ee20ac83b2
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Tue Oct 20 12:18:56 2020 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Feb 3 23:48:21 2022 +0100

    linux: Do not skip entries with zero d_ino values [BZ #12165]
    
    According to Linux commit 2adc376c55194 (vfs: avoid creation of inode
    number 0 in get_next_ino) Linux did not treat d_ino == 0 as a special
    case (it is a valid inode number).
    
    This patch fixes readdir{64} by not ignoring entried with d_ino being
    0.
    
    Checked on x86_64-linux-gnu and i686-linux-gnu.

 sysdeps/unix/sysv/linux/readdir.c   | 59 ++++++++++++++-----------------------
 sysdeps/unix/sysv/linux/readdir64.c | 59 ++++++++++++++-----------------------
 2 files changed, 44 insertions(+), 74 deletions(-)

commit 06b01dfa4e29b5a6838dd9050f3e9418c5dc77f5
Author:     Sam James <sam@gentoo.org>
AuthorDate: Wed Dec 1 14:58:40 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Feb 3 23:48:18 2022 +0100

    clone-internal.c: make clone3 syscall optional
    
    We're disabling clone3 for now _CONDITIONALLY_ (not by default) to allow
    compatibility with applications using older Electron.
    
    Use -DGENTOO_USE_CLONE3 to enable clone3 for now. In future, we will
    revert back to always using clone3.
    
    This was impacting e.g. Discord and Skype. This patch stops glibc from using
    clone3 internally (which is the only real use of it) and falls back to the old
    behaviour.
    
    Specifically, we want https://github.com/electron/electron/pull/31091
    to work its way downstream to various Electron applications.
    
    https://bugs.gentoo.org/819045
    https://bugs.gentoo.org/827386
    
    https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/glibc/plain/debian/patches/ubuntu/disable-clone3.patch
    
    This is the same as the patch that was considered but ultimately rejected
    for 2.34 because Docker got sorted out in time:
    https://patchwork.ozlabs.org/project/glibc/patch/87eebkf8ph.fsf@oldenburg.str.redhat.com/.
    
    Signed-off-by: Sam James <sam@gentoo.org>

 sysdeps/unix/sysv/linux/clone-internal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 03bae86fc31f63f030e8627e39ca26e34f9bdcbc
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: Sat Jul 11 20:06:51 2020 +0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Feb 3 23:48:15 2022 +0100

    Fix miscompilation on ia64's gcc-10
    
    Bug: https://bugs.gentoo.org/723268
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 sysdeps/unix/sysv/linux/ia64/dl-sysdep.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

commit 92e3aad83ca366195c1b71c3a24bcf427c287a32
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: Fri Dec 14 20:43:04 2018 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Feb 3 23:48:12 2022 +0100

    Force -O0 in conform tests to survive $CC changes
    
    In bug #659030 Gentoo started passing user's CFLAGS via $CC variable.
    conform tests should but are not ready to handle -O1/-O2 yet.
    Tests fail to validate headers due to inlining of weak symbol aliases
    and other problems. Let's force it back to -O0 until it's fixed upstream.
    
    Original patch by Sergei, ported to the new python test framework by Andreas
    
    Bug: https://bugs.gentoo.org/659030
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 conform/conformtest.py   | 6 ++++--
 conform/linknamespace.py | 4 +++-
 2 files changed, 7 insertions(+), 3 deletions(-)

commit 2a35f8c25c1978cbcb3fb00802894b97e1f4af28
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: Mon Oct 22 22:34:13 2018 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Feb 3 23:48:09 2022 +0100

    Adapt to Gentoo-specific /etc/mail/aliases
    
    Patch by pacho2
    
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
    (cherry picked from commit 4e616cda056f471b799beba2b1cedc787ad4ecc0)

 nss/nss_files/files-alias.c    |  2 +-
 nss/tst-nss-files-alias-leak.c | 18 +++++++++---------
 support/support_chroot.c       |  8 +++++++-
 3 files changed, 17 insertions(+), 11 deletions(-)

commit 50a64786de27a505c62e08797ef1a2e2a3004fcf
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: Tue Aug 29 22:58:50 2017 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Feb 3 23:48:06 2022 +0100

    Revert " * sysdeps/posix/getaddrinfo.c (gaih_inet): Only use gethostbyname4_r"
    
    This reverts commit 8479f23aa1d5e5477a37f46823856bdafaedfa46.
    
    See for the background
      https://sourceware.org/bugzilla/show_bug.cgi?id=16826
      https://bugs.gentoo.org/show_bug.cgi?id=600632
    
    This makes tst-nss-files-hosts-multi fail. Disable it.

 nss/Makefile                | 1 -
 sysdeps/posix/getaddrinfo.c | 9 ++-------
 2 files changed, 2 insertions(+), 8 deletions(-)

commit df44cee99620d8d4a8da04e1d1506a2cab3318ad
Author:     Mike Frysinger <vapier@gentoo.org>
AuthorDate: Tue Aug 3 00:34:59 2021 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Feb 3 23:48:03 2022 +0100

    Disable ldconfig during install
    
    Do not bother running ldconfig on DESTDIR.  It's a waste of time as we
    won't use the result (portage will rebuild the cache after install).
    Also, the Gentoo sandbox does not currently catch chroot() behavior so
    we end up (incorrectly) flagging it as a violation as a write to /etc.
    
    http://sourceware.org/ml/libc-alpha/2012-08/msg00118.html
    https://bugs.gentoo.org/431038

 Makefile | 1 +
 1 file changed, 1 insertion(+)

commit 24962427071fa532c3c48c918e9d64d719cc8a6c
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Thu Feb 3 17:50:13 2022 -0300
Commit:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
CommitDate: Thu Feb 3 17:50:13 2022 -0300

    Add BZ#28860 reference on NEWS

 NEWS | 2 ++
 1 file changed, 2 insertions(+)

commit 7001c1e38b46d5f5a90f7915b1211782341ab6a8
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Thu Feb 3 16:52:52 2022 -0300
Commit:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
CommitDate: Thu Feb 3 17:08:50 2022 -0300

    linux: Fix missing __convert_scm_timestamps (BZ #28860)
    
    Commit 948ce73b31 made recvmsg/recvmmsg to always call
    __convert_scm_timestamps for 64 bit time_t symbol, so adjust it to
    always build it for __TIMESIZE != 64.
    
    It fixes build for architecture with 32 bit time_t support when
    configured with minimum kernel of 5.1.
    
    (cherry picked from 798d716df71fb23dc89d1d5dba1fc26a1b5c0024)

 sysdeps/unix/sysv/linux/convert_scm_timestamps.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

commit a2f1675634b3513c09c38e55e6766e8c05768b1f
Author:     Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
AuthorDate: Tue Feb 1 22:39:02 2022 +0000
Commit:     Dmitry V. Levin <ldv@altlinux.org>
CommitDate: Thu Feb 3 11:04:08 2022 +0000

    linux: __get_nprocs_sched: do not feed CPU_COUNT_S with garbage [BZ #28850]
    
    Pass the actual number of bytes returned by the kernel.
    
    Fixes: 33099d72e41c ("linux: Simplify get_nprocs")
    Reviewed-by: Dmitry V. Levin <ldv@altlinux.org>
    
    (cherry picked from commit 97ba273b505763325efd802dc3a9562dbba79579)

 NEWS                                  | 1 +
 sysdeps/unix/sysv/linux/getsysstats.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

commit d2e4d2a38e4e7bc3ca407607e717b7f50b20c63f
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Wed Feb 2 18:31:59 2022 -0300
Commit:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
CommitDate: Thu Feb 3 08:13:57 2022 -0300

    posix: Fix tst-spawn6 terminal handling (BZ #28853)
    
    The test changes the current foreground process group, which might
    break testing depending of how the make check is issued.  For instance:
    
      nohup make -j1 test t=posix/tst-spawn6 | less
    
    Will set 'make' and 'less' to be in the foreground process group in
    the current session.  When tst-spawn6 new child takes over it becomes
    the foreground process and 'less' is stopped and backgrounded which
    interrupts the 'make check' command.
    
    To fix it a pseudo-terminal is allocated, the test starts in new
    session (so there is no controlling terminal associated), and the
    pseudo-terminal is set as the controlling one (similar to what
    login_tty does).
    
    Checked on x86_64-linux-gnu.
    
    Tested-by: Carlos O'Donell <carlos@redhat.com>
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    
    (cherry picked from a9d35765728cbc5b66af5eeda5428298bccf9b69)

 NEWS               |  8 +++++++
 posix/tst-spawn6.c | 62 ++++++++++++++++++++++++++++++++++++++++++++----------
 2 files changed, 59 insertions(+), 11 deletions(-)

commit 9e8281add35dde70478464389fab6f0f7e75b880
Author:     Andreas Schwab <schwab@linux-m68k.org>
AuthorDate: Thu Feb 3 09:37:42 2022 +0100
Commit:     Andreas Schwab <schwab@linux-m68k.org>
CommitDate: Thu Feb 3 09:38:44 2022 +0100

    Regenerate configure

 configure | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)
