commit 25386aa995a878bacfe09916102c51b9c817cb28 (HEAD -> gentoo/2.34)
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: Thu Mar 31 01:04:07 2022 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Mar 31 01:04:07 2022 +0200

    Revert "Revert "clone-internal.c: make clone3 syscall optional""
    
    Was still needed after all. For zoom of all things ...
    
    This reverts commit c69573d32ce399d03446b6b4b76b18848203718f.

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

commit 9eece7c7e2bc50b3669edd250b059891026a9ab1 (gentoo/gentoo/2.34)
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: Sat Mar 26 20:58:08 2022 +0100

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

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

commit 0205832d2a50350651eef343ff99ed28900e119c
Author:     John David Anglin <danglin@gcc.gnu.org>
AuthorDate: Tue Mar 15 23:12:37 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Mar 26 20:57:48 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 738ee53f0ce5e39b9b7a6777f5d3057afbaac498)

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

commit b0fabe96a98560b597b0080194eddcbc55dcc24b
Author:     Siddhesh Poyarekar <siddhesh@sourceware.org>
AuthorDate: Wed Jan 12 23:34:48 2022 +0530
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Mar 26 20:57:31 2022 +0100

    debug: Synchronize feature guards in fortified functions [BZ #28746]
    
    Some functions (e.g. stpcpy, pread64, etc.) had moved to POSIX in the
    main headers as they got incorporated into the standard, but their
    fortified variants remained under __USE_GNU.  As a result, these
    functions did not get fortified when _GNU_SOURCE was not defined.
    
    Add test wrappers that check all functions tested in tst-chk0 at all
    levels with _GNU_SOURCE undefined and then use the failures to (1)
    exclude checks for _GNU_SOURCE functions in these tests and (2) Fix
    feature macro guards in the fortified function headers so that they're
    the same as the ones in the main headers.
    
    This fixes BZ #28746.
    
    Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit fcfc9086815bf0d277ad47a90ee3fda4c37acca8)
    (cherry picked from commit 224d8c1890b6c57c7e4e8ddbb792dd9552086704)

 debug/Makefile                 | 10 +++++++--
 debug/tst-fortify.c            | 51 ++++++++++++++++++++++++++++++++++--------
 posix/bits/unistd.h            |  2 +-
 string/bits/string_fortified.h |  8 ++++---
 support/xsignal.h              |  2 ++
 wcsmbs/bits/wchar2.h           |  2 +-
 6 files changed, 59 insertions(+), 16 deletions(-)

commit b6a69bf585db31bf3ad93957e0ec42a51d34a663
Author:     Siddhesh Poyarekar <siddhesh@sourceware.org>
AuthorDate: Wed Jan 12 23:34:23 2022 +0530
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Mar 26 20:57:13 2022 +0100

    debug: Autogenerate _FORTIFY_SOURCE tests
    
    Rename debug/tst-chk1.c to debug/tst-fortify.c and add make hackery to
    autogenerate tests with different macros enabled to build and run the
    same test with different configurations as well as different
    fortification levels.
    
    The change also ends up expanding the -lfs tests to include
    _FORTIFY_SOURCE=3.
    
    Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit db27f1251b008280a29d540b4f8ab2a38a0d80af)
    (cherry picked from commit f8c2f620f1929ad78cb0a247601bec972f140c51)

 Makerules                           |   6 ++
 debug/Makefile                      | 111 ++++++++++++++++++++++--------------
 debug/tst-chk2.c                    |   2 -
 debug/tst-chk3.c                    |   2 -
 debug/tst-chk4.cc                   |   1 -
 debug/tst-chk5.cc                   |   2 -
 debug/tst-chk6.cc                   |   2 -
 debug/tst-chk7.c                    |   2 -
 debug/tst-chk8.cc                   |   2 -
 debug/{tst-chk1.c => tst-fortify.c} |   0
 debug/tst-lfschk1.c                 |   2 -
 debug/tst-lfschk2.c                 |   2 -
 debug/tst-lfschk3.c                 |   2 -
 debug/tst-lfschk4.cc                |   2 -
 debug/tst-lfschk5.cc                |   2 -
 debug/tst-lfschk6.cc                |   2 -
 16 files changed, 74 insertions(+), 68 deletions(-)

commit 6d544f800dffd11253f948958c1b410b1e698d55
Author:     Siddhesh Poyarekar <siddhesh@sourceware.org>
AuthorDate: Wed Jan 12 18:46:28 2022 +0530
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Mar 26 20:56:55 2022 +0100

    Enable _FORTIFY_SOURCE=3 for gcc 12 and above
    
    gcc 12 now has support for the __builtin_dynamic_object_size builtin.
    Adapt the macro checks to enable _FORTIFY_SOURCE=3 on gcc 12 and above.
    
    Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit 86bf0feb0e3ec8e37872f72499d6ae33406561d7)
    (cherry picked from commit d6a58bd81d07322ff5da8f419d8620ef037b6a36)

 include/features.h | 4 +++-
 misc/sys/cdefs.h   | 3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)

commit b71d29030f5844f41d6e53e671f68df43c0e6f67
Author:     Siddhesh Poyarekar <siddhesh@sourceware.org>
AuthorDate: Fri Dec 17 18:35:44 2021 +0530
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Mar 26 20:56:38 2022 +0100

    fortify: Fix spurious warning with realpath
    
    The length and object size arguments were swapped around for realpath.
    Also add a smoke test so that any changes in this area get caught in
    future.
    
    Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
    (cherry picked from commit 2bbd07c715275eb6c616988925738a0517180d57)
    (cherry picked from commit 10f7bdebe570e42d1f7a43de4f90eda8ccb4f0da)

 debug/Makefile           |  3 ++-
 debug/tst-realpath-chk.c | 37 +++++++++++++++++++++++++++++++++++++
 stdlib/bits/stdlib.h     |  2 +-
 3 files changed, 40 insertions(+), 2 deletions(-)

commit 5f53bb6c83a0daa3a6c604110ed269b38c92eb83
Author:     Siddhesh Poyarekar <siddhesh@sourceware.org>
AuthorDate: Thu Dec 16 07:19:14 2021 +0530
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Mar 26 20:56:21 2022 +0100

    __glibc_unsafe_len: Fix comment
    
    We know that the length is *unsafe*.
    
    Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    (cherry picked from commit ae23fa3e5fe24daf94fc7f8e5268bb8ceeda7477)
    (cherry picked from commit 98ea9372cc8d60b12aa33e007fdd5f5fb042a651)

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

commit a1eb32293f16382c0411b14a003ef0f248a25c65
Author:     Siddhesh Poyarekar <siddhesh@sourceware.org>
AuthorDate: Wed Oct 20 18:13:05 2021 +0530
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Mar 26 20:56:03 2022 +0100

    debug: Add tests for _FORTIFY_SOURCE=3
    
    Add some testing coverage for _FORTIFY_SOURCE=3.
    
    Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit ad6f2a010c2ce759936de4747f6e0d53991912f8)
    (cherry picked from commit 536910724d30a38eeecd14cdbe2c93c78ea67646)

 debug/Makefile    |  13 ++++---
 debug/tst-chk1.c  | 102 ++++++++++++++++++++++++++++++------------------------
 debug/tst-chk7.c  |   2 ++
 debug/tst-chk8.cc |   2 ++
 4 files changed, 69 insertions(+), 50 deletions(-)

commit b6e791ce32e4614c2896920f833a0b3a0508dc18
Author:     Siddhesh Poyarekar <siddhesh@sourceware.org>
AuthorDate: Wed Oct 20 18:12:41 2021 +0530
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Mar 26 20:55:45 2022 +0100

    Make sure that the fortified function conditionals are constant
    
    In _FORTIFY_SOURCE=3, the size expression may be non-constant,
    resulting in branches in the inline functions remaining intact and
    causing a tiny overhead.  Clang (and in future, gcc) make sure that
    the -1 case is always safe, i.e. any comparison of the generated
    expression with (size_t)-1 is always false so that bit is taken care
    of.  The rest is avoidable since we want the _chk variant whenever we
    have a size expression and it's not -1.
    
    Rework the conditionals in a uniform way to clearly indicate two
    conditions at compile time:
    
    - Either the size is unknown (-1) or we know at compile time that the
      operation length is less than the object size.  We can call the
      original function in this case.  It could be that either the length,
      object size or both are non-constant, but the compiler, through
      range analysis, is able to fold the *comparison* to a constant.
    
    - The size and length are known and the compiler can see at compile
      time that operation length > object size.  This is valid grounds for
      a warning at compile time, followed by emitting the _chk variant.
    
    For everything else, emit the _chk variant.
    
    This simplifies most of the fortified function implementations and at
    the same time, ensures that only one call from _chk or the regular
    function is emitted.
    
    Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit a643f60c53876be0d57b4b7373770e6cb356fd13)
    (cherry picked from commit 0e6ebf06e43e879d9efa2a1c79b2a55f81653663)

 io/bits/poll2.h       |  27 ++-----
 libio/bits/stdio2.h   | 106 ++++++++++--------------
 misc/sys/cdefs.h      |  47 +++++++++++
 posix/bits/unistd.h   | 174 +++++++++------------------------------
 socket/bits/socket2.h |  34 +++-----
 stdlib/bits/stdlib.h  |  57 ++++---------
 wcsmbs/bits/wchar2.h  | 219 ++++++++++++++------------------------------------
 7 files changed, 226 insertions(+), 438 deletions(-)

commit fbee91e305ef3545e966c691a21bfdea47172c39
Author:     Siddhesh Poyarekar <siddhesh@sourceware.org>
AuthorDate: Tue Oct 12 12:29:13 2021 +0530
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Mar 26 20:55:25 2022 +0100

    Don't add access size hints to fortifiable functions
    
    In the context of a function definition, the size hints imply that the
    size of an object pointed to by one parameter is another parameter.
    This doesn't make sense for the fortified versions of the functions
    since that's the bit it's trying to validate.
    
    This is harmless with __builtin_object_size since it has fairly simple
    semantics when it comes to objects passed as function parameters.
    With __builtin_dynamic_object_size we could (as my patchset for gcc[1]
    already does) use the access attribute to determine the object size in
    the general case but it misleads the fortified functions.
    
    Basically the problem occurs when access attributes are present on
    regular functions that have inline fortified definitions to generate
    _chk variants; the attributes get inherited by these definitions,
    causing problems when analyzing them.  For example with poll(fds, nfds,
    timeout), nfds is hinted using the __attr_access as being the size of
    fds.
    
    Now, when analyzing the inline function definition in bits/poll2.h, the
    compiler sees that nfds is the size of fds and tries to use that
    information in the function body.  In _FORTIFY_SOURCE=3 case, where the
    object size could be a non-constant expression, this information results
    in the conclusion that nfds is the size of fds, which defeats the
    purpose of the implementation because we're trying to check here if nfds
    does indeed represent the size of fds.  Hence for this case, it is best
    to not have the access attribute.
    
    With the attributes gone, the expression evaluation should get delayed
    until the function is actually inlined into its destinations.
    
    Disable the access attribute for fortified function inline functions
    when building at _FORTIFY_SOURCE=3 to make this work better.  The
    access attributes remain for the _chk variants since they can be used
    by the compiler to warn when the caller is passing invalid arguments.
    
    [1] https://gcc.gnu.org/pipermail/gcc-patches/2021-October/581125.html
    
    Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    (cherry picked from commit e938c02748402c50f60ba0eb983273e7b52937d1)
    (cherry picked from commit c82bdf033f93a710044e25f721340c26e89a3769)

 io/bits/poll2.h                |  4 ++--
 io/sys/poll.h                  |  6 +++---
 libio/bits/stdio2.h            |  4 ++--
 libio/stdio.h                  |  4 ++--
 misc/sys/cdefs.h               | 10 ++++++++++
 posix/unistd.h                 | 28 ++++++++++++++++------------
 stdlib/stdlib.h                |  5 +++--
 string/bits/string_fortified.h |  5 +++--
 string/string.h                |  2 +-
 9 files changed, 42 insertions(+), 26 deletions(-)

commit 875035f3df9fa7bf03239c52167fbd6a2d87f035
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Fri Mar 11 08:23:56 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Mar 26 20:55:04 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 54b12733959238204d7b0e46e69fc7f7d8890b20)

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

commit cd08c7554e2f5eee417a67e21c9b07bdbaf83d8d
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Fri Mar 11 08:23:56 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Mar 26 20:54:48 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 b53f0c11de409b04560a70570178d1a9d03d5860)

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

commit 77a3d38d535de822a4b78b922f869fece3e11425
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Mon Feb 28 11:50:41 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Mar 26 20:54:16 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 b5032c3d37aa614644c7afbad33bb8226a52e6da)

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

commit c69573d32ce399d03446b6b4b76b18848203718f
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: Sat Mar 26 20:51:46 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Mar 26 20:51:46 2022 +0100

    Revert "clone-internal.c: make clone3 syscall optional"
    
    This reverts commit 1f714c474eb248b3fa2c84f3b0f22cc509c0e6c9.

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

commit 81f6a812264e375a695e5b00e2906da8102cc9b6 (tag: gentoo/glibc-2.34-15)
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 01:59:53 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>

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

commit 91947ab808dfad401ca956705a6706b8b5d412a7
Author:     John David Anglin <danglin@gcc.gnu.org>
AuthorDate: Sun Mar 6 16:04:32 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Mar 7 01:35:07 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 6c9c2307657529e52c5fa7037618835f2a50b916)

 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 474ff9ed343ee4aa2608d3e63f825140e8d66443
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: Mon Mar 7 01:34:49 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 40fc6a74ee3dd600c84d311d91cbb16962f11a71)

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

commit cc257a82b88dd5b6d1792a45a09af2cefe93bba8
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: Mon Mar 7 01:34:31 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 f610d2935f041c5f41ddcb96924ea42ca2fb5ea5)

 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 7695772942d971c7c1c551b498c7d73fd6411efd
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: Mon Mar 7 01:34:13 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 c6f9085ee4e913a0b8260340ac7b75c426b780ce)

 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 3fcc096302835572a5377804b9409a792f42d504
Author:     John David Anglin <danglin@gcc.gnu.org>
AuthorDate: Sun Mar 6 15:56:57 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Mar 7 01:33:51 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.  Since l_main_map is not available
    in v2.34 and earlier, we use a new function, elf_machine_main_map,
    to find the main map.
    
    (cherry picked from commit 3be79b72d556e3ac37075ad6b99eb5eac18e1402)

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

commit 67e524c8887b7da71971626a45c86470e21856d1
Author:     Arjun Shankar <arjun@redhat.com>
AuthorDate: Thu Feb 24 21:43:09 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Mar 7 01:33:34 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 852361b5a32fafb1aafb6467c7c567063fd99d44)

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

commit a7161336e55bac0f01eef779c3a0a5c4d86b670f (tag: gentoo/glibc-2.34-14)
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Fri Feb 18 19:09:03 2022 -0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Feb 21 22:48:57 2022 +0100

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

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

commit 08d0325ce571eef8d2029c409903b70218897226
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 22:48:40 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 15b00d2af0e56dcc8c244a36d6872d301b0c7185)

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

commit 9abceed343cd8e8e559ef44f0cfc584c1fa0a5c4
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 22:48:21 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 d093b677c36ef4b360bf30483b68b95d9f0ad1d2)

 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 5a88fc18491bacc6501235d1e5ecbd491d0412ac
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 22:48:00 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 38e0d2479413ccdbc02b4c9e9e246eca31e956c9)

 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 b7acb371eb97b3e294824998f637a7cc4616a8e2
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:28:13 2022 +0100

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

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

commit 8643304defac85f460b38d2de593635bb036fc6a
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:42:29 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 04d60ce0f21ffe2a4add148cb37a1942dbad64e2)

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

commit 64c9c5e6acacb07ee41029568ee29a414e62bbb2
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:22:29 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 007e054d786be340699c634e3a3b30ab1fde1a7a)

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

commit 1bcdcd4fec9bfe2f1d3fef67a43825903f6a5f2b
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:40:58 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

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

commit 41a656387d50b98a214e59b4a940111aa8a06f57 (tag: gentoo/glibc-2.34-13)
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Thu Feb 3 17:48:46 2022 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Feb 4 20:50:52 2022 +0100

    Add reference to BZ#28860 on NEWS
    
    (cherry picked from commit d64b08d5ba7ffbc9155630f4843cf2e271b1629c)

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

commit 7ca227b5cf83f6c9864511e9c3284a1a13c1925d
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Thu Feb 3 16:52:52 2022 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Feb 4 20:50:32 2022 +0100

    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)
    
    (cherry picked from commit 0351c75c5f94134fcec0e778e8cf86d149f8bbfb)

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

commit 5198207f09ce461b5a85ca33077fa57de92728d1
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Mon Nov 22 14:41:14 2021 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Feb 4 20:50:12 2022 +0100

    socket: Do not use AF_NETLINK in __opensock
    
    It is not possible to use interface ioctls with netlink sockets
    on all Linux kernels.
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit 3d981795cd00cc9b73c3ee5087c308361acd62e5)
    (cherry picked from commit 6eaf10cbb78d22eae7999d9de55f6b93999e0860)

 socket/opensock.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

commit 7654babc1c0d66b4a9f7b2c7f36a9a0dd02141dd
Author:     Samuel Thibault <samuel.thibault@ens-lyon.org>
AuthorDate: Mon Oct 18 01:39:02 2021 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Feb 4 20:49:52 2022 +0100

    hurd if_index: Explicitly use AF_INET for if index discovery
    
    5bf07e1b3a74 ("Linux: Simplify __opensock and fix race condition [BZ #28353]")
    made __opensock try NETLINK then UNIX then INET. On the Hurd, only INET
    knows about network interfaces, so better actually specify that in
    if_index.
    
    (cherry picked from commit 1d3decee997ba2fc24af81803299b2f4f3c47063)
    (cherry picked from commit d8302ba2da1e5ac59a1c4dc1c1207a10fdafdb08)

 sysdeps/mach/hurd/if_index.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

commit 34ed29b8b4298782faa9fe1e03dee2d165aefd2b
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Tue Sep 28 18:55:49 2021 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Feb 4 20:44:35 2022 +0100

    Linux: Simplify __opensock and fix race condition [BZ #28353]
    
    AF_NETLINK support is not quite optional on modern Linux systems
    anymore, so it is likely that the first attempt will always succeed.
    Consequently, there is no need to cache the result.  Keep AF_UNIX
    and the Internet address families as a fallback, for the rare case
    that AF_NETLINK is missing.  The other address families previously
    probed are totally obsolete be now, so remove them.
    
    Use this simplified version as the generic implementation, disabling
    Netlink support as needed.
    
    (cherry picked from commit 5bf07e1b3a74232bfb8332275110be1a5da50f83)
    (cherry picked from commit ad615b59c78d6d37fee921fb2b2ae6b72c930625)

 NEWS                                    |   1 +
 socket/opensock.c                       |  65 ++++++------------
 sysdeps/unix/sysv/linux/opensock.c      | 114 --------------------------------
 sysdeps/unix/sysv/linux/s390/opensock.c |   2 -
 4 files changed, 23 insertions(+), 159 deletions(-)

commit 37fb80a40805582749b4874eae9e9ff07d4e1964
Author:     Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
AuthorDate: Tue Feb 1 22:39:02 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Feb 4 20:44:13 2022 +0100

    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)
    (cherry picked from commit 05c83ccaf50aef2dd30d92cbb814383f6bddea2c)

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

