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