commit d00012724f893e85d2ce686ad7aa004d1ff1ffc3 (HEAD -> gentoo/2.34, gentoo/gentoo/2.34)
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(+)