commit c3759f06ca18fe41c1fcac1f398fcfc4560001ae
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Sat Jan 29 05:22:31 2022 -0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Feb 4 20:43:54 2022 +0100

    tst-socket-timestamp-compat.c: Check __TIMESIZE [BZ #28837]
    
    time_t size is defined by __TIMESIZE, not __WORDSIZE.  Check __TIMESIZE,
    instead of __WORDSIZE, for time_t size.  This fixes BZ #28837.
    
    (cherry pick from commit 77a602ebb0769e7ccc5f9f8e06f7fffe66f69dfc)
    
    (cherry picked from commit 008003dc6e83439c5e04a744b7fd8197df19096e)

 sysdeps/unix/sysv/linux/tst-socket-timestamp-compat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 464d80f9fa6beb04d2e1be7538b2db282c5b6388
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Thu Jan 27 16:45:18 2022 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Feb 4 20:43:34 2022 +0100

    Linux: Only generate 64 bit timestamps for 64 bit time_t recvmsg/recvmmsg
    
    The timestamps created by __convert_scm_timestamps only make sense for
    64 bit time_t programs, 32 bit time_t programs will ignore 64 bit time_t
    timestamps since SO_TIMESTAMP will be defined to old values (either by
    glibc or kernel headers).
    
    Worse, if the buffer is not suffice MSG_CTRUNC is set to indicate it
    (which breaks some programs [1]).
    
    This patch makes only 64 bit time_t recvmsg and recvmmsg to call
    __convert_scm_timestamps.  Also, the assumption to called it is changed
    from __ASSUME_TIME64_SYSCALLS to __TIMESIZE != 64 since the setsockopt
    might be called by libraries built without __TIME_BITS=64.  The
    MSG_CTRUNC is only set for the 64 bit symbols, it should happen only
    if 64 bit time_t programs run older kernels.
    
    Checked on x86_64-linux-gnu and i686-linux-gnu.
    
    [1] https://github.com/systemd/systemd/pull/20567
    
    Reviewed-by: Florian Weimer <fweimer@redhat.com>
    
    (cherry picked from commit 948ce73b31fdb0860bcec4b8e62b14e88234f98a)
    (cherry picked from commit 489d0b8b32548bc569cd3067aebf98b030720753)

 include/sys/socket.h                               |  10 +-
 sysdeps/unix/sysv/linux/Makefile                   |  10 +-
 sysdeps/unix/sysv/linux/recvmmsg.c                 |  36 ++-
 sysdeps/unix/sysv/linux/recvmsg.c                  |  34 ++-
 .../linux/tst-socket-timestamp-compat-time64.c     |   1 +
 .../unix/sysv/linux/tst-socket-timestamp-compat.c  | 265 +++++++++++++++++++++
 6 files changed, 330 insertions(+), 26 deletions(-)

commit fef2e09f56b5be10f082188b95d12d3508ec05df
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Mon Jan 24 08:55:53 2022 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Feb 4 20:43:10 2022 +0100

    linux: Fix ancillary 64-bit time timestamp conversion (BZ #28349, BZ#28350)
    
    The __convert_scm_timestamps only updates the control message last
    pointer for SOL_SOCKET type, so if the message control buffer contains
    multiple ancillary message types the converted timestamp one might
    overwrite a valid message.
    
    The test checks if the extra ancillary space is correctly handled
    by recvmsg/recvmmsg, where if there is no extra space for the 64-bit
    time_t converted message the control buffer should be marked with
    MSG_TRUNC.  It also check if recvmsg/recvmmsg handle correctly multiple
    ancillary data.
    
    Checked on x86_64-linux and on i686-linux-gnu on both 5.11 and
    4.15 kernel.
    
    Co-authored-by: Fabian Vogt <fvogt@suse.de>
    
    Reviewed-by: Florian Weimer <fweimer@redhat.com>
    
    (cherry picked from commit 8fba672472ae0055387e9315fc2eddfa6775ca79)
    (cherry picked from commit e098446037da532d4a250efac9a813bc22f3669f)

 NEWS                                               |   3 +
 sysdeps/unix/sysv/linux/Makefile                   |   3 +
 sysdeps/unix/sysv/linux/convert_scm_timestamps.c   |  14 +-
 .../unix/sysv/linux/tst-socket-timestamp-time64.c  |   1 +
 sysdeps/unix/sysv/linux/tst-socket-timestamp.c     | 336 +++++++++++++++++++++
 5 files changed, 351 insertions(+), 6 deletions(-)

commit ab08ccbe7b4894f4eecbbcaf7102448ec903a3be
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Mon Dec 13 11:36:42 2021 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Feb 4 20:42:46 2022 +0100

    support: Add support_socket_so_timestamp_time64
    
    Check if the socket support 64-bit network packages timestamps
    (SO_TIMESTAMP and SO_TIMESTAMPNS).  This will be used on recvmsg
    and recvmmsg tests to check if the timestamp should be generated.
    
    Reviewed-by: Florian Weimer <fweimer@redhat.com>
    
    (cherry picked from 38bc0f4e78934aab455b31af05cefcbf3c22bece)
    
    (cherry picked from commit e09e7b1492b2d5c2f68ddf81f8f58e093dd4df6d)

 support/Makefile                             |  1 +
 support/support.h                            |  4 +++
 support/support_socket_so_timestamp_time64.c | 48 ++++++++++++++++++++++++++++
 3 files changed, 53 insertions(+)

commit 5ebc511315c16e5f8ab81f9b66f35a6df8b48409
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Mon Jan 24 19:33:43 2022 -0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Feb 4 20:42:28 2022 +0100

    x86: Use CHECK_FEATURE_PRESENT to check HLE [BZ #27398]
    
    HLE is disabled on blacklisted CPUs.  Use CHECK_FEATURE_PRESENT, instead
    of CHECK_FEATURE_ACTIVE, to check HLE.
    
    (cherry picked from commit 501246c5e2dfcc278f0ebbdb72345cdd239521c7)
    (cherry picked from commit aa601d024424c40ae9a69b0c4e394a70ea0570c8)

 sysdeps/x86/tst-cpu-features-supports.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 6f90ae440b87c488c8c647b73028bf56d7bd78bb
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Fri Jan 14 14:48:01 2022 -0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Feb 4 20:42:09 2022 +0100

    x86: Black list more Intel CPUs for TSX [BZ #27398]
    
    Disable TSX and enable RTM_ALWAYS_ABORT for Intel CPUs listed in:
    
    https://www.intel.com/content/www/us/en/support/articles/000059422/processors.html
    
    This fixes BZ #27398.
    
    Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
    (cherry picked from commit 1e000d3d33211d5a954300e2a69b90f93f18a1a1)
    (cherry picked from commit b952c25dc7adf0684c53ad72d1d667da0348c929)

 sysdeps/x86/cpu-features.c | 34 +++++++++++++++++++++++++++++++---
 1 file changed, 31 insertions(+), 3 deletions(-)

commit 29ef2913358710369229390fe50e763c4ae83ce0
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Thu Jan 27 16:03:58 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Jan 31 18:14:19 2022 +0100

    Fix glibc 2.34 ABI omission (missing GLIBC_2.34 in dynamic loader)
    
    The glibc 2.34 release really should have added a GLIBC_2.34
    symbol to the dynamic loader. With it, we could move functions such
    as dlopen or pthread_key_create that work on process-global state
    into the dynamic loader (once we have fixed a longstanding issue
    with static linking).  Without the GLIBC_2.34 symbol, yet another
    new symbol version would be needed because old glibc will fail to
    load binaries due to the missing symbol version in ld.so that newly
    linked programs will require.
    
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    (cherry picked from commit af121ae3e7cd12628c91ecfc46a9d65313a6e972)
    (cherry picked from commit 948ebc098ed3cd928ea10997f990115e7770bda3)

 elf/Makefile                                       |  1 +
 elf/Versions                                       |  3 ++
 elf/dl-compat.c                                    | 32 ++++++++++++++++++++++
 sysdeps/mach/hurd/i386/ld.abilist                  |  1 +
 sysdeps/unix/sysv/linux/aarch64/ld.abilist         |  1 +
 sysdeps/unix/sysv/linux/alpha/ld.abilist           |  1 +
 sysdeps/unix/sysv/linux/arc/ld.abilist             |  1 +
 sysdeps/unix/sysv/linux/arm/be/ld.abilist          |  1 +
 sysdeps/unix/sysv/linux/arm/le/ld.abilist          |  1 +
 sysdeps/unix/sysv/linux/csky/ld.abilist            |  1 +
 sysdeps/unix/sysv/linux/hppa/ld.abilist            |  1 +
 sysdeps/unix/sysv/linux/i386/ld.abilist            |  1 +
 sysdeps/unix/sysv/linux/ia64/ld.abilist            |  1 +
 sysdeps/unix/sysv/linux/m68k/coldfire/ld.abilist   |  1 +
 sysdeps/unix/sysv/linux/m68k/m680x0/ld.abilist     |  1 +
 sysdeps/unix/sysv/linux/microblaze/ld.abilist      |  1 +
 sysdeps/unix/sysv/linux/mips/mips32/ld.abilist     |  1 +
 sysdeps/unix/sysv/linux/mips/mips64/n32/ld.abilist |  1 +
 sysdeps/unix/sysv/linux/mips/mips64/n64/ld.abilist |  1 +
 sysdeps/unix/sysv/linux/nios2/ld.abilist           |  1 +
 .../unix/sysv/linux/powerpc/powerpc32/ld.abilist   |  1 +
 .../sysv/linux/powerpc/powerpc64/be/ld.abilist     |  1 +
 .../sysv/linux/powerpc/powerpc64/le/ld.abilist     |  1 +
 sysdeps/unix/sysv/linux/riscv/rv32/ld.abilist      |  1 +
 sysdeps/unix/sysv/linux/riscv/rv64/ld.abilist      |  1 +
 sysdeps/unix/sysv/linux/s390/s390-32/ld.abilist    |  1 +
 sysdeps/unix/sysv/linux/s390/s390-64/ld.abilist    |  1 +
 sysdeps/unix/sysv/linux/sh/be/ld.abilist           |  1 +
 sysdeps/unix/sysv/linux/sh/le/ld.abilist           |  1 +
 sysdeps/unix/sysv/linux/sparc/sparc32/ld.abilist   |  1 +
 sysdeps/unix/sysv/linux/sparc/sparc64/ld.abilist   |  1 +
 sysdeps/unix/sysv/linux/x86_64/64/ld.abilist       |  1 +
 sysdeps/unix/sysv/linux/x86_64/x32/ld.abilist      |  1 +
 33 files changed, 66 insertions(+)

commit fdd644b059028bac312ec9b4c61a99fb6ede1df0
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Fri Jan 14 20:16:05 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Jan 31 18:13:55 2022 +0100

    elf/Makefile: Reflow and sort most variable assignments
    
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    (cherry picked from commit 7de01e60c200c431d3469deb784da8fd4508fc15)
    (cherry picked from commit de6cdd68753ed126a3ecf105d98e8c0ee8cb6ec4)

 elf/Makefile | 388 +++++++++++++++++++++++++++++++++++++++++++++--------------
 1 file changed, 296 insertions(+), 92 deletions(-)

commit a8121758ca70dbd8eea89a8fc60067c3c9fb0059
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Tue Jan 4 06:58:34 2022 -0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Jan 31 18:13:35 2022 +0100

    elf: Add a comment after trailing backslashes
    
    (cherry picked from commit f4f70c2895e3d325188a42c10eb7bb4335be6773)
    (cherry picked from commit 511b244cc55074dc7f8476c39598d5d00811963e)

 elf/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

commit 549bda9e76c8f1025bdbb5f70238c7fe87c29f22
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Mon Dec 13 09:43:52 2021 -0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Jan 31 18:13:14 2022 +0100

    elf: Sort tests and modules-names
    
    Sort tests and modules-names to reduce future conflicts.
    
    (cherry picked from commit 28713c06129f8f64f88c423266e6ff2880216509)
    (cherry picked from commit 31186e2cb74b2403726060276512c39cc89a1478)

 elf/Makefile | 512 ++++++++++++++++++++++++++++++++++++++++++++---------------
 1 file changed, 385 insertions(+), 127 deletions(-)

commit 8112fa17bf917835fbcaea34b9e96c3974637369
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Wed Jan 26 20:20:43 2022 -0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Jan 27 13:11:57 2022 +0100

    NEWS: Add a bug entry for BZ #28755
    
    (cherry picked from commit 72123e1b56f53f9205bb105f8a62d0869b837b22)

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

commit a90511501b46cfde868a3d2df72f256f12310ffc
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Sun Jan 9 16:02:28 2022 -0600
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Jan 27 13:11:40 2022 +0100

    x86: Fix __wcsncmp_evex in strcmp-evex.S [BZ# 28755]
    
    Fixes [BZ# 28755] for wcsncmp by redirecting length >= 2^56 to
    __wcscmp_evex. For x86_64 this covers the entire address range so any
    length larger could not possibly be used to bound `s1` or `s2`.
    
    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 7e08db3359c86c94918feb33a1182cd0ff3bb10b)
    (cherry picked from commit 08beb3a3f4f46e306fffe184a08c5664bf0e13d6)

 sysdeps/x86_64/multiarch/strcmp-evex.S | 10 ++++++++++
 1 file changed, 10 insertions(+)

commit 387a523c2412d44e757d8ef400488ea0778e81f6
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Sun Jan 9 16:02:21 2022 -0600
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Jan 27 13:11:21 2022 +0100

    x86: Fix __wcsncmp_avx2 in strcmp-avx2.S [BZ# 28755]
    
    Fixes [BZ# 28755] for wcsncmp by redirecting length >= 2^56 to
    __wcscmp_avx2. For x86_64 this covers the entire address range so any
    length larger could not possibly be used to bound `s1` or `s2`.
    
    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 ddf0992cf57a93200e0c782e2a94d0733a5a0b87)
    (cherry picked from commit b50d5b746cc0af5ad52164dcb0d3628f08b05a0d)

 sysdeps/x86_64/multiarch/strcmp-avx2.S | 10 ++++++++++
 1 file changed, 10 insertions(+)

commit 46c93b257006543c1b334c4dbb9825185a1e1d85
Author:     Aurelien Jarno <aurelien@aurel32.net>
AuthorDate: Mon Jan 24 23:45:03 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Jan 27 13:11:06 2022 +0100

    NEWS: add bug entry for BZ #28769 and BZ #28770
    
    (cherry picked from commit 1b9cd6a7214db1812a20eb3591cf42f9190a5d1a)

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

commit 8af77168416d39b638c360a00cf742ca3cf7617e (tag: gentoo/glibc-2.34-12)
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Mon Jan 24 18:14:24 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Jan 24 19:28:19 2022 +0100

    Linux: Detect user namespace support in io/tst-getcwd-smallbuff
    
    Otherwise the test fails with certain container runtimes.
    
    Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    (cherry picked from commit 5b8e7980c5dabd9aaefeba4f0208baa8cf7653ee)
    (cherry picked from commit 3438bbca90895d32825a52e31a77dc44d273c1c1)

 sysdeps/unix/sysv/linux/tst-getcwd-smallbuff.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

commit b6a3cc79651a3f939c8f066858917550ba20e57e
Author:     Siddhesh Poyarekar <siddhesh@sourceware.org>
AuthorDate: Mon Jan 24 21:36:41 2022 +0530
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Jan 24 19:28:02 2022 +0100

    realpath: Avoid overwriting preexisting error (CVE-2021-3998)
    
    Set errno and failure for paths that are too long only if no other error
    occurred earlier.
    
    Related: BZ #28770
    
    Reviewed-by: Andreas Schwab <schwab@linux-m68k.org>
    Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    (cherry picked from commit 84d2d0fe20bdf94feed82b21b4d7d136db471f03)
    (cherry picked from commit d084965adc7baa8ea804427cccf973cea556d697)

 stdlib/canonicalize.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit b875808c48017800e42ab36115151a2a8f2c2ba3
Author:     Siddhesh Poyarekar <siddhesh@sourceware.org>
AuthorDate: Fri Jan 21 23:32:56 2022 +0530
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Jan 24 19:27:40 2022 +0100

    getcwd: Set errno to ERANGE for size == 1 (CVE-2021-3999)
    
    No valid path returned by getcwd would fit into 1 byte, so reject the
    size early and return NULL with errno set to ERANGE.  This change is
    prompted by CVE-2021-3999, which describes a single byte buffer
    underflow and overflow when all of the following conditions are met:
    
    - The buffer size (i.e. the second argument of getcwd) is 1 byte
    - The current working directory is too long
    - '/' is also mounted on the current working directory
    
    Sequence of events:
    
    - In sysdeps/unix/sysv/linux/getcwd.c, the syscall returns ENAMETOOLONG
      because the linux kernel checks for name length before it checks
      buffer size
    
    - The code falls back to the generic getcwd in sysdeps/posix
    
    - In the generic func, the buf[0] is set to '\0' on line 250
    
    - this while loop on line 262 is bypassed:
    
        while (!(thisdev == rootdev && thisino == rootino))
    
      since the rootfs (/) is bind mounted onto the directory and the flow
      goes on to line 449, where it puts a '/' in the byte before the
      buffer.
    
    - Finally on line 458, it moves 2 bytes (the underflowed byte and the
      '\0') to the buf[0] and buf[1], resulting in a 1 byte buffer overflow.
    
    - buf is returned on line 469 and errno is not set.
    
    This resolves BZ #28769.
    
    Reviewed-by: Andreas Schwab <schwab@linux-m68k.org>
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    Signed-off-by: Qualys Security Advisory <qsa@qualys.com>
    Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    (cherry picked from commit 23e0e8f5f1fb5ed150253d986ecccdc90c2dcd5e)
    (cherry picked from commit 472e799a5f2102bc0c3206dbd5a801765fceb39c)

 NEWS                                           |   6 +
 sysdeps/posix/getcwd.c                         |   7 +
 sysdeps/unix/sysv/linux/Makefile               |   7 +-
 sysdeps/unix/sysv/linux/tst-getcwd-smallbuff.c | 241 +++++++++++++++++++++++++
 4 files changed, 260 insertions(+), 1 deletion(-)

commit 35e6cec1fddd18facc301f98969ff12918475b2d
Author:     Siddhesh Poyarekar <siddhesh@sourceware.org>
AuthorDate: Mon Jan 24 10:57:09 2022 +0530
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Jan 24 19:27:16 2022 +0100

    tst-realpath-toolong: Fix hurd build
    
    Define PATH_MAX to a constant if it isn't already defined, like in hurd.
    
    Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    (cherry picked from commit 976db046bc3a3738f69255ae00b0a09b8e77fd9c)
    (cherry picked from commit 8c8a71c85f2ed5cc90d08d82ce645513fc907cb6)

 stdlib/tst-realpath-toolong.c | 4 ++++
 1 file changed, 4 insertions(+)

commit 1c17a1d909b9b4b92b1c2f17ab3e2b8f6f28bba7
Author:     Siddhesh Poyarekar <siddhesh@sourceware.org>
AuthorDate: Thu Jan 13 11:28:36 2022 +0530
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Jan 24 19:26:58 2022 +0100

    realpath: Set errno to ENAMETOOLONG for result larger than PATH_MAX [BZ #28770]
    
    realpath returns an allocated string when the result exceeds PATH_MAX,
    which is unexpected when its second argument is not NULL.  This results
    in the second argument (resolved) being uninitialized and also results
    in a memory leak since the caller expects resolved to be the same as the
    returned value.
    
    Return NULL and set errno to ENAMETOOLONG if the result exceeds
    PATH_MAX.  This fixes [BZ #28770], which is CVE-2021-3998.
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    (cherry picked from commit ee8d5e33adb284601c00c94687bc907e10aec9bb)
    (cherry picked from commit f7a79879c0b2bef0dadd6caaaeeb0d26423e04e5)

 NEWS                          |  4 ++++
 stdlib/Makefile               |  1 +
 stdlib/canonicalize.c         | 12 +++++++++--
 stdlib/tst-realpath-toolong.c | 49 +++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 64 insertions(+), 2 deletions(-)

commit fa1904e5843922591399266dd8799eee48c669ab
Author:     Siddhesh Poyarekar <siddhesh@sourceware.org>
AuthorDate: Thu Jan 13 18:50:55 2022 +0530
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Jan 24 19:26:40 2022 +0100

    stdlib: Fix formatting of tests list in Makefile
    
    Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    Reviewed-by: Florian Weimer <fweimer@redhat.com>
    (cherry picked from commit f9dab1b5f23d0fb008a56c7c6c8919adb49d3611)
    (cherry picked from commit 73c362840c4efde45125a6c27bf41726397f4038)

 stdlib/Makefile | 152 ++++++++++++++++++++++++++++----------------------------
 1 file changed, 77 insertions(+), 75 deletions(-)

commit e3e31da7a7bc5b5033fe5e5d037271a36512e33d
Author:     Siddhesh Poyarekar <siddhesh@sourceware.org>
AuthorDate: Thu Jan 13 10:34:37 2022 +0530
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Jan 24 19:26:23 2022 +0100

    stdlib: Sort tests in Makefile
    
    Put one test per line and sort them.
    
    Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    (cherry picked from commit 5b766603efa727c236a5f0cdcf09b71ff60b7584)
    (cherry picked from commit 269eb9d930546ce57e83b56c44c430f154684a23)

 stdlib/Makefile | 99 +++++++++++++++++++++++++++++++++++++++++++--------------
 1 file changed, 75 insertions(+), 24 deletions(-)

commit 214838d2a233f999676c984d5869578d8b524b63
Author:     Siddhesh Poyarekar <siddhesh@sourceware.org>
AuthorDate: Tue Jan 18 13:29:36 2022 +0530
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Jan 24 19:26:05 2022 +0100

    support: Add helpers to create paths longer than PATH_MAX
    
    Add new helpers support_create_and_chdir_toolong_temp_directory and
    support_chdir_toolong_temp_directory to create and descend into
    directory trees longer than PATH_MAX.
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    (cherry picked from commit fb7bff12e81c677a6622f724edd4d4987dd9d971)
    (cherry picked from commit 062ff490c1467059f6cd64bb9c3d85f6cc6cf97a)

 support/temp_file.c | 161 ++++++++++++++++++++++++++++++++++++++++++++++++----
 support/temp_file.h |   9 +++
 2 files changed, 160 insertions(+), 10 deletions(-)

commit 19a41f288a72147bd726062fb59d704684a9b6ee
Author:     Paul A. Clarke <pc@us.ibm.com>
AuthorDate: Sat Sep 25 09:57:15 2021 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Jan 24 19:25:44 2022 +0100

    powerpc: Fix unrecognized instruction errors with recent binutils
    
    Recent versions of binutils (with commit
    b25f942e18d6ecd7ec3e2d2e9930eb4f996c258a) stopped preserving "sticky"
    options across a base `.machine` directive, nullifying the use of
    passing "-many" through GCC to the assembler.  As a result, some
    instructions which were recognized even under older, more stringent
    `.machine` directives become unrecognized instructions in that
    context.
    
    In `sysdeps/powerpc/tst-set_ppr.c`, the use of the `mfppr32` extended
    mnemonic became unrecognized, as the default compilation with GCC for
    32bit powerpc adds a `.machine ppc` in the resulting assembly, so the
    command line option `-Wa,-many` is essentially ignored, and the ISA 2.06
    instructions and mnemonics, like `mfppr32`, are unrecognized.
    
    The compilation of `sysdeps/powerpc/tst-set_ppr.c` fails with:
    Error: unrecognized opcode: `mfppr32'
    
    Add appropriate `.machine` directives in the assembly to bracket the
    `mfppr32` instruction.
    
    Part of a 2019 fix (commit 9250e6610fdb0f3a6f238d2813e319a41fb7a810) to
    the above test's Makefile to add `-many` to the compilation when GCC
    itself stopped passing `-many` to the assember no longer has any effect,
    so remove that.
    
    Reported-by: Joseph Myers <joseph@codesourcery.com>
    (cherry picked from commit ee874f44fd55988808a4a162ef21bfa2cc8dc6f7)
    (cherry picked from commit 82b1acd9de9796298a230d7484f26fe9a7756d18)

 sysdeps/powerpc/Makefile      | 5 -----
 sysdeps/powerpc/tst-set_ppr.c | 3 ++-
 2 files changed, 2 insertions(+), 6 deletions(-)

commit 9367b8380423647bf71924f70bc6c93b0250f9a7
Author:     Aurelien Jarno <aurelien@aurel32.net>
AuthorDate: Mon Jan 17 19:41:40 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Jan 24 19:25:21 2022 +0100

    x86: use default cache size if it cannot be determined [BZ #28784]
    
    In some cases (e.g QEMU, non-Intel/AMD CPU) the cache information can
    not be retrieved and the corresponding values are set to 0.
    
    Commit 2d651eb9265d ("x86: Move x86 processor cache info to
    cpu_features") changed the behaviour in such case by defining the
    __x86_shared_cache_size and __x86_data_cache_size variables to 0 instead
    of using the default values. This cause an issue with the i686 SSE2
    optimized bzero/routine which assumes that the cache size is at least
    128 bytes, and otherwise tries to zero/set the whole address space minus
    128 bytes.
    
    Fix that by restoring the original code to only update
    __x86_shared_cache_size and __x86_data_cache_size variables if the
    corresponding cache sizes are not zero.
    
    Fixes bug 28784
    Fixes commit 2d651eb9265d
    
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    (cherry picked from commit c242fcce06e3102ca663b2f992611d0bda4f2668)
    (cherry picked from commit 1d401d1fccb85046402089268b94d86d822070e6)

 NEWS                    |  1 +
 sysdeps/x86/cacheinfo.h | 14 ++++++++++----
 2 files changed, 11 insertions(+), 4 deletions(-)

commit 3281e60f122ec19224d9a2266307f79d81ac5377
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Mon Jan 17 11:49:25 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Jan 24 19:25:00 2022 +0100

    CVE-2022-23218: Buffer overflow in sunrpc svcunix_create (bug 28768)
    
    The sunrpc function svcunix_create suffers from a stack-based buffer
    overflow with overlong pathname arguments.
    
    Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    (cherry picked from commit f545ad4928fa1f27a3075265182b38a4f939a5f7)
    (cherry picked from commit 6890b8a3ae40ab9d4c96024ab95b04816fcc8a4a)

 NEWS                  |  4 ++++
 sunrpc/Makefile       |  2 +-
 sunrpc/svc_unix.c     | 11 ++++-------
 sunrpc/tst-bug28768.c | 42 ++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 51 insertions(+), 8 deletions(-)

commit e2bdcb0c97fa4bc6b5f2689c91a46b3ddaf754de
Author:     Martin Sebor <msebor@redhat.com>
AuthorDate: Mon Jan 17 10:21:34 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Jan 24 19:24:43 2022 +0100

    sunrpc: Test case for clnt_create "unix" buffer overflow (bug 22542)
    
    Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    (cherry picked from commit ef972a4c50014a16132b5c75571cfb6b30bef136)
    (cherry picked from commit 1081f1d3dd7c84ba3416b5198d47a4df2b70185d)

 sunrpc/Makefile       |  5 ++++-
 sunrpc/tst-bug22542.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+), 1 deletion(-)

commit e1d92af736d563064ecf188b0999e228746fca3e
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Mon Jan 17 10:21:34 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Jan 24 19:24:20 2022 +0100

    CVE-2022-23219: Buffer overflow in sunrpc clnt_create for "unix" (bug 22542)
    
    Processing an overlong pathname in the sunrpc clnt_create function
    results in a stack-based buffer overflow.
    
    Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    (cherry picked from commit 226b46770c82899b555986583294b049c6ec9b40)
    (cherry picked from commit 7b5d433fd097b8ed74e458eca33597290e07b974)

 NEWS              |  6 ++++++
 sunrpc/clnt_gen.c | 10 +++++++---
 2 files changed, 13 insertions(+), 3 deletions(-)

commit 970d0b06c81dd591b004d999f4a8b335faac5467
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Mon Jan 17 10:21:34 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Jan 24 19:23:00 2022 +0100

    socket: Add the __sockaddr_un_set function
    
    Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    (cherry picked from commit e368b12f6c16b6888dda99ba641e999b9c9643c8)
    (cherry picked from commit 5575daae5099e779bb860b566b4d608418a5b832)

 include/sys/un.h             | 12 +++++++++
 socket/Makefile              |  6 ++++-
 socket/sockaddr_un_set.c     | 41 +++++++++++++++++++++++++++++
 socket/tst-sockaddr_un_set.c | 62 ++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 120 insertions(+), 1 deletion(-)

commit f550f4f9a6fb80fcba3d43ef48afac0ad9ca38b1
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Sun Jan 9 09:06:15 2022 -0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Jan 24 19:22:42 2022 +0100

    Disable debuginfod in printer tests [BZ #28757]
    
    With gdb-11.1-6.fc35.x86_64, I got
    
    FAIL: nptl/test-cond-printers
    FAIL: nptl/test-condattr-printers
    FAIL: nptl/test-mutex-printers
    FAIL: nptl/test-mutexattr-printers
    FAIL: nptl/test-rwlock-printers
    FAIL: nptl/test-rwlockattr-printers
    
    $ cat nptl/test-condattr-printers.out
    Error: Response does not match the expected pattern.
    Command: start
    Expected pattern: main
    Response:  Temporary breakpoint 1 at 0x11d5: file test-condattr-printers.c, line 43.
    Starting program: /export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/nptl/test-condattr-printers
    
    This GDB supports auto-downloading debuginfo from the following URLs:
    https://debuginfod.fedoraproject.org/
    Enable debuginfod for this session? (y or [n])
    
    Disable debuginfod to avoid GDB messages.  This fixes BZ #28757.
    
    Reviewed-by: Florian Weimer <fweimer@redhat.com>
    (cherry picked from commit 7de501f9418bf099e7104b63b0e4423257981b14)
    (cherry picked from commit 03e6e02e6a216cfb913f49b3be80d5088603864f)

 scripts/test_printers_common.py | 11 +++++++++++
 1 file changed, 11 insertions(+)

commit 8d989cc105922f4dfd4318bb0434742fcf890870
Author:     Joseph Myers <joseph@codesourcery.com>
AuthorDate: Thu Jan 13 22:18:13 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Jan 24 19:22:19 2022 +0100

    Update syscall lists for Linux 5.16
    
    Linux 5.16 has one new syscall, futex_waitv.  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 4997a533ae4b51ef66a6b68862b7578a7acb82df)
    (cherry picked from commit 705f1e4606aa78f4e861b4e3346725bf5f083a56)

 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/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 +
 26 files changed, 28 insertions(+), 2 deletions(-)

commit 95e542150f0feb8ddb778bd93235edd315059e99
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Thu Jan 13 14:59:29 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Jan 13 22:49:32 2022 +0100

    i386: Remove broken CAN_USE_REGISTER_ASM_EBP (bug 28771)
    
    The configure check for CAN_USE_REGISTER_ASM_EBP tried to compile a
    simple function that uses %ebp as an inline assembly operand.  If
    compilation failed, CAN_USE_REGISTER_ASM_EBP was set 0, which
    eventually had these consequences:
    
    (1) %ebx was avoided as an inline assembly operand, with an
        assembler macro hack to avoid unnecessary register moves.
    (2) %ebp was avoided as an inline assembly operand, using an
        out-of-line syscall function for 6-argument system calls.
    
    (1) is no longer needed for any GCC version that is supported for
    building glibc.  %ebx can be used directly as a register operand.
    Therefore, this commit removes the %ebx avoidance completely.  This
    avoids the assembler macro hack, which turns out to be incompatible
    with the current Systemtap probe macros (which switch to .altmacro
    unconditionally).
    
    (2) is still needed in many build configurations.  The existing
    configure check cannot really capture that because the simple function
    succeeds to compile, while the full glibc build still fails.
    Therefore, this commit removes the check, the CAN_USE_REGISTER_ASM_EBP
    macro, and uses the out-of-line syscall function for 6-argument system
    calls unconditionally.
    
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    (cherry picked from commit a78e6a10d0b50d0ca80309775980fc99944b1727)
    (cherry picked from commit 2fe2af88abd13ae5636881da2e26f461ecb7dfb5)

 NEWS                                      |   1 +
 config.h.in                               |   4 -
 sysdeps/unix/sysv/linux/i386/configure    |  39 ------
 sysdeps/unix/sysv/linux/i386/configure.ac |  17 ---
 sysdeps/unix/sysv/linux/i386/sysdep.h     | 222 ++++--------------------------
 5 files changed, 28 insertions(+), 255 deletions(-)

commit b1b00cce23535d838606afcef47e0a32f01bf681
Author:     Joseph Myers <joseph@codesourcery.com>
AuthorDate: Wed Nov 10 15:21:19 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Jan 13 22:49:11 2022 +0100

    Update syscall lists for Linux 5.15
    
    Linux 5.15 has one new syscall, process_mrelease (and also enables the
    clone3 syscall for RV32).  It also has a macro __NR_SYSCALL_MASK for
    Arm, which is not a syscall but matches the pattern used for syscall
    macro names.
    
    Add __NR_SYSCALL_MASK to the names filtered out in the code dealing
    with syscall lists, update syscall-names.list for the new syscall and
    regenerate the arch-syscall.h headers with build-many-glibcs.py
    update-syscalls.
    
    Tested with build-many-glibcs.py.
    
    (cherry picked from commit 3387c40a8bbad5faf85b1feb56429cb20feaa640)
    (cherry picked from commit 73558ffe841cf4c60ccb4c71cf6dcebf84f2b736)

 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/filter-nr-syscalls.awk           | 2 +-
 sysdeps/unix/sysv/linux/glibcsyscalls.py                 | 2 +-
 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/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        | 2 ++
 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 +
 28 files changed, 31 insertions(+), 4 deletions(-)

commit c53b6f224e09280a6986761fd8686456c3d2d5d4
Author:     Paul A. Clarke <pc@us.ibm.com>
AuthorDate: Tue Sep 14 13:13:33 2021 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Jan 13 22:48:49 2022 +0100

    powerpc: Fix unrecognized instruction errors with recent GCC
    
    Recent binutils commit b25f942e18d6ecd7ec3e2d2e9930eb4f996c258a
    changes the behavior of `.machine` directives to override, rather
    than augment, the base CPU. This can result in _reduced_ functionality
    when, for example, compiling for default machine "power8", but explicitly
    asking for ".machine power5", which loses Altivec instructions.
    
    In tst-ucontext-ppc64-vscr.c, while the instructions provoking the new
    error messages are bracketed by ".machine power5", which is ostensibly
    Power ISA 2.03 (POWER5), the POWER5 processor did not support the
    VSX subset, so these instructions are not recognized as "power5".
    
    Error: unrecognized opcode: `vspltisb'
    Error: unrecognized opcode: `vpkuwus'
    Error: unrecognized opcode: `mfvscr'
    Error: unrecognized opcode: `stvx'
    
    Manually adding the VSX subset via ".machine altivec" is sufficient.
    
    Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
    (cherry picked from commit 064b475a2e5662b6b3973fabf505eade86e61510)
    (cherry picked from commit e64235ff4266e87b20505101877fe57350ab69ab)

 sysdeps/powerpc/powerpc64/tst-ucontext-ppc64-vscr.c | 1 +
 1 file changed, 1 insertion(+)

commit 5bb617d70ea1ac1b58c282b86f057f9e25841f51
Author:     Hans-Peter Nilsson <hp@axis.com>
AuthorDate: Fri Dec 17 21:45:54 2021 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Jan 13 22:48:28 2022 +0100

    timezone: test-case for BZ #28707
    
    This test-case is the tzfile for Asuncion generated by
    tzlib-2021e as follows, using the tzlib-2021e zic: "zic -d
    DEST -r @1546300800 -L /dev/null -b slim
    SOURCE/southamerica".  Note that in its type 2 header, it
    has two entries in its "time-types" array (types), but only
    one entry in its "transition types" array (type_idxs).
    
            * timezone/Makefile, timezone/tst-pr28707.c,
            timezone/testdata/gen-XT5.sh: New test.
    
    Co-authored-by: Christopher Wong <Christopher.Wong@axis.com>
    (cherry picked from commit ebe899af0dc3215159a9c896ac6f35b72a18cb6e)
    (cherry picked from commit d5ba02f67dd62a63e29c29eebd6c543722aa6b5b)

 timezone/Makefile            |  8 +++++++-
 timezone/testdata/gen-XT5.sh | 16 +++++++++++++++
 timezone/tst-bz28707.c       | 46 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 69 insertions(+), 1 deletion(-)

commit 686ac7bf10e0e69177e2c624349a696f5beaa01c
Author:     Hans-Peter Nilsson <hp@axis.com>
AuthorDate: Fri Dec 17 21:38:00 2021 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Jan 13 22:48:00 2022 +0100

    timezone: handle truncated timezones from tzcode-2021d and later (BZ #28707)
    
    When using a timezone file with a truncated starting time,
    generated by the zic in IANA tzcode-2021d a.k.a. tzlib-2021d
    (also in tzlib-2021e; current as of this writing), glibc
    asserts in __tzfile_read (on e.g. tzset() for this file) and
    you may find lines matching "tzfile.c:435: __tzfile_read:
    Assertion `num_types == 1' failed" in your syslog.
    
    One example of such a file is the tzfile for Asuncion
    generated by tzlib-2021e as follows, using the tzlib-2021e zic:
    "zic -d DEST -r @1546300800 -L /dev/null -b slim
    SOURCE/southamerica".  Note that in its type 2 header, it has
    two entries in its "time-types" array (types), but only one
    entry in its "transition types" array (type_idxs).
    
    This is valid and expected already in the published RFC8536, and
    not even frowned upon: "Local time for timestamps before the
    first transition is specified by the first time type (time type
    0)" ... "every nonzero local time type index SHOULD appear at
    least once in the transition type array".  Note the "nonzero ...
    index".  Until the 2021d zic, index 0 has been shared by the
    first valid transition but with 2021d it's separate, set apart
    as a placeholder and only "implicitly" indexed.  (A draft update
    of the RFC mandates that the entry at index 0 is a placeholder
    in this case, hence can no longer be shared.)
    
            * time/tzfile.c (__tzfile_read): Don't assert when no transitions
            are found.
    
    Co-authored-by: Christopher Wong <Christopher.Wong@axis.com>
    (cherry picked from commit c36f64aa6dff13b12a1e03a185e75a50fa9f6a4c)
    (cherry picked from commit 85b24f9694e21f1d2f2d8b80d3bf690687723347)

 NEWS          | 1 +
 time/tzfile.c | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

commit 53d5e983b68300af2f11c4c798f8bf852e811a9f
Author:     Paul Eggert <eggert@cs.ucla.edu>
AuthorDate: Mon Sep 13 22:49:45 2021 -0700
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Jan 13 22:47:13 2022 +0100

    Fix subscript error with odd TZif file [BZ #28338]
    
    * time/tzfile.c (__tzfile_compute): Fix unlikely off-by-one bug
    that accessed before start of an array when an oddball-but-valid
    TZif file was queried with an unusual time_t value.
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit 645277434a42efc547d2cac8bfede4da10b4049f)
    (cherry picked from commit 515a6f53cd984d5e6e374fbee52772f967fc3c73)

 NEWS          | 3 ++-
 time/tzfile.c | 3 +--
 2 files changed, 3 insertions(+), 3 deletions(-)

commit dd5ad7b577e0172784c5a677e81267ca0e0a82d8
Author:     Wilco Dijkstra <wdijkstr@arm.com>
AuthorDate: Thu Jan 6 14:36:28 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Jan 13 22:46:36 2022 +0100

    AArch64: Check for SVE in ifuncs [BZ #28744]
    
    Add a check for SVE in the A64FX ifuncs for memcpy, memset and memmove.
    This fixes BZ #28744.
    
    (cherry picked from commit e5fa62b8db546f8792ec9e5c61e6419f4f8e3f4d)
    (cherry picked from commit 217b84127b3a6590afcc7e198e6c3f665935e8f4)

 NEWS                                | 1 +
 sysdeps/aarch64/multiarch/memcpy.c  | 2 +-
 sysdeps/aarch64/multiarch/memmove.c | 2 +-
 sysdeps/aarch64/multiarch/memset.c  | 2 +-
 4 files changed, 4 insertions(+), 3 deletions(-)

commit 89506bcdd4b9a5d9f3b8abfb983b6f3201113e1a (tag: gentoo/glibc-2.34-11)
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: Wed Jan 12 22:22:15 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Jan 12 22:22:15 2022 +0100

    Bring onto exact state as azanella's revised patchset
    
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 NEWS                             | 1 +
 sysdeps/unix/sysv/linux/Makefile | 5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

commit fc24fb7c47dbe4e279a3853ee6eff6565348ca47 (tag: gentoo/glibc-2.34-10)
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: Wed Jan 5 22:11:49 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Jan 5 22:11:49 2022 +0100

    Build fix (no double __THROW)
    
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 dirent/dirent.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit b32d182b5e50f5400de15c5295d01e1258f765a0 (tag: gentoo/glibc-2.34-9)
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: Tue Jan 4 12:02:46 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                             |  5 +++++
 dirent/dirent.h                  | 14 ++++++++++----
 sysdeps/unix/sysv/linux/Makefile |  3 +++
 3 files changed, 18 insertions(+), 4 deletions(-)

commit 07e349af3346d98bc796a549fa3644f9d56af702
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: Tue Jan 4 12:02:43 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 f2408e4601c85239751f7fc1821e69b4a231015e
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: Tue Jan 4 12:02:40 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 4d295ddf75cdf53bdd0efe679a04c17923a8f292
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: Tue Jan 4 12:02:37 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 8bdfb147aa546cc5693cf43658b4c7bf142e63fa
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: Tue Jan 4 12:02:34 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 54c353aa95e04a603686d13fcfa4d7c037b95b62
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: Tue Jan 4 12:02:31 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 240e1616bd89128c579fc598ebf0b42291a36da4
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: Tue Jan 4 12:02:28 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 442ad078f7911806796c3ac2b9a32b0209825918
Author:     Andrea Monaco <andrea.monaco@autistici.org>
AuthorDate: Sun Dec 12 10:24:28 2021 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Jan 2 23:02:50 2022 +0100

    intl/plural.y: Avoid conflicting declarations of yyerror and yylex
    
    bison-3.8 includes these lines in the generated intl/plural.c:
    
      #if !defined __gettexterror && !defined YYERROR_IS_DECLARED
      void __gettexterror (struct parse_args *arg, const char *msg);
      #endif
      #if !defined __gettextlex && !defined YYLEX_IS_DECLARED
      int __gettextlex (YYSTYPE *yylvalp, struct parse_args *arg);
      #endif
    
    Those default prototypes provided by bison conflict with the
    declarations later on in plural.y.  This patch solves the issue.
    
    Reviewed-by: Arjun Shankar <arjun@redhat.com>
    (cherry picked from commit c6d7d6312c21bbcfb236d48bb7c11cedb234389f)
    (cherry picked from commit 41fddc064ded5c9a36d8ffaad59a85407a22a535)

 intl/plural.y | 5 +++++
 1 file changed, 5 insertions(+)

commit b130e7c0159b8518eb751e4c23e44ce7d883fabd
Author:     maminjie <maminjie2@huawei.com>
AuthorDate: Mon Dec 20 19:36:32 2021 +0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Jan 2 23:02:29 2022 +0100

    Linux: Fix 32-bit vDSO for clock_gettime on powerpc32
    
    When the clock_id is CLOCK_PROCESS_CPUTIME_ID or CLOCK_THREAD_CPUTIME_ID,
    on the 5.10 kernel powerpc 32-bit, the 32-bit vDSO is executed successfully (
    because the __kernel_clock_gettime in arch/powerpc/kernel/vdso32/gettimeofday.S
    does not support these two IDs, the 32-bit time_t syscall will be used),
    but tp32.tv_sec is equal to 0, causing the 64-bit time_t syscall to continue to be used,
    resulting in two system calls.
    
    Fix commit 72e84d1db22203e01a43268de71ea8669eca2863.
    
    Signed-off-by: maminjie  <maminjie2@huawei.com>
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    
    (cherry picked from commit e0fc721ce600038dd390e77cfe52440707ef574d)
    (cherry picked from commit 8ad6d6d8ed33631bd2ca5d1112e6da2f92731432)

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

commit b9bf80cfbdf399e3d84943318a89e625426515d1
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Wed Aug 4 21:34:12 2021 +0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Jan 2 23:02:10 2022 +0100

    linux: Add sparck brk implementation
    
    It turned that the generic implementation of brk() does not work
    for sparc, since on failure kernel will just return the previous
    input value without setting the conditional register.
    
    This patches adds back a sparc32 and sparc64 implementation removed
    by 720480934ab9107.
    
    Checked on sparc64-linux-gnu and sparcv9-linux-gnu.
    
    (cherry picked from commit 5b86241a032c50462988bdd1439e078384690d34)
    (cherry picked from commit 1d9764aba8c00754fbf8299e48afbe222245ee3e)

 sysdeps/unix/sysv/linux/sparc/brk.c | 58 +++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

commit ba090b230b96adebf8fa40ec1d9f6284d76cbc4d
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Wed Aug 4 21:40:32 2021 +0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Jan 2 23:01:55 2022 +0100

    Update sparc libm-test-ulps
    
    (cherry picked from commit c52eb066bc634a79e4194457362384abe5b43b3a)
    (cherry picked from commit e94544c82f4ac37017589d8d83156d72388fc4af)

 sysdeps/sparc/fpu/libm-test-ulps | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 66ad518a3d2d8538a66a309b144c22c312b30fa4
Author:     John David Anglin <danglin@gcc.gnu.org>
AuthorDate: Mon Sep 6 17:37:29 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Jan 2 23:01:40 2022 +0100

    Update hppa libm-test-ulps
    
    (cherry picked from commit d8cf84ac7e504663dfeb2bb45d8d48ae81effe05)
    (cherry picked from commit 4029747c592cb2d59805b3a4e7a8963fcdcdbeb1)

 sysdeps/hppa/fpu/libm-test-ulps | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 0365b1a9cb0fe51e3fd2aa25d787675a3e4e5e6c
Author:     Aurelien Jarno <aurelien@aurel32.net>
AuthorDate: Thu Dec 16 00:06:28 2021 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Jan 2 23:01:24 2022 +0100

    riscv: align stack before calling _dl_init [BZ #28703]
    
    Align the stack pointer to 128 bits during the call to _dl_init() as
    specified by the RISC-V ABI [1]. This fixes the elf/tst-align2 test.
    
    Fixes bug 28703.
    
    [1] https://github.com/riscv-non-isa/riscv-elf-psabi-doc
    
    (cherry picked from commit 225da459cebef1037dcd78b56471edc0721e1c41)
    (cherry picked from commit aa3a97496c82a8443039248ebee650322c9480f4)

 NEWS                       | 1 +
 sysdeps/riscv/dl-machine.h | 6 ++++++
 2 files changed, 7 insertions(+)

commit ebccdf5b57b22536aa7cbc0ef514144ba81ac011
Author:     Aurelien Jarno <aurelien@aurel32.net>
AuthorDate: Tue Dec 14 22:44:35 2021 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Jan 2 23:01:03 2022 +0100

    riscv: align stack in clone [BZ #28702]
    
    The RISC-V ABI [1] mandates that "the stack pointer shall be aligned to
    a 128-bit boundary upon procedure entry". This as not the case in clone.
    
    This fixes the misc/tst-misalign-clone-internal and
    misc/tst-misalign-clone tests.
    
    Fixes bug 28702.
    
    [1] https://github.com/riscv-non-isa/riscv-elf-psabi-doc
    
    (cherry picked from commit d2e594d71509faf36cf851a69370db34a4f5fa65)
    (cherry picked from commit 9de8011c328021f10588a8acb418daf5121d5f3d)

 NEWS                                  | 1 +
 sysdeps/unix/sysv/linux/riscv/clone.S | 3 +++
 2 files changed, 4 insertions(+)

commit 532b0bfdb50d49542be56d96069fe8d1bd2179ea
Author:     Matheus Castanho <msc@linux.ibm.com>
AuthorDate: Wed Dec 1 11:14:40 2021 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Jan 2 23:00:41 2022 +0100

    powerpc64[le]: Allocate extra stack frame on syscall.S
    
    The syscall function does not allocate the extra stack frame for scv like other
    assembly syscalls using DO_CALL_SCV. So after commit d120fb9941 changed the
    offset that is used to save LR, syscall ended up using an invalid offset,
    causing regressions on powerpc64. So make sure the extra stack frame is
    allocated in syscall.S as well to make it consistent with other uses of
    DO_CALL_SCV and avoid similar issues in the future.
    
    Tested on powerpc, powerpc64, and powerpc64le (with and without scv)
    
    Reviewed-by: Raphael M Zinsly <rzinsly@linux.ibm.com>
    
    (cherry picked from commit ae91d3df24a4a1b1f264d101a71a298bff310d14)
    (cherry picked from commit 5daf13b1e637eec0f7a2de05b177cb0d76479aa2)

 sysdeps/unix/sysv/linux/powerpc/syscall.S | 4 ++++
 1 file changed, 4 insertions(+)

commit cc5db9c0fc9b7663e91994fb66ef76695e128415
Author:     Aurelien Jarno <aurelien@aurel32.net>
AuthorDate: Wed Dec 15 23:46:19 2021 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Jan 2 23:00:22 2022 +0100

    elf: Fix tst-cpu-features-cpuinfo for KVM guests on some AMD systems [BZ #28704]
    
    On KVM guests running on some AMD systems, the IBRS feature is reported
    as a synthetic feature using the Intel feature, while the cpuinfo entry
    keeps the same. Handle that by first checking the presence of the Intel
    feature on AMD systems.
    
    Fixes bug 28704.
    
    (cherry picked from commit 94058f6cde8b887178885954740ac6c866d25eab)
    (cherry picked from commit 03de6917bd11c0591867607ce74ef658f76eabb9)

 NEWS                                   | 1 +
 sysdeps/x86/tst-cpu-features-cpuinfo.c | 9 ++++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

commit b738699d5962d27f5d47935ecd52a64fa93fa074
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Fri Dec 17 12:01:20 2021 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Jan 2 23:00:03 2022 +0100

    nss: Use "files dns" as the default for the hosts database (bug 28700)
    
    This matches what is currently in nss/nsswitch.conf.  The new ordering
    matches what most distributions use in their installed configuration
    files.
    
    It is common to add localhost to /etc/hosts because the name does not
    exist in the DNS, but is commonly used as a host name.
    
    With the built-in "dns [!UNAVAIL=return] files" default, dns is
    searched first and provides an answer for "localhost" (NXDOMAIN).
    We never look at the files database as a result, so the contents of
    /etc/hosts is ignored.  This means that "getent hosts localhost"
    fail without a /etc/nsswitch.conf file, even though the host name
    is listed in /etc/hosts.
    
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    (cherry picked from commit b99b0f93ee8762fe53ff65802deb6f00700b9924)
    (cherry picked from commit dc9b69d5331dcdca4547c0490cb9fefbd89e40f6)

 NEWS               | 1 +
 manual/nss.texi    | 5 ++---
 nss/XXX-lookup.c   | 2 +-
 nss/nss_database.c | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)

commit b31e6f1069c03c1591a33138817c151a9f26d421
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Fri Dec 17 11:48:41 2021 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Jan 2 22:59:36 2022 +0100

    arm: Guard ucontext _rtld_global_ro access by SHARED, not PIC macro
    
    Due to PIE-by-default, PIC is now defined in more cases.  libc.a
    does not have _rtld_global_ro, and statically linking setcontext
    fails.  SHARED is the right condition to use, so that libc.a
    references _dl_hwcap instead of _rtld_global_ro.
    
    For static PIE support, the !SHARED case would still have to be made
    PIC.  This patch does not achieve that.
    
    Fixes commit 23645707f12f2dd9d80b51effb2d9618a7b65565
    ("Replace --enable-static-pie with --disable-default-pie").
    
    Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
    (cherry picked from commit ce1e5b11229f19820b86f8b19d651f16009552b0)
    (cherry picked from commit 93aabf891e96e93f100081ee07989c23d7107d17)

 sysdeps/unix/sysv/linux/arm/getcontext.S | 4 ++--
 sysdeps/unix/sysv/linux/arm/setcontext.S | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

commit 3c122524f1271e46717408852ce09fe4a233a929
Author:     Xi Ruoyao <xry111@mengyan1223.wang>
AuthorDate: Fri Aug 13 16:01:14 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Jan 2 22:59:08 2022 +0100

    mips: increase stack alignment in clone to match the ABI
    
    In "mips: align stack in clone [BZ #28223]"
    (commit 1f51cd9a860ee45eee8a56fb2ba925267a2a7bfe) I made a mistake: I
    misbelieved one "word" was 2-byte and "doubleword" should be 4-byte.
    But in MIPS ABI one "word" is defined 32-bit (4-byte), so "doubleword" is
    8-byte [1], and "quadword" is 16-byte [2].
    
    [1]: "System V Application Binary Interface: MIPS(R) RISC Processor
          Supplement, 3rd edition", page 3-31
    [2]: "MIPSpro(TM) 64-Bit Porting and Transition Guide", page 23
    
    (cherry picked from commit 0f62fe053273ff6c62ac95c59b7687c964737b00)
    (cherry picked from commit 4db172a54d43f9b7fd17e66fc44a34efb3cab1e1)

 sysdeps/unix/sysv/linux/mips/clone.S | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

commit 732f21667ebc251e798c291ef9b0429499d1d599
Author:     Xi Ruoyao <xry111@mengyan1223.wang>
AuthorDate: Thu Aug 12 20:31:59 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Jan 2 22:58:45 2022 +0100

    mips: align stack in clone [BZ #28223]
    
    The MIPS O32 ABI requires 4 byte aligned stack, and the MIPS N64 and N32
    ABI require 8 byte aligned stack.  Previously if the caller passed an
    unaligned stack to clone the the child misbehaved.
    
    Fixes bug 28223.
    
    (cherry picked from commit 1f51cd9a860ee45eee8a56fb2ba925267a2a7bfe)
    (cherry picked from commit 7af07fe795f43e53d31be1c6f9adba7e05f87b0b)

 NEWS                                 | 1 +
 sysdeps/unix/sysv/linux/mips/clone.S | 7 +++++++
 2 files changed, 8 insertions(+)

commit 1ace3c16be64d168efece930d79081bb03f79808
Author:     Stafford Horne <shorne@gmail.com>
AuthorDate: Sat Sep 25 17:02:06 2021 +0900
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Jan 2 22:58:26 2022 +0100

    pthread/tst-cancel28: Fix barrier re-init race condition
    
    When running this test on the OpenRISC port I am working on this test
    fails with a timeout.  The test passes when being straced or debugged.
    Looking at the code there seems to be a race condition in that:
    
      1 main thread: calls xpthread_cancel
      2 sub thread : receives cancel signal
      3 sub thread : cleanup routine waits on barrier
      4 main thread: re-inits barrier
      5 main thread: waits on barrier
    
    After getting to 5 the main thread and sub thread wait forever as the 2
    barriers are no longer the same.
    
    Removing the barrier re-init seems to fix this issue.  Also, the barrier
    does not need to be reinitialized as that is done by default.
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit 9874ca536b1d0662b1cea46af3ce09a4d42aeb32)
    (cherry picked from commit 06865865151579d1aa17d38110060a68b85c5d90)

 sysdeps/pthread/tst-cancel28.c | 1 -
 1 file changed, 1 deletion(-)

commit 4d3f42028fdfd43bdd7bb3028924f7e0a44e9701
Author:     Joseph Myers <joseph@codesourcery.com>
AuthorDate: Fri Sep 17 19:24:14 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Jan 2 22:57:58 2022 +0100

    Use $(pie-default) with conformtest
    
    My glibc bot showed that my conformtest changes fail the build of the
    conformtest execution tests for x86_64-linux-gnu-static-pie, because
    linking the newly built object with the newly built libc and the
    associated options normally used for linking requires it to be built
    as PIE.  Add $(pie-default) to the compiler command used so that PIE
    options are used when required.
    
    There's a case for using the whole of $(CFLAGS-.o) (which includes
    $(pie-default)), but that raises questions of any impact from using
    optimization flags from CFLAGS in these tests.  So for now just use
    $(pie-default) as the key part of $(CFLAGS-.o) that's definitely
    needed.
    
    Tested with build-many-glibcs.py for x86_64-linux-gnu-static-pie.
    
    (cherry picked from commit 885762aa31d75de8b9fea4c0e2e372b582d4c548)
    (cherry picked from commit 1fe4b8d6937139faa47410552d4e21b356810d67)

 conform/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

commit 4fa3d77b8946e9283b50b304e1e4a29df10ab244
Author:     Joseph Myers <joseph@codesourcery.com>
AuthorDate: Fri Sep 17 13:12:10 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Jan 2 22:57:10 2022 +0100

    Run conform/ tests using newly built libc
    
    Although the conform/ header tests are built using the headers of the
    glibc under test, the execution tests from conformtest (a few tests of
    the values of macros evaluating to string constants) are linked and
    run with system libc, not the newly built libc.
    
    Apart from preventing testing in cross environments, this can be a
    problem even for native testing.  Specifically, it can be useful to do
    native testing when building with a cross compiler that links with a
    libc that is not the system libc; for example, on x86_64, you can test
    all three ABIs that way if the kernel support is present, even if the
    host OS lacks 32-bit or x32 libraries or they are older than the
    libraries in the sysroot used by the compiler used to build glibc.
    This works for almost all tests, but not for these conformtest tests.
    
    Arrange for conformtest to link and run test programs similarly to
    other tests, with consequent refactoring of various variables in
    Makeconfig to allow passing relevant parts of the link-time command
    lines down to conformtest.  In general, the parts of the link command
    involving $@ or $^ are separated out from the parts that should be
    passed to conformtest (the variables passed to conformtest still
    involve various variables whose names involve $(@F), but those
    variables simply won't be defined for the conformtest makefile rules
    and I think their presence there is harmless).
    
    This is also most of the support that would be needed to allow running
    those tests of string constants for cross testing when test-wrapper is
    defined.  That will also need changes to where conformtest.py puts the
    test executables, so it puts them in the main object directory
    (expected to be shared with a test system in cross testing) rather
    than /tmp (not expected to be shared) as at present.
    
    Tested for x86_64.
    
    (cherry picked from commit f3eef963902d0f54f68cffc74f79b97f4d6154b7)
    (cherry picked from commit 0dcbf4c8705309af8c8c1620491c60539901a3b0)

 Makeconfig             | 23 ++++++++++++++++-------
 conform/Makefile       |  3 +++
 conform/conformtest.py | 20 +++++++++++++++++---
 3 files changed, 36 insertions(+), 10 deletions(-)

commit 5d614e272777f58092a56c53bf1d381f76398890
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Fri Dec 10 05:14:24 2021 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Jan 2 22:56:45 2022 +0100

    nptl: Add one more barrier to nptl/tst-create1
    
    Without the bar_ctor_finish barrier, it was possible that thread2
    re-locked user_lock before ctor had a chance to lock it.  ctor then
    blocked in its locking operation, xdlopen from the main thread
    did not return, and thread2 was stuck waiting in bar_dtor:
    
    thread 1: started.
    thread 2: started.
    thread 2: locked user_lock.
    constructor started: 0.
    thread 1: in ctor: started.
    thread 3: started.
    thread 3: done.
    thread 2: unlocked user_lock.
    thread 2: locked user_lock.
    
    Fixes the test in commit 83b5323261bb72313bffcf37476c1b8f0847c736
    ("elf: Avoid deadlock between pthread_create and ctors [BZ #28357]").
    
    Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
    (cherry picked from commit 5cc338565479a620244c2f8ff35956629c4dbf81)
    (cherry picked from commit e9f81c261a2ca74d31d07ff9c8e780ac8a25993c)

 NEWS                          | 1 +
 sysdeps/pthread/tst-create1.c | 4 ++++
 2 files changed, 5 insertions(+)

commit 13cabf2d91653d537b3e20295a1d62727190d85e
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: Sun Jan 2 22:36:37 2022 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Jan 2 22:36:37 2022 +0100

    Gentoo: Append contents of gconv-modules-extra.conf to gconv-modules
    
    Complicated story. In a 32bit qemu-user chroot (found on m68k),
    iconvconfig seems to be unable to find the files in the subdirectory
    gconv-modules.d, which may be related to [1].
    
    This doesn't sound bad per se, except that EUC-JP (now in the subdir)
    is used in an autoconf test for "working iconv". [2] Bam, iconv is
    declared nonfunctional and the build of $random_package fails
    (found with gnupg).
    
    [1] https://gitlab.com/qemu-project/qemu/-/issues/263
    [2] https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=m4/iconv.m4;h=00057953e33c61cae9d7d807e7aa1a05dc20928a;hb=HEAD#l176

 iconvdata/gconv-modules            | 1890 ++++++++++++++++++++++++++++++++++++
 iconvdata/gconv-modules-extra.conf | 1890 +-----------------------------------
 2 files changed, 1891 insertions(+), 1889 deletions(-)

commit d00012724f893e85d2ce686ad7aa004d1ff1ffc3 (tag: gentoo/glibc-2.34-8)
Author:     Matheus Castanho <msc@linux.ibm.com>
AuthorDate: Tue Oct 26 10:44:59 2021 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Dec 8 20:21:16 2021 +0100

    powerpc64[le]: Fix CFI and LR save address for asm syscalls [BZ #28532]
    
    Syscalls based on the assembly templates are missing CFI for r31, which gets
    clobbered when scv is used, and info for LR is inaccurate, placed in the wrong
    LOC and not using the proper offset. LR was also being saved to the callee's
    frame, while the ABI mandates it to be saved to the caller's frame. These are
    fixed by this commit.
    
    After this change:
    
    $ readelf -wF libc.so.6 | grep 0004b9d4.. -A 7 && objdump --disassemble=kill libc.so.6
    00004a48 0000000000000020 00004a4c FDE cie=00000000 pc=000000000004b9d4..000000000004ba3c
       LOC           CFA      r31   ra
    000000000004b9d4 r1+0     u     u
    000000000004b9e4 r1+48    u     u
    000000000004b9e8 r1+48    c-16  u
    000000000004b9fc r1+48    c-16  c+16
    000000000004ba08 r1+48    c-16
    000000000004ba18 r1+48    u
    000000000004ba1c r1+0     u
    
    libc.so.6:     file format elf64-powerpcle
    
    Disassembly of section .text:
    
    000000000004b9d4 <kill>:
       4b9d4:       1f 00 4c 3c     addis   r2,r12,31
       4b9d8:       2c c3 42 38     addi    r2,r2,-15572
       4b9dc:       25 00 00 38     li      r0,37
       4b9e0:       d1 ff 21 f8     stdu    r1,-48(r1)
       4b9e4:       20 00 e1 fb     std     r31,32(r1)
       4b9e8:       98 8f ed eb     ld      r31,-28776(r13)
       4b9ec:       10 00 ff 77     andis.  r31,r31,16
       4b9f0:       1c 00 82 41     beq     4ba0c <kill+0x38>
       4b9f4:       a6 02 28 7d     mflr    r9
       4b9f8:       40 00 21 f9     std     r9,64(r1)
       4b9fc:       01 00 00 44     scv     0
       4ba00:       40 00 21 e9     ld      r9,64(r1)
       4ba04:       a6 03 28 7d     mtlr    r9
       4ba08:       08 00 00 48     b       4ba10 <kill+0x3c>
       4ba0c:       02 00 00 44     sc
       4ba10:       00 00 bf 2e     cmpdi   cr5,r31,0
       4ba14:       20 00 e1 eb     ld      r31,32(r1)
       4ba18:       30 00 21 38     addi    r1,r1,48
       4ba1c:       18 00 96 41     beq     cr5,4ba34 <kill+0x60>
       4ba20:       01 f0 20 39     li      r9,-4095
       4ba24:       40 48 23 7c     cmpld   r3,r9
       4ba28:       20 00 e0 4d     bltlr+
       4ba2c:       d0 00 63 7c     neg     r3,r3
       4ba30:       08 00 00 48     b       4ba38 <kill+0x64>
       4ba34:       20 00 e3 4c     bnslr+
       4ba38:       c8 32 fe 4b     b       2ed00 <__syscall_error>
            ...
       4ba44:       40 20 0c 00     .long 0xc2040
       4ba48:       68 00 00 00     .long 0x68
       4ba4c:       06 00 5f 5f     rlwnm   r31,r26,r0,0,3
       4ba50:       6b 69 6c 6c     xoris   r12,r3,26987
    
    (cherry picked from commit d120fb9941be1fb1934f0b50c6ad64e4c5e404fb)
    (cherry picked from commit 387bff63dc2dccd62b09aa26dccf8cdc5f3c985c)

 NEWS                               |  1 +
 sysdeps/powerpc/powerpc64/sysdep.h | 10 ++++++----
 2 files changed, 7 insertions(+), 4 deletions(-)

commit 1f714c474eb248b3fa2c84f3b0f22cc509c0e6c9 (tag: gentoo/glibc-2.34-7)
Author:     Sam James <sam@gentoo.org>
AuthorDate: Wed Dec 1 14:58:40 2021 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: Wed Dec 1 15:08:55 2021 +0000

    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 ebf80fe2bf3c3859b1dde2322750dcb59bda67c5 (tag: gentoo/glibc-2.34-6)
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Thu Nov 25 09:12:00 2021 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Nov 28 22:58:27 2021 +0100

    linux: Use /proc/stat fallback for __get_nprocs_conf (BZ #28624)
    
    The /proc/statm fallback was removed by f13fb81ad3159 if sysfs is
    not available, reinstate it.
    
    Checked on x86_64-linux-gnu.
    (cherry-picked from commit 137ed5ac440a4d3cf4178ce97f349b349a9c2c66)
    
    (cherry picked from commit f988b7f228851370d1faa1e8f28d02f4b4e6dc46)

 sysdeps/unix/sysv/linux/getsysstats.c | 60 ++++++++++++++++++++---------------
 1 file changed, 35 insertions(+), 25 deletions(-)

commit a842ac022e9f5e5bc5431fb6b103e8930a38c0ae
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Wed Nov 24 08:59:54 2021 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Nov 28 22:58:04 2021 +0100

    nptl: Do not set signal mask on second setjmp return [BZ #28607]
    
    __libc_signal_restore_set was in the wrong place: It also ran
    when setjmp returned the second time (after pthread_exit or
    pthread_cancel).  This is observable with blocked pending
    signals during thread exit.
    
    Fixes commit b3cae39dcbfa2432b3f3aa28854d8ac57f0de1b8
    ("nptl: Start new threads with all signals blocked [BZ #25098]").
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit e186fc5a31e46f2cbf5ea1a75223b4412907f3d8)
    (cherry picked from commit bfe68fe3c475fe34bed4e017d6e63196c305c934)

 NEWS                                      |  1 +
 nptl/pthread_create.c                     |  4 +--
 sysdeps/pthread/Makefile                  |  1 +
 sysdeps/pthread/tst-pthread-exit-signal.c | 45 +++++++++++++++++++++++++++++++
 4 files changed, 49 insertions(+), 2 deletions(-)

commit 894593fa10cc5156ac064dcf8c5f3daf95c49595
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Wed Nov 10 15:21:37 2021 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Nov 28 22:57:45 2021 +0100

    s390: Use long branches across object boundaries (jgh instead of jh)
    
    Depending on the layout chosen by the linker, the 16-bit displacement
    of the jh instruction is insufficient to reach the target label.
    
    Analysis of the linker failure was carried out by Nick Clifton.
    
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    Reviewed-by: Stefan Liebler <stli@linux.ibm.com>
    (cherry picked from commit 98966749f2b418825ff2ea496a0ee89fe63d2cc8)
    (cherry picked from commit a4f3bc23461e3f9f6053e827715984ba0d2e589a)

 sysdeps/s390/memmem-arch13.S | 2 +-
 sysdeps/s390/strstr-arch13.S | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

commit 9fce52da38c4cc6608e976dcd2da2be13f984073 (tag: gentoo/glibc-2.34-5)
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Fri Nov 5 17:01:24 2021 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Nov 7 23:10:04 2021 +0100

    elf: Earlier missing dynamic segment check in _dl_map_object_from_fd
    
    Separated debuginfo files have PT_DYNAMIC with p_filesz == 0.  We
    need to check for that before the _dl_map_segments call because
    that could attempt to write to mappings that extend beyond the end
    of the file, resulting in SIGBUS.
    
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    (cherry picked from commit ea32ec354c65ddad11b82ca9d057010df13a9cea)
    (cherry picked from commit cf8c6a634c0a04a9f5d198ef05310f85f7338839)

 elf/dl-load.c | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

commit 6bb2ba6ed1c76432768e76cac1e174215a897458
Author:     Nikita Popov <npv1310@gmail.com>
AuthorDate: Tue Nov 2 13:21:42 2021 +0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Nov 7 23:09:36 2021 +0100

    gconv: Do not emit spurious NUL character in ISO-2022-JP-3 (bug 28524)
    
    Bugfix 27256 has introduced another issue:
    In conversion from ISO-2022-JP-3 encoding, it is possible
    to force iconv to emit extra NUL character on internal state reset.
    To do this, it is sufficient to feed iconv with escape sequence
    which switches active character set.
    The simplified check 'data->__statep->__count != ASCII_set'
    introduced by the aforementioned bugfix picks that case and
    behaves as if '\0' character has been queued thus emitting it.
    
    To eliminate this issue, these steps are taken:
    * Restore original condition
    '(data->__statep->__count & ~7) != ASCII_set'.
    It is necessary since bits 0-2 may contain
    number of buffered input characters.
    * Check that queued character is not NUL.
    Similar step is taken for main conversion loop.
    
    Bundled test case follows following logic:
    * Try to convert ISO-2022-JP-3 escape sequence
    switching active character set
    * Reset internal state by providing NULL as input buffer
    * Ensure that nothing has been converted.
    
    Signed-off-by: Nikita Popov <npv1310@gmail.com>
    (cherry picked from commit ff012870b2c02a62598c04daa1e54632e020fd7d)
    (cherry picked from commit f411207a833d0c49578ebe7062aee3660813ed5f)

 NEWS                      |  3 ++-
 iconvdata/Makefile        |  5 +++-
 iconvdata/bug-iconv15.c   | 60 +++++++++++++++++++++++++++++++++++++++++++++++
 iconvdata/iso-2022-jp-3.c | 28 +++++++++++++++-------
 4 files changed, 86 insertions(+), 10 deletions(-)

commit a55b276342f28800caa6fa5ea884c81d2932d347
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Fri Sep 24 08:56:42 2021 -0700
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Nov 7 23:09:11 2021 +0100

    Avoid warning: overriding recipe for .../tst-ro-dynamic-mod.so
    
    Add tst-ro-dynamic-mod to modules-names-nobuild to avoid
    
    ../Makerules:767: warning: ignoring old recipe for target '.../elf/tst-ro-dynamic-mod.so'
    
    This updates BZ #28340 fix.
    
    (cherry picked from commit 15e6d6785ac2935bb963506b47a37b3d1f728952)
    (cherry picked from commit 6548a9bdba95b3e1fcdbd85445342467e4b0cd4f)

 elf/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

commit f1068db6c10671b89b50c3263244face35053ecf
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Thu Sep 23 09:06:49 2021 -0700
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Nov 7 23:08:43 2021 +0100

    ld.so: Initialize bootstrap_map.l_ld_readonly [BZ #28340]
    
    1. Define DL_RO_DYN_SECTION to initalize bootstrap_map.l_ld_readonly
    before calling elf_get_dynamic_info to get dynamic info in bootstrap_map,
    2. Define a single
    
    static inline bool
    dl_relocate_ld (const struct link_map *l)
    {
      /* Don't relocate dynamic section if it is readonly  */
      return !(l->l_ld_readonly || DL_RO_DYN_SECTION);
    }
    
    This updates BZ #28340 fix.
    
    (cherry picked from commit 2ec99d8c42b2ff1a1231e4df462a0910a9b7fdef)
    (cherry picked from commit 5f36e5c70107ecb59281ef57f9f1c0e37ec3076d)

 elf/rtld.c                       |  1 +
 sysdeps/generic/dl-relocate-ld.h | 11 ++---------
 sysdeps/generic/ldsodefs.h       | 10 ++++++++++
 sysdeps/mips/dl-relocate-ld.h    | 11 ++---------
 sysdeps/riscv/dl-relocate-ld.h   | 11 ++---------
 5 files changed, 17 insertions(+), 27 deletions(-)

commit b8468d68f0dd3f60efaa69efaf791552b9bdddd9
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Thu Sep 16 08:15:29 2021 -0700
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Nov 7 23:08:15 2021 +0100

    ld.so: Replace DL_RO_DYN_SECTION with dl_relocate_ld [BZ #28340]
    
    We can't relocate entries in dynamic section if it is readonly:
    
    1. Add a l_ld_readonly field to struct link_map to indicate if dynamic
    section is readonly and set it based on p_flags of PT_DYNAMIC segment.
    2. Replace DL_RO_DYN_SECTION with dl_relocate_ld to decide if dynamic
    section should be relocated.
    3. Remove DL_RO_DYN_TEMP_CNT.
    4. Don't use a static dynamic section to make readonly dynamic section
    in vDSO writable.
    5. Remove the temp argument from elf_get_dynamic_info.
    
    This fixes BZ #28340.
    
    Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    (cherry picked from commit b413280cfb16834450f66f554bc0d618bb513851)
    (cherry picked from commit f42373f911a28d34325a5bfc1ed5a962c89da7eb)

 NEWS                             |  1 +
 elf/Makefile                     | 11 +++++++++--
 elf/dl-load.c                    |  3 ++-
 elf/dl-reloc-static-pie.c        | 12 +++++++++++-
 elf/get-dynamic-info.h           | 21 +++------------------
 elf/rtld.c                       |  6 ++++--
 elf/setup-vdso.h                 |  5 ++---
 elf/tst-ro-dynamic-mod.c         | 19 +++++++++++++++++++
 elf/tst-ro-dynamic-mod.map       | 16 ++++++++++++++++
 elf/tst-ro-dynamic.c             | 31 +++++++++++++++++++++++++++++++
 include/link.h                   |  3 +++
 sysdeps/generic/dl-relocate-ld.h | 32 ++++++++++++++++++++++++++++++++
 sysdeps/generic/ldsodefs.h       |  7 ++-----
 sysdeps/mips/dl-relocate-ld.h    | 32 ++++++++++++++++++++++++++++++++
 sysdeps/mips/ldsodefs.h          |  4 ----
 sysdeps/riscv/dl-relocate-ld.h   | 32 ++++++++++++++++++++++++++++++++
 sysdeps/riscv/ldsodefs.h         |  5 -----
 17 files changed, 199 insertions(+), 41 deletions(-)

commit ee94b9c4d09e917c43d10aad238357d06377ccaf (tag: gentoo/glibc-2.34-4)
Author:     Siddhesh Poyarekar <siddhesh@sourceware.org>
AuthorDate: Fri Oct 29 14:53:55 2021 +0530
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Oct 29 18:39:55 2021 +0200

    Handle NULL input to malloc_usable_size [BZ #28506]
    
    Hoist the NULL check for malloc_usable_size into its entry points in
    malloc-debug and malloc and assume non-NULL in all callees.  This fixes
    BZ #28506
    
    Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    Reviewed-by: Florian Weimer <fweimer@redhat.com>
    Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
    (cherry picked from commit 88e316b06414ee7c944cd6f8b30b07a972b78499)
    (cherry picked from commit 01bffc013cdad1e0c45db7aa57efb2bee61f3338)

 malloc/malloc-debug.c      | 13 +++++++------
 malloc/malloc.c            | 25 +++++++++----------------
 malloc/tst-malloc-usable.c | 22 +++++++++-------------
 3 files changed, 25 insertions(+), 35 deletions(-)

commit 5ae4a1bf95bc2e508cc9fe9e2b914f8573542c58
Author:     Szabolcs Nagy <szabolcs.nagy@arm.com>
AuthorDate: Wed Sep 15 15:16:19 2021 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Oct 29 18:39:34 2021 +0200

    elf: Avoid deadlock between pthread_create and ctors [BZ #28357]
    
    The fix for bug 19329 caused a regression such that pthread_create can
    deadlock when concurrent ctors from dlopen are waiting for it to finish.
    Use a new GL(dl_load_tls_lock) in pthread_create that is not taken
    around ctors in dlopen.
    
    The new lock is also used in __tls_get_addr instead of GL(dl_load_lock).
    
    The new lock is held in _dl_open_worker and _dl_close_worker around
    most of the logic before/after the init/fini routines.  When init/fini
    routines are running then TLS is in a consistent, usable state.
    In _dl_open_worker the new lock requires catching and reraising dlopen
    failures that happen in the critical section.
    
    The new lock is reinitialized in a fork child, to keep the existing
    behaviour and it is kept recursive in case malloc interposition or TLS
    access from signal handlers can retake it.  It is not obvious if this
    is necessary or helps, but avoids changing the preexisting behaviour.
    
    The new lock may be more appropriate for dl_iterate_phdr too than
    GL(dl_load_write_lock), since TLS state of an incompletely loaded
    module may be accessed.  If the new lock can replace the old one,
    that can be a separate change.
    
    Fixes bug 28357.
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit 83b5323261bb72313bffcf37476c1b8f0847c736)
    (cherry picked from commit 024a7640ab9ecea80e527f4e4d7f7a1868e952c5)

 NEWS                             |   1 +
 elf/dl-close.c                   |   6 ++
 elf/dl-open.c                    |  35 +++++++++++-
 elf/dl-support.c                 |   7 +++
 elf/dl-tls.c                     |  16 +++---
 elf/rtld.c                       |   1 +
 posix/fork.c                     |   3 +
 sysdeps/generic/ldsodefs.h       |   9 ++-
 sysdeps/pthread/Makefile         |  10 +++-
 sysdeps/pthread/tst-create1.c    | 119 +++++++++++++++++++++++++++++++++++++++
 sysdeps/pthread/tst-create1mod.c |  41 ++++++++++++++
 11 files changed, 236 insertions(+), 12 deletions(-)

commit ee2c9e374ed8e46bf5b96069dde294fab2457013
Author:     Stafford Horne <shorne@gmail.com>
AuthorDate: Fri Oct 15 06:17:41 2021 +0900
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Oct 29 18:39:05 2021 +0200

    timex: Use 64-bit fields on 32-bit TIMESIZE=64 systems (BZ #28469)
    
    This was found when testing the OpenRISC port I am working on.  These
    two tests fail with SIGSEGV:
    
      FAIL: misc/tst-ntp_gettime
      FAIL: misc/tst-ntp_gettimex
    
    This was found to be due to the kernel overwriting the stack space
    allocated by the timex structure.  The reason for the overwrite being
    that the kernel timex has 64-bit fields and user space code only
    allocates enough stack space for timex with 32-bit fields.
    
    On 32-bit systems with TIMESIZE=64 __USE_TIME_BITS64 is not defined.
    This causes the timex structure to use 32-bit fields with type
    __syscall_slong_t.
    
    This patch adjusts the ifdef condition to allow 32-bit systems with
    TIMESIZE=64 to use the 64-bit long long timex definition.
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    
    (Cherry picked from commit 1d550265a75b412cea4889a50b101395f6a8e025)
    
    (cherry picked from commit cb9b8b5d7670df1a13544857640efd86a299d0e4)

 sysdeps/unix/sysv/linux/bits/timex.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 287d612225ebb5309d3bfe6fa1a068e7eedda0a0
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Wed Oct 6 08:10:13 2021 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Oct 29 18:38:36 2021 +0200

    y2038: Use a common definition for stat for sparc32
    
    The sparc32 misses support for support done by 4e8521333bea6.
    
    Checked on sparcv9-linux-gnu.
    
    (cherry picked from commit d2b1254db208b35ff060f00a15f22a1eed5306d2)
    (cherry picked from commit 76843f3b3ecb886b8d300220e6ec378e0fd09a8b)

 sysdeps/unix/sysv/linux/sparc/bits/struct_stat.h | 54 ++++++++++++++----------
 1 file changed, 31 insertions(+), 23 deletions(-)

commit 0305e64a00150762920136ee542135b59c6f4771
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Thu Sep 30 10:29:17 2021 -0700
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Oct 29 18:38:06 2021 +0200

    elf: Replace nsid with args.nsid [BZ #27609]
    
    commit ec935dea6332cb22f9881cd1162bad156173f4b0
    Author: Florian Weimer <fweimer@redhat.com>
    Date:   Fri Apr 24 22:31:15 2020 +0200
    
        elf: Implement __libc_early_init
    
    has
    
    @@ -856,6 +876,11 @@ no more namespaces available for dlmopen()"));
       /* See if an error occurred during loading.  */
       if (__glibc_unlikely (exception.errstring != NULL))
         {
    +      /* Avoid keeping around a dangling reference to the libc.so link
    +   map in case it has been cached in libc_map.  */
    +      if (!args.libc_already_loaded)
    +  GL(dl_ns)[nsid].libc_map = NULL;
    +
    
    do_dlopen calls _dl_open with nsid == __LM_ID_CALLER (-2), which calls
    dl_open_worker with args.nsid = nsid.  dl_open_worker updates args.nsid
    if it is __LM_ID_CALLER.  After dl_open_worker returns, it is wrong to
    use nsid.
    
    Replace nsid with args.nsid after dl_open_worker returns.  This fixes
    BZ #27609.
    
    (cherry picked from commit 1e1ecea62e899acb58c3fdf3b320a0833ddd0dff)
    (cherry picked from commit 79528414dc1578800cbf1fba2fbdb6335f4f39bf)

 elf/dl-open.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 69e085ce179128d898274e2ac08d5bfe25eb3856
Author:     Stefan Liebler <stli@linux.ibm.com>
AuthorDate: Tue Oct 5 16:14:10 2021 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Oct 9 19:54:57 2021 +0200

    S390: Add PCI_MIO and SIE HWCAPs
    
    Both new HWCAPs were introduced in these kernel commits:
    - 7e8403ecaf884f307b627f3c371475913dd29292
      "s390: add HWCAP_S390_PCI_MIO to ELF hwcaps"
    - 7e82523f2583e9813e4109df3656707162541297
      "s390/hwcaps: make sie capability regular hwcap"
    
    Also note that the kernel commit 511ad531afd4090625def4d9aba1f5227bd44b8e
    "s390/hwcaps: shorten HWCAP defines" has shortened the prefix of the macros
    from "HWCAP_S390_" to "HWCAP_".  For compatibility reasons, we do not
    change the prefix in public glibc header file.
    
    (cherry picked from commit f2e06656d04a9fcb0603802a4f8ce7aa3a1f055e)
    (cherry picked from commit cb44a620ef2336449af60694b6696efced161774)

 sysdeps/s390/dl-procinfo.c                | 4 ++--
 sysdeps/s390/dl-procinfo.h                | 4 +++-
 sysdeps/unix/sysv/linux/s390/bits/hwcap.h | 7 +++++++
 3 files changed, 12 insertions(+), 3 deletions(-)

commit 10d926271bd0dd8c3a78594b98bff43a18996a02
Author:     Siddhesh Poyarekar <siddhesh@sourceware.org>
AuthorDate: Wed Oct 6 21:48:35 2021 +0530
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Oct 9 19:54:36 2021 +0200

    support: Also return fd when it is 0
    
    The fd validity check in open_dev_null checks if fd > 0, which would
    lead to a leaked fd if it is == 0.
    
    Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit 27b6edbb090f736b101f569620d8ad0e7217ddf8)
    (cherry picked from commit 558168c78ea1eb8efb33959c1da9d6b5a997fd7b)

 support/support-open-dev-null-range.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

commit 3b12a24a986bd21d58ed937f021b7f273eaa6471
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Thu Sep 30 18:44:06 2021 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Oct 9 19:54:17 2021 +0200

    Add missing braces to bsearch inline implementation [BZ #28400]
    
    GCC treats the pragma as a statement, so that the else branch only
    consists of the pragma, not the return statement.
    
    Fixes commit a725ff1de965f4cc4f36a7e8ae795d40ca0350d7 ("Suppress
    -Wcast-qual warnings in bsearch").
    
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    (cherry picked from commit 32b96d0dec0294465d2221a8f049703599d9d8e4)
    (cherry picked from commit a996d13b8a2e101bedbb1bdaa7ffcfea3b959bb2)

 bits/stdlib-bsearch.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

commit c3ca10ffff63722802de26a1c8e28d8b96aff496
Author:     Jonathan Wakely <jwakely@redhat.com>
AuthorDate: Wed May 19 16:48:19 2021 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Oct 9 19:53:58 2021 +0200

    Suppress -Wcast-qual warnings in bsearch
    
    The first cast to (void *) is redundant but should be (const void *)
    anyway, because that's the type of the lvalue being assigned to.
    
    The second cast is necessary and intentionally not const-correct, so
    tell the compiler not to warn about it.
    
    Reviewed-by: Florian Weimer <fweimer@redhat.com>
    (cherry picked from commit a725ff1de965f4cc4f36a7e8ae795d40ca0350d7)
    (cherry picked from commit 80a009119ba2330768120476aaad63767b81d543)

 bits/stdlib-bsearch.h | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

commit d27378c957bf840be48b52b2a469bf3e2a068852
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Mon Sep 6 14:19:51 2021 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Oct 9 19:53:36 2021 +0200

    linux: Revert the use of sched_getaffinity on get_nproc (BZ #28310)
    
    The use of sched_getaffinity on get_nproc and
    sysconf (_SC_NPROCESSORS_ONLN) done in 903bc7dcc2acafc40 (BZ #27645)
    breaks the top command in common hypervisor configurations and also
    other monitoring tools.
    
    The main issue using sched_getaffinity changed the symbols semantic
    from system-wide scope of online CPUs to per-process one (which can
    be changed with kernel cpusets or book parameters in VM).
    
    This patch reverts mostly of the 903bc7dcc2acafc40, with the
    exceptions:
    
      * No more cached values and atomic updates, since they are inherent
        racy.
    
      * No /proc/cpuinfo fallback, since /proc/stat is already used and
        it would require to revert more arch-specific code.
    
      * The alloca is replace with a static buffer of 1024 bytes.
    
    So the implementation first consult the sysfs, and fallbacks to procfs.
    
    Checked on x86_64-linux-gnu.
    
    Reviewed-by: Florian Weimer <fweimer@redhat.com>
    (cherry picked from commit 342298278eabc75baabcaced110a11a02c3d3580)
    (cherry picked from commit 822662cf2a4b170ade4c5342f035d68815a03276)

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

commit 4c392a588fc1f10ec5e1b281f4138fef83922a7a
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Mon Sep 6 12:28:24 2021 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Oct 9 19:53:09 2021 +0200

    linux: Simplify get_nprocs
    
    This patch simplifies the memory allocation code and uses the sched
    routines instead of reimplement it.  This still uses a stack
    allocation buffer, so it can be used on malloc initialization code.
    
    Linux currently supports at maximum of 4096 cpus for most architectures:
    
    $ find -iname Kconfig | xargs git grep -A10 -w NR_CPUS | grep -w range
    arch/alpha/Kconfig-     range 2 32
    arch/arc/Kconfig-       range 2 4096
    arch/arm/Kconfig-       range 2 16 if DEBUG_KMAP_LOCAL
    arch/arm/Kconfig-       range 2 32 if !DEBUG_KMAP_LOCAL
    arch/arm64/Kconfig-     range 2 4096
    arch/csky/Kconfig-      range 2 32
    arch/hexagon/Kconfig-   range 2 6 if SMP
    arch/ia64/Kconfig-      range 2 4096
    arch/mips/Kconfig-      range 2 256
    arch/openrisc/Kconfig-  range 2 32
    arch/parisc/Kconfig-    range 2 32
    arch/riscv/Kconfig-     range 2 32
    arch/s390/Kconfig-      range 2 512
    arch/sh/Kconfig-        range 2 32
    arch/sparc/Kconfig-     range 2 32 if SPARC32
    arch/sparc/Kconfig-     range 2 4096 if SPARC64
    arch/um/Kconfig-        range 1 1
    arch/x86/Kconfig-# [NR_CPUS_RANGE_BEGIN ... NR_CPUS_RANGE_END] range.
    arch/x86/Kconfig-       range NR_CPUS_RANGE_BEGIN NR_CPUS_RANGE_END
    arch/xtensa/Kconfig-    range 2 32
    
    With x86 supporting 8192:
    
    arch/x86/Kconfig
     976 config NR_CPUS_RANGE_END
     977         int
     978         depends on X86_64
     979         default 8192 if  SMP && CPUMASK_OFFSTACK
     980         default  512 if  SMP && !CPUMASK_OFFSTACK
     981         default    1 if !SMP
    
    So using a maximum of 32k cpu should cover all cases (and I would
    expect once we start to have many more CPUs that Linux would provide
    a more straightforward way to query for such information).
    
    A test is added to check if sched_getaffinity can successfully return
    with large buffers.
    
    Checked on x86_64-linux-gnu and i686-linux-gnu.
    
    Reviewed-by: Florian Weimer <fweimer@redhat.com>
    (cherry picked from commit 33099d72e41cf8a129b362e9709eb2be9372d844)
    (cherry picked from commit cda99af14e82b4bb6abaecd717ebe3b57c0aa534)

 posix/Makefile                        |  3 +-
 posix/tst-sched_getaffinity.c         | 48 +++++++++++++++++++++++++
 sysdeps/unix/sysv/linux/getsysstats.c | 68 ++++++++++-------------------------
 3 files changed, 68 insertions(+), 51 deletions(-)

commit 18773d6159d54f7fdad92f648003824dccf24164
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Mon Sep 6 12:22:54 2021 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Oct 9 19:52:38 2021 +0200

    misc: Add __get_nprocs_sched
    
    This is an internal function meant to return the number of avaliable
    processor where the process can scheduled, different than the
    __get_nprocs which returns a the system available online CPU.
    
    The Linux implementation currently only calls __get_nprocs(), which
    in tuns calls sched_getaffinity.
    
    Reviewed-by: Florian Weimer <fweimer@redhat.com>
    (cherry picked from commit 11a02b035b464ab6813676adfd19c4a59c36d907)
    (cherry picked from commit e870aac8974cda746157a5a3c9f452ccd70da29b)

 include/sys/sysinfo.h                 | 7 ++++++-
 malloc/arena.c                        | 2 +-
 misc/getsysstats.c                    | 6 ++++++
 sysdeps/mach/getsysstats.c            | 6 ++++++
 sysdeps/unix/sysv/linux/getsysstats.c | 6 ++++++
 5 files changed, 25 insertions(+), 2 deletions(-)

commit 1aea2e4556c87bf8df9a4a0792888e88e67375e4
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Fri Oct 1 18:16:41 2021 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Oct 9 19:52:14 2021 +0200

    nptl: pthread_kill must send signals to a specific thread [BZ #28407]
    
    The choice between the kill vs tgkill system calls is not just about
    the TID reuse race, but also about whether the signal is sent to the
    whole process (and any thread in it) or to a specific thread.
    
    This was caught by the openposix test suite:
    
      LTP: openposix test suite - FAIL: SIGUSR1 is member of new thread pendingset.
      <https://gitlab.com/cki-project/kernel-tests/-/issues/764>
    
    Fixes commit 526c3cf11ee9367344b6b15d669e4c3cb461a2be ("nptl: Fix race
    between pthread_kill and thread exit (bug 12889)").
    
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    Tested-by: Carlos O'Donell <carlos@redhat.com>
    (cherry picked from commit eae81d70574e923ce3c59078b8df857ae192efa6)
    (cherry picked from commit 40bade26d5bcbda3d21fb598c5063d9df62de966)

 NEWS                                             |  1 +
 nptl/pthread_kill.c                              |  4 +-
 sysdeps/pthread/Makefile                         |  1 +
 sysdeps/pthread/tst-pthread-raise-blocked-self.c | 92 ++++++++++++++++++++++++
 4 files changed, 95 insertions(+), 3 deletions(-)

commit 4bbeabb6081d7b4044a39cc8915bf360607bbf68
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Fri Oct 1 18:16:41 2021 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Oct 9 19:51:43 2021 +0200

    support: Add check for TID zero in support_wait_for_thread_exit
    
    Some kernel versions (observed with kernel 5.14 and earlier) can list
    "0" entries in /proc/self/task.  This happens when a thread exits
    while the task list is being constructed.  Treat this entry as not
    present, like the proposed kernel patch does:
    
    [PATCH] procfs: Do not list TID 0 in /proc/<pid>/task
    <https://lore.kernel.org/all/8735pn5dx7.fsf@oldenburg.str.redhat.com/>
    
    Fixes commit 032d74eaf6179100048a5bf0ce942e97dc8b9a60 ("support: Add
    support_wait_for_thread_exit").
    
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    Tested-by: Carlos O'Donell <carlos@redhat.com>
    (cherry picked from commit 176c88f5214d8107d330971cbbfbbba5186a111f)
    (cherry picked from commit 4bf72519987ebc2be4a2058c670379040fae90ea)

 support/support_wait_for_thread_exit.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

commit c878a47230d255fd833172c8ae01324681885644 (tag: gentoo/glibc-2.34-3)
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Thu Sep 23 09:55:54 2021 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Sep 25 20:56:34 2021 +0200

    nptl: Avoid setxid deadlock with blocked signals in thread exit [BZ #28361]
    
    As part of the fix for bug 12889, signals are blocked during
    thread exit, so that application code cannot run on the thread that
    is about to exit.  This would cause problems if the application
    expected signals to be delivered after the signal handler revealed
    the thread to still exist, despite pthread_kill can no longer be used
    to send signals to it.  However, glibc internally uses the SIGSETXID
    signal in a way that is incompatible with signal blocking, due to the
    way the setxid handshake delays thread exit until the setxid operation
    has completed.  With a blocked SIGSETXID, the handshake can never
    complete, causing a deadlock.
    
    As a band-aid, restore the previous handshake protocol by not blocking
    SIGSETXID during thread exit.
    
    The new test sysdeps/pthread/tst-pthread-setuid-loop.c is based on
    a downstream test by Martin Osvald.
    
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    Tested-by: Carlos O'Donell <carlos@redhat.com>
    (cherry picked from commit 2849e2f53311b66853cb5159b64cba2bddbfb854)
    (cherry picked from commit 33adeaa3e2b9143c38884bc5aa65ded222ed274e)

 NEWS                                      |  1 +
 nptl/pthread_create.c                     | 12 +++++-
 sysdeps/pthread/Makefile                  |  1 +
 sysdeps/pthread/tst-pthread-setuid-loop.c | 61 +++++++++++++++++++++++++++++++
 4 files changed, 73 insertions(+), 2 deletions(-)

commit 1be046dffcd0c29d47e5a4011c757add2536c900
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Tue Aug 24 16:15:50 2021 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Sep 25 20:56:08 2021 +0200

    Use support_open_dev_null_range io/tst-closefrom, misc/tst-close_range, and posix/tst-spawn5 (BZ #28260)
    
    It ensures a continuous range of file descriptor and avoid hitting
    the RLIMIT_NOFILE.
    
    Checked on x86_64-linux-gnu.
    
    (cherry picked from commit 6b20880b22d1d0fce7e9f506baa6fe2d5c7fcfdc)
    (cherry picked from commit 772e33411bc730f832f415f93eb3e7c67e4d5488)

 io/tst-closefrom.c                        | 21 ++++++---------------
 posix/tst-spawn5.c                        | 13 +------------
 sysdeps/unix/sysv/linux/tst-close_range.c | 31 ++++++++++---------------------
 3 files changed, 17 insertions(+), 48 deletions(-)

commit 2c791ff8ce22c0cec4570cfada9e090061abe66c
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Tue Aug 24 16:12:24 2021 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Sep 25 20:55:46 2021 +0200

    support: Add support_open_dev_null_range
    
    It returns a range of file descriptor referring to the '/dev/null'
    pathname.  The function takes care of restarting the open range
    if a file descriptor is found within the specified range and
    also increases RLIMIT_NOFILE if required.
    
    Checked on x86_64-linux-gnu.
    
    (cherry picked from commit e814f4b04ee413a7bb3dfa43e74c8fb4abf58359)
    (cherry picked from commit 5ad589d63bc2d9b1fc3d9f32144acaebb85e0803)

 support/Makefile                          |   2 +
 support/support-open-dev-null-range.c     | 134 ++++++++++++++++++++++++++
 support/support.h                         |   8 ++
 support/tst-support-open-dev-null-range.c | 155 ++++++++++++++++++++++++++++++
 4 files changed, 299 insertions(+)

commit 09e0e273c127cbad617c01986e27adbb3cdebbcb
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Tue Sep 21 07:12:56 2021 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Sep 25 20:55:23 2021 +0200

    nptl: Fix type of pthread_mutexattr_getrobust_np, pthread_mutexattr_setrobust_np (bug 28036)
    
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    Tested-by: Carlos O'Donell <carlos@redhat.com>
    (cherry picked from commit f3e664563361dc17530113b3205998d1f19dc4d9)
    (cherry picked from commit 8b8a1d0b7375c547ae905917a03743ed6759c5bc)

 NEWS                   | 1 +
 sysdeps/nptl/pthread.h | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

commit d64e25839eac43d8b9a59523a2cb0e2d1817dccd
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Mon Sep 20 14:56:08 2021 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Sep 25 20:55:02 2021 +0200

    nptl: pthread_kill needs to return ESRCH for old programs (bug 19193)
    
    The fix for bug 19193 breaks some old applications which appear
    to use pthread_kill to probe if a thread is still running, something
    that is not supported by POSIX.
    
    (cherry picked from commit 95dba35bf05e4a5d69dfae5e9c9d4df3646a7f93)
    (cherry picked from commit 73c7f5a87971de2797f261e1a447f68dce09284b)

 nptl/pthread_kill.c                       | 37 ++++++++++++++++++++++++-------
 sysdeps/pthread/tst-pthread_kill-exited.c | 21 ++++++++++++++++--
 2 files changed, 48 insertions(+), 10 deletions(-)

commit 2737ff8babd97d8df4ed3f51ea792d37dbfd9cec
Author:     Aurelien Jarno <aurelien@aurel32.net>
AuthorDate: Fri Sep 10 19:39:35 2021 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Sep 25 20:54:37 2021 +0200

    posix: Fix attribute access mode on getcwd [BZ #27476]
    
    There is a GNU extension that allows to call getcwd(NULL, >0). It is
    described in the documentation, but also directly in the unistd.h
    header, just above the declaration.
    
    Therefore the attribute access mode added in commit 06febd8c6705
    is not correct. Drop it.
    
    (cherry picked from commit 433ec4f14a5753c7689c83c20c9972915c53c204)

 posix/bits/unistd.h | 5 ++---
 posix/unistd.h      | 3 +--
 2 files changed, 3 insertions(+), 5 deletions(-)

commit ff1c88358d065241df82889d32b934b2c03decc9
Author:     Joseph Myers <joseph@codesourcery.com>
AuthorDate: Tue Sep 14 14:19:24 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Sep 25 20:54:14 2021 +0200

    Add MADV_POPULATE_READ and MADV_POPULATE_WRITE from Linux 5.14 to bits/mman-linux.h
    
    Linux 5.14 adds constants MADV_POPULATE_READ and MADV_POPULATE_WRITE
    (with the same values on all architectures).  Add these to glibc's
    bits/mman-linux.h.
    
    Tested for x86_64.
    
    (cherry picked from commit 3561106278cddd2f007bd27fd4c3e90caaf14b43)
    (cherry picked from commit 4ed990e5b97a61f29f929bdeb36c5b2abb547a64)

 sysdeps/unix/sysv/linux/bits/mman-linux.h | 4 ++++
 1 file changed, 4 insertions(+)

commit 3fd176a07e9a6929d1df536b426b82ae7334149e
Author:     Joseph Myers <joseph@codesourcery.com>
AuthorDate: Tue Sep 14 13:51:58 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Sep 25 20:53:52 2021 +0200

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

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

commit 30cedfa9c48fc0ca51a0c6ee24562cd0a263103c
Author:     Joseph Myers <joseph@codesourcery.com>
AuthorDate: Wed Sep 8 12:42:06 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Sep 25 20:53:32 2021 +0200

    Update syscall lists for Linux 5.14
    
    Linux 5.14 has two new syscalls, memfd_secret (on some architectures
    only) and quotactl_fd.  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 89dc0372a9055e7ef86fe19be6201fa0b16b2f0e)
    (cherry picked from commit 005bafcf5b8a85d4c82831401f052747e160a7e8)

 sysdeps/unix/sysv/linux/aarch64/arch-syscall.h           | 2 ++
 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              | 2 ++
 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/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               | 6 ++++--
 sysdeps/unix/sysv/linux/x86_64/64/arch-syscall.h         | 2 ++
 sysdeps/unix/sysv/linux/x86_64/x32/arch-syscall.h        | 2 ++
 26 files changed, 33 insertions(+), 2 deletions(-)

commit dd81a817338ec076d753fb9801ef4d0d7141ac35
Author:     Joseph Myers <joseph@codesourcery.com>
AuthorDate: Tue Sep 7 13:08:38 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Sep 25 20:53:08 2021 +0200

    Use Linux 5.14 in build-many-glibcs.py
    
    This patch makes build-many-glibcs.py use Linux 5.14.
    
    Tested with build-many-glibcs.py (host-libraries, compilers and glibcs
    builds).
    
    (cherry picked from commit 4e04a47208e1712fcf202a6d9831f0900d575225)
    (cherry picked from commit 007d699d0e0d0957eead78ad252ad592656284de)

 scripts/build-many-glibcs.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 445c3b5a31dc63346b5030342aea8ac71af6610a
Author:     Aurelien Jarno <aurelien@aurel32.net>
AuthorDate: Fri Sep 3 00:28:14 2021 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Sep 25 20:52:48 2021 +0200

    Fix failing nss/tst-nss-files-hosts-long with local resolver
    
    When a local resolver like unbound is listening on the IPv4 loopback
    address 127.0.0.1, the nss/tst-nss-files-hosts-long test fails. This is
    due to:
    - the default resolver in the absence of resolv.conf being 127.0.0.1
    - the default DNS NSS database configuration in the absence of
      nsswitch.conf being 'hosts: dns [!UNAVAIL=return] file'
    
    This causes the requests for 'test4' and 'test6' to first be sent to the
    local resolver, which responds with NXDOMAIN in the likely case those
    records do no exist. In turn that causes the access to /etc/hosts to be
    skipped, which is the purpose of that test.
    
    Fix that by providing a simple nsswitch.conf file forcing access to
    /etc/hosts for that test. I have tested that the only changed result in
    the testsuite is that test.
    
    (cherry picked from commit 2738480a4b0866723fb8c633f36bdd34a8767581)
    (cherry picked from commit ae925404a10bf0ea63d6e8d41e3821f68b4d776c)

 nss/tst-nss-files-hosts-long.root/etc/nsswitch.conf | 1 +
 1 file changed, 1 insertion(+)

commit 5767420fcb230edfc652e02c5098e858f0b57f6c
Author:     Siddhesh Poyarekar <siddhesh@sourceware.org>
AuthorDate: Mon Sep 13 20:48:35 2021 +0530
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Sep 25 20:52:26 2021 +0200

    iconvconfig: Fix behaviour with --prefix [BZ #28199]
    
    The consolidation of configuration parsing broke behaviour with
    --prefix, where the prefix bled into the modules cache.  Accept a
    prefix which, when non-NULL, is prepended to the path when looking for
    configuration files but only the original directory is added to the
    modules cache.
    
    This has no effect on the codegen of gconv_conf since it passes NULL.
    
    Reported-by: Patrick McCarty <patrick.mccarty@intel.com>
    Reported-by: Michael Hudson-Doyle <michael.hudson@canonical.com>
    Reviewed-by: Andreas Schwab <schwab@linux-m68k.org>
    (cherry picked from commit 43cea6d5652b6b9e61ac6ecc69419c909b504f47)
    (cherry picked from commit 3fc51f35b4f32e1bb99d85c1578e930e725ff929)

 iconv/gconv_conf.c         |  2 +-
 iconv/gconv_parseconfdir.h | 22 +++++++++++++++-------
 iconv/iconvconfig.c        | 16 ++++++++++++----
 3 files changed, 28 insertions(+), 12 deletions(-)

commit 4bd622a4dd20d1a0366737dce83db72c70a03ce7
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Mon Sep 13 11:06:08 2021 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Sep 25 20:51:57 2021 +0200

    nptl: Fix race between pthread_kill and thread exit (bug 12889)
    
    A new thread exit lock and flag are introduced.  They are used to
    detect that the thread is about to exit or has exited in
    __pthread_kill_internal, and the signal is not sent in this case.
    
    The test sysdeps/pthread/tst-pthread_cancel-select-loop.c is derived
    from a downstream test originally written by Marek Polacek.
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit 526c3cf11ee9367344b6b15d669e4c3cb461a2be)
    (cherry picked from commit a8ac8c4725ddb1119764126a8674a04c9dd5aea8)

 NEWS                                             |   1 +
 nptl/allocatestack.c                             |   3 +
 nptl/descr.h                                     |   6 ++
 nptl/pthread_create.c                            |  14 +++
 nptl/pthread_kill.c                              |  65 +++++++-----
 sysdeps/pthread/Makefile                         |   2 +
 sysdeps/pthread/tst-pthread_cancel-select-loop.c |  87 ++++++++++++++++
 sysdeps/pthread/tst-pthread_kill-exiting.c       | 123 +++++++++++++++++++++++
 8 files changed, 276 insertions(+), 25 deletions(-)

commit 149ade8730d212d431906ceae48a5184c6c07940
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Mon Sep 13 11:06:08 2021 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Sep 25 20:51:26 2021 +0200

    nptl: pthread_kill, pthread_cancel should not fail after exit (bug 19193)
    
    This closes one remaining race condition related to bug 12889: if
    the thread already exited on the kernel side, returning ESRCH
    is not correct because that error is reserved for the thread IDs
    (pthread_t values) whose lifetime has ended.  In case of a
    kernel-side exit and a valid thread ID, no signal needs to be sent
    and cancellation does not have an effect, so just return 0.
    
    sysdeps/pthread/tst-kill4.c triggers undefined behavior and is
    removed with this commit.
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit 8af8456004edbab71f8903a60a3cae442cf6fe69)
    (cherry picked from commit 3abf3bd4edc86fb28c099cc85203cb46a811e0b8)

 NEWS                                        |  1 +
 nptl/pthread_cancel.c                       |  9 +--
 nptl/pthread_kill.c                         |  7 ++-
 sysdeps/pthread/Makefile                    |  5 +-
 sysdeps/pthread/tst-kill4.c                 | 90 -----------------------------
 sysdeps/pthread/tst-pthread_cancel-exited.c | 45 +++++++++++++++
 sysdeps/pthread/tst-pthread_kill-exited.c   | 46 +++++++++++++++
 7 files changed, 107 insertions(+), 96 deletions(-)

commit 1238a70050b959bbba3d85f7f65241cb5f6287cc
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Mon Aug 30 13:43:56 2021 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Sep 25 20:51:07 2021 +0200

    support: Add support_wait_for_thread_exit
    
    (cherry picked from commit 032d74eaf6179100048a5bf0ce942e97dc8b9a60)
    (cherry picked from commit addc9d62d61eea790a35328cbfce53333a07bd3e)

 support/Makefile                       |  3 +-
 support/support.h                      |  4 ++
 support/support_wait_for_thread_exit.c | 72 ++++++++++++++++++++++++++++++++++
 3 files changed, 78 insertions(+), 1 deletion(-)

commit 4d252fd08382be5ff13b8654fe01bb5ab0f0d993
Author:     Jiaxun Yang <jiaxun.yang@flygoat.com>
AuthorDate: Tue Sep 7 13:31:42 2021 +0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Sep 25 20:50:40 2021 +0200

    MIPS: Setup errno for {f,l,}xstat
    
    {f,l,}xstat stub for MIPS is using INTERNAL_SYSCALL
    to do xstat syscall for glibc ver, However it leaves
    errno untouched and thus giving bad errno output.
    
    Setup errno properly when syscall returns non-zero.
    
    Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
    Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
    
    (cherry picked from commit 66016ec8aeefd40e016d7040d966484c764b0e9c)
    (cherry picked from commit 52d0119743180164d1664b6773ac5d873f224608)

 sysdeps/unix/sysv/linux/mips/fxstat.c | 4 +++-
 sysdeps/unix/sysv/linux/mips/lxstat.c | 4 +++-
 sysdeps/unix/sysv/linux/mips/xstat.c  | 4 +++-
 3 files changed, 9 insertions(+), 3 deletions(-)

commit 99d1623b40cdfe65e34211f764ea57f4879e40c5
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Sat Aug 28 06:10:38 2021 -0700
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Sep 25 20:50:22 2021 +0200

    x86-64: Use testl to check __x86_string_control
    
    Use testl, instead of andl, to check __x86_string_control to avoid
    updating __x86_string_control.
    
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    (cherry picked from commit 3c8b9879cab6d41787bc5b14c1748f62fd6d0e5f)
    (cherry picked from commit f2413f2710d5d5cc884b413b83fcf8198e3717fa)

 sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

commit 5208915398997823fcb10326a6429d674151f765
Author:     Arjun Shankar <arjun@redhat.com>
AuthorDate: Fri Aug 20 16:24:05 2021 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Sep 25 20:50:00 2021 +0200

    elf: Fix missing colon in LD_SHOW_AUXV output [BZ #28253]
    
    This commit adds a missing colon in the AT_MINSIGSTKSZ entry in
    the _dl_show_auxv function.
    
    (cherry picked from commit 82fbcd7118d760492e2ecc9fa291e358b9ba0361)
    (cherry picked from commit 9acab0bba6a5a57323b1f94bf95b21618a9e5aa4)

 elf/dl-sysdep.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 92842f76142619d1e74165b0db79c0d5d530aa18 (tag: gentoo/glibc-2.34-2)
Author:     Nikita Popov <npv1310@gmail.com>
AuthorDate: Thu Aug 12 16:09:50 2021 +0530
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Aug 18 02:14:14 2021 +0200

    librt: add test (bug 28213)
    
    This test implements following logic:
    1) Create POSIX message queue.
       Register a notification with mq_notify (using NULL attributes).
       Then immediately unregister the notification with mq_notify.
       Helper thread in a vulnerable version of glibc
       should cause NULL pointer dereference after these steps.
    2) Once again, register the same notification.
       Try to send a dummy message.
       Test is considered successfulif the dummy message
       is successfully received by the callback function.
    
    Signed-off-by: Nikita Popov <npv1310@gmail.com>
    Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    (cherry picked from commit 4cc79c217744743077bf7a0ec5e0a4318f1e6641)
    (cherry picked from commit 7c987a5ccb31df80456d53a094e47f81310f549b)

 rt/Makefile      |   1 +
 rt/tst-bz28213.c | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 102 insertions(+)

commit 34ff99d3d9e1d75465dc37b12afd5543f3c8b39b
Author:     Nikita Popov <npv1310@gmail.com>
AuthorDate: Mon Aug 9 20:17:34 2021 +0530
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Aug 18 02:14:00 2021 +0200

    librt: fix NULL pointer dereference (bug 28213)
    
    Helper thread frees copied attribute on NOTIFY_REMOVED message
    received from the OS kernel.  Unfortunately, it fails to check whether
    copied attribute actually exists (data.attr != NULL).  This worked
    earlier because free() checks passed pointer before actually
    attempting to release corresponding memory.  But
    __pthread_attr_destroy assumes pointer is not NULL.
    
    So passing NULL pointer to __pthread_attr_destroy will result in
    segmentation fault.  This scenario is possible if
    notification->sigev_notify_attributes == NULL (which means default
    thread attributes should be used).
    
    Signed-off-by: Nikita Popov <npv1310@gmail.com>
    Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    (cherry picked from commit b805aebd42364fe696e417808a700fdb9800c9e8)
    (cherry picked from commit 79474303223c5665bec75ffbdb2a86ee04a2514b)

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

commit 9622b06f328323bdc9c04a7613aee1857cc0c6ad
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Fri Aug 6 09:51:38 2021 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Aug 18 02:13:41 2021 +0200

    Linux: Fix fcntl, ioctl, prctl redirects for _TIME_BITS=64 (bug 28182)
    
    __REDIRECT and __THROW are not compatible with C++ due to the ordering of the
    __asm__ alias and the throw specifier. __REDIRECT_NTH has to be used
    instead.
    
    Fixes commit 8a40aff86ba5f64a3a84883e539cb67b ("io: Add time64 alias
    for fcntl"), commit 82c395d91ea4f69120d453aeec398e30 ("misc: Add
    time64 alias for ioctl"), commit b39ffab860cd743a82c91946619f1b8158
    ("Linux: Add time64 alias for prctl").
    
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    (cherry picked from commit c87fcacc50505d550f1bb038382bcc7ea73a5926)
    (cherry picked from commit 31902ae639d6a50e768a85f1cd2a17e56b8463c2)

 NEWS                                | 7 +++++++
 io/fcntl.h                          | 8 ++++----
 misc/sys/ioctl.h                    | 4 ++--
 sysdeps/unix/sysv/linux/sys/prctl.h | 2 +-
 4 files changed, 14 insertions(+), 7 deletions(-)

commit 9d10a1605082eaa52a9f5a6aa93f4a2cfdc85b5a
Author:     Siddhesh Poyarekar <siddhesh@sourceware.org>
AuthorDate: Tue Aug 3 21:10:29 2021 +0530
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Aug 18 02:13:16 2021 +0200

    iconv_charmap: Close output file when done
    
    Reviewed-by: Arjun Shankar <arjun@redhat.com>
    (cherry picked from commit 1e0e6d656db9dfa12ef7eb67976385d3deb0d4ff)
    (cherry picked from commit 9995d0588f4f9adc68419224d2b3698e2ca4f77e)

 iconv/iconv_charmap.c | 2 ++
 1 file changed, 2 insertions(+)

commit b542a221f674d2bdefecf4ea10f51661dbc45377
Author:     Siddhesh Poyarekar <siddhesh@sourceware.org>
AuthorDate: Tue Aug 3 21:10:53 2021 +0530
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Aug 18 02:12:58 2021 +0200

    copy_and_spawn_sgid: Avoid double calls to close()
    
    If close() on infd and outfd succeeded, reset the fd numbers so that
    we don't attempt to close them again.
    
    Reviewed-by: Arjun Shankar <arjun@redhat.com>
    (cherry picked from commit 45caed9d67a00af917d8b5b88d4b5eb1225b7aef)
    (cherry picked from commit 7ff4da3dc26de351a5abe7c2905038cbe55c8041)

 support/support_capture_subprocess.c | 1 +
 1 file changed, 1 insertion(+)

commit 8bd745d22932a87d7f39591b7938ff9c6218a59a
Author:     Siddhesh Poyarekar <siddhesh@sourceware.org>
AuthorDate: Tue Aug 3 21:11:03 2021 +0530
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Aug 18 02:12:39 2021 +0200

    gaiconf_init: Avoid double-free in label and precedence lists
    
    labellist and precedencelist could get freed a second time if there
    are allocation failures, so set them to NULL to avoid a double-free.
    
    Reviewed-by: Arjun Shankar <arjun@redhat.com>
    (cherry picked from commit 77a34079d8f3d63b61543bf3af93043f8674e4c4)
    (cherry picked from commit a5bd2e10e0c25b80286dc36068e22a4cb4893af0)

 sysdeps/posix/getaddrinfo.c | 2 ++
 1 file changed, 2 insertions(+)

commit 3045424a78004b4a607fa4ff54c5bd0429ff6ecf
Author:     Siddhesh Poyarekar <siddhesh@sourceware.org>
AuthorDate: Tue Aug 3 21:10:20 2021 +0530
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Aug 18 02:12:18 2021 +0200

    gconv_parseconfdir: Fix memory leak
    
    The allocated `conf` would leak if we have to skip over the file due
    to the underlying filesystem not supporting dt_type.
    
    Reviewed-by: Arjun Shankar <arjun@redhat.com>
    (cherry picked from commit 5f9b78fe35d08739b6da1e5b356786d41116c108)
    (cherry picked from commit 3a48da47a91ccc6f5de260574809e7a44551b876)

 iconv/gconv_parseconfdir.h | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

commit 8ffc0634122e0a8ff51113e2dbf5b1705c7963fb
Author:     Siddhesh Poyarekar <siddhesh@sourceware.org>
AuthorDate: Tue Aug 3 21:10:10 2021 +0530
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Aug 18 02:11:59 2021 +0200

    ldconfig: avoid leak on empty paths in config file
    
    Reviewed-by: Arjun Shankar <arjun@redhat.com>
    (cherry picked from commit b0234d79e7d82475d1666f25326ec045c045b3ed)
    (cherry picked from commit 0b03996304f86d6dba8f0d4b7048b9bb7186f17d)

 elf/ldconfig.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

commit 83b7893377b93d84e8bea1be08686b96cb98024d (tag: gentoo/glibc-2.34-1)
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: Sat Jul 11 20:06:51 2020 +0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue Aug 3 00:37:00 2021 +0200

    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 21bbee17488159cff563f90ed83aee59703cb21e
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: Tue Aug 3 00:36:50 2021 +0200

    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 5d65bb98c9ec8d3657b5566e9fb50d46319f65a3
Author:     Mike FABIAN <mfabian@redhat.com>
AuthorDate: Mon Aug 10 15:58:12 2015 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue Aug 3 00:36:25 2021 +0200

    Add C.UTF-8 locale
    
    Source:
    https://src.fedoraproject.org/rpms/glibc/raw/master/f/glibc-c-utf8-locale.patch
    
    Notes from there:
    This patch needs to upstream as part of Carlos O'Donell
    <carlos@redhat.com>'s work on enabling upstream C.UTF-8 support. This
    work is currently blocked on cleaning up the test results to prove that
    full code-point sorting is working as intended.
    Note that this patch does not provide full code-point sorting as
    expected.
    This patch needs to upstream as soon as possible since it would be nice
    to have this in F29 and fixed.
    
    Further information:
    https://bugzilla.redhat.com/show_bug.cgi?id=902094
    https://sourceware.org/bugzilla/show_bug.cgi?id=17318
    https://bugs.gentoo.org/671024

 localedata/SUPPORTED |   1 +
 localedata/locales/C | 238 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 239 insertions(+)

commit 60c8192d7a9245a2d1ad491d73b2677564d41374
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: Tue Aug 3 00:36:09 2021 +0200

    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 10aed4ee2c685613d190434649bbac896b364680
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: Tue Aug 3 00:35:59 2021 +0200

    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 479864345ca9f13e439b68681e13beb3dce60f7c
Author:     Mike Frysinger <vapier@gentoo.org>
AuthorDate: Tue Aug 3 00:34:59 2021 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue Aug 3 00:34:59 2021 +0200

    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(+)
