commit a3502594cb381d0304c193d33bf3791b6195d7d3 (HEAD -> gentoo/2.37, gentoo/gentoo/2.37)
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Fri Apr 28 17:55:39 2023 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 9 00:17:02 2023 +0200

    gmon: Revert addition of tunables to the manual
    
    These tunables had to be removed over GLIBC_PRIVATE ABI stability
    concerns.
    
    (cherry picked from commit 7c32cb7dd88cf100b0b412163896e30aa2ee671a)

 manual/tunables.texi | 59 ----------------------------------------------------
 1 file changed, 59 deletions(-)

commit b31637610f8b80538867c7e7bcce0e705e634ada
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Fri Apr 28 17:07:38 2023 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 9 00:16:47 2023 +0200

    gmon: Revert addition of tunables to preserve GLIBC_PRIVATE ABI
    
    Otherwise, processes are likely to crash during concurrent updates
    to a new glibc version on the stable release branch.
    
    The test gmon/tst-mcount-overflow depends on those tunables, so
    it has to be removed as well.
    
    (cherry picked from commit a908c18d47925d23f5b85a21c1b81254fc0c3a44)

 gmon/Makefile | 14 +-------------
 gmon/gmon.c   | 16 ----------------
 2 files changed, 1 insertion(+), 29 deletions(-)

commit 7a59a556f119715b7af18c62ffe93fe473d8b42a
Author:     Simon Kissane <skissane@gmail.com>
AuthorDate: Sat Feb 11 08:58:02 2023 +1100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 9 00:16:30 2023 +0200

    gmon: fix memory corruption issues [BZ# 30101]
    
    V2 of this patch fixes an issue in V1, where the state was changed to ON not
    OFF at end of _mcleanup. I hadn't noticed that (counterintuitively) ON=0 and
    OFF=3, hence zeroing the buffer turned it back on. So set the state to OFF
    after the memset.
    
    1. Prevent double free, and reads from unallocated memory, when
       _mcleanup is (incorrectly) called two or more times in a row,
       without an intervening call to __monstartup; with this patch, the
       second and subsequent calls effectively become no-ops instead.
       While setting tos=NULL is minimal fix, safest action is to zero the
       whole gmonparam buffer.
    
    2. Prevent memory leak when __monstartup is (incorrectly) called two
       or more times in a row, without an intervening call to _mcleanup;
       with this patch, the second and subsequent calls effectively become
       no-ops instead.
    
    3. After _mcleanup, treat __moncontrol(1) as __moncontrol(0) instead.
       With zeroing of gmonparam buffer in _mcleanup, this stops the
       state incorrectly being changed to GMON_PROF_ON despite profiling
       actually being off. If we'd just done the minimal fix to _mcleanup
       of setting tos=NULL, there is risk of far worse memory corruption:
       kcount would point to deallocated memory, and the __profil syscall
       would make the kernel write profiling data into that memory,
       which could have since been reallocated to something unrelated.
    
    4. Ensure __moncontrol(0) still turns off profiling even in error
       state. Otherwise, if mcount overflows and sets state to
       GMON_PROF_ERROR, when _mcleanup calls __moncontrol(0), the __profil
       syscall to disable profiling will not be invoked. _mcleanup will
       free the buffer, but the kernel will still be writing profiling
       data into it, potentially corrupted arbitrary memory.
    
    Also adds a test case for (1). Issues (2)-(4) are not feasible to test.
    
    Signed-off-by: Simon Kissane <skissane@gmail.com>
    Reviewed-by: DJ Delorie <dj@redhat.com>
    (cherry picked from commit bde121872001d8f3224eeafa5b7effb871c3fbca)
    (cherry picked from commit ff3a71ec1fc02757b38c9c3209118d14dd10c7b6)

 NEWS                |  1 +
 gmon/Makefile       | 15 ++++++++++++++-
 gmon/gmon.c         | 26 +++++++++++++++++++-------
 gmon/tst-mcleanup.c | 31 +++++++++++++++++++++++++++++++
 4 files changed, 65 insertions(+), 8 deletions(-)

commit 10c44b2edee400d74d525bdfd6c93e70a35bc8be
Author:     Simon Kissane <skissane@gmail.com>
AuthorDate: Sat Feb 11 20:12:13 2023 +1100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 9 00:16:10 2023 +0200

    gmon: improve mcount overflow handling [BZ# 27576]
    
    When mcount overflows, no gmon.out file is generated, but no message is printed
    to the user, leaving the user with no idea why, and thinking maybe there is
    some bug - which is how BZ 27576 ended up being logged. Print a message to
    stderr in this case so the user knows what is going on.
    
    As a comment in sys/gmon.h acknowledges, the hardcoded MAXARCS value is too
    small for some large applications, including the test case in that BZ. Rather
    than increase it, add tunables to enable MINARCS and MAXARCS to be overridden
    at runtime (glibc.gmon.minarcs and glibc.gmon.maxarcs). So if a user gets the
    mcount overflow error, they can try increasing maxarcs (they might need to
    increase minarcs too if the heuristic is wrong in their case.)
    
    Note setting minarcs/maxarcs too large can cause monstartup to fail with an
    out of memory error. If you set them large enough, it can cause an integer
    overflow in calculating the buffer size. I haven't done anything to defend
    against that - it would not generally be a security vulnerability, since these
    tunables will be ignored in suid/sgid programs (due to the SXID_ERASE default),
    and if you can set GLIBC_TUNABLES in the environment of a process, you can take
    it over anyway (LD_PRELOAD, LD_LIBRARY_PATH, etc). I thought about modifying
    the code of monstartup to defend against integer overflows, but doing so is
    complicated, and I realise the existing code is susceptible to them even prior
    to this change (e.g. try passing a pathologically large highpc argument to
    monstartup), so I decided just to leave that possibility in-place.
    
    Add a test case which demonstrates mcount overflow and the tunables.
    
    Document the new tunables in the manual.
    
    Signed-off-by: Simon Kissane <skissane@gmail.com>
    Reviewed-by: DJ Delorie <dj@redhat.com>
    (cherry picked from commit 31be941e4367c001b2009308839db5c67bf9dcbc)
    (cherry picked from commit d230623264e300ac1c827cb83ad7818f122a6a98)

 NEWS                              |  1 +
 elf/dl-tunables.list              | 13 +++++++
 gmon/Makefile                     | 22 +++++++++++-
 gmon/gmon.c                       | 29 +++++++++++++---
 gmon/mcount.c                     |  5 +++
 gmon/sys/gmon.h                   |  6 ++--
 gmon/tst-mcount-overflow-check.sh | 45 ++++++++++++++++++++++++
 gmon/tst-mcount-overflow.c        | 72 +++++++++++++++++++++++++++++++++++++++
 manual/tunables.texi              | 59 ++++++++++++++++++++++++++++++++
 9 files changed, 245 insertions(+), 7 deletions(-)

commit a0e4c7a707b4f42340809cbfd44720646d3d87e3
Author:     Леонид Юрьев (Leonid Yuriev) <leo@yuriev.ru>
AuthorDate: Sat Feb 4 14:41:38 2023 +0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 9 00:15:49 2023 +0200

    gmon: Fix allocated buffer overflow (bug 29444)
    
    The `__monstartup()` allocates a buffer used to store all the data
    accumulated by the monitor.
    
    The size of this buffer depends on the size of the internal structures
    used and the address range for which the monitor is activated, as well
    as on the maximum density of call instructions and/or callable functions
    that could be potentially on a segment of executable code.
    
    In particular a hash table of arcs is placed at the end of this buffer.
    The size of this hash table is calculated in bytes as
       p->fromssize = p->textsize / HASHFRACTION;
    
    but actually should be
       p->fromssize = ROUNDUP(p->textsize / HASHFRACTION, sizeof(*p->froms));
    
    This results in writing beyond the end of the allocated buffer when an
    added arc corresponds to a call near from the end of the monitored
    address range, since `_mcount()` check the incoming caller address for
    monitored range but not the intermediate result hash-like index that
    uses to write into the table.
    
    It should be noted that when the results are output to `gmon.out`, the
    table is read to the last element calculated from the allocated size in
    bytes, so the arcs stored outside the buffer boundary did not fall into
    `gprof` for analysis. Thus this "feature" help me to found this bug
    during working with https://sourceware.org/bugzilla/show_bug.cgi?id=29438
    
    Just in case, I will explicitly note that the problem breaks the
    `make test t=gmon/tst-gmon-dso` added for Bug 29438.
    There, the arc of the `f3()` call disappears from the output, since in
    the DSO case, the call to `f3` is located close to the end of the
    monitored range.
    
    Signed-off-by: Леонид Юрьев (Leonid Yuriev) <leo@yuriev.ru>
    
    Another minor error seems a related typo in the calculation of
    `kcountsize`, but since kcounts are smaller than froms, this is
    actually to align the p->froms data.
    
    Co-authored-by: DJ Delorie <dj@redhat.com>
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    (cherry picked from commit 801af9fafd4689337ebf27260aa115335a0cb2bc)
    (cherry picked from commit 5d750495db62eeb3c5a62b80a1747b552db664fb)

 NEWS        | 1 +
 gmon/gmon.c | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

commit 8ff6e9a3e6c2d183e73740c811aa6674564613b5
Author:     Adam Yi <ayi@janestreet.com>
AuthorDate: Tue Mar 7 07:30:02 2023 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 9 00:15:29 2023 +0200

    posix: Fix system blocks SIGCHLD erroneously [BZ #30163]
    
    Fix bug that SIGCHLD is erroneously blocked forever in the following
    scenario:
    
    1. Thread A calls system but hasn't returned yet
    2. Thread B calls another system but returns
    
    SIGCHLD would be blocked forever in thread B after its system() returns,
    even after the system() in thread A returns.
    
    Although POSIX does not require, glibc system implementation aims to be
    thread and cancellation safe. This bug was introduced in
    5fb7fc96350575c9adb1316833e48ca11553be49 when we moved reverting signal
    mask to happen when the last concurrently running system returns,
    despite that signal mask is per thread. This commit reverts this logic
    and adds a test.
    
    Signed-off-by: Adam Yi <ayi@janestreet.com>
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit 436a604b7dc741fc76b5a6704c6cd8bb178518e7)
    (cherry picked from commit 78ab913eabc7715f959e87e3c510aa6773a1cda6)

 NEWS                         |  1 +
 stdlib/tst-system.c          | 26 +++++++++++++++++++++++
 support/Makefile             |  2 ++
 support/dtotimespec-time64.c | 27 ++++++++++++++++++++++++
 support/dtotimespec.c        | 50 ++++++++++++++++++++++++++++++++++++++++++++
 support/shell-container.c    | 28 +++++++++++++++++++++++++
 support/timespec.h           |  4 ++++
 sysdeps/posix/system.c       |  6 +++---
 8 files changed, 141 insertions(+), 3 deletions(-)

commit ab502a0349b85286f01dc2d7932d63e65c1ab706
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Mon Apr 3 17:23:11 2023 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 9 00:15:12 2023 +0200

    x86_64: Fix asm constraints in feraiseexcept (bug 30305)
    
    The divss instruction clobbers its first argument, and the constraints
    need to reflect that.  Fortunately, with GCC 12, generated code does
    not actually change, so there is no externally visible bug.
    
    Suggested-by: Jakub Jelinek <jakub@redhat.com>
    Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
    (cherry picked from commit 5d1ccdda7b0c625751661d50977f3dfbc73f8eae)
    (cherry picked from commit 9cc2f41e52079869b64ee94d81f10626838f63de)

 NEWS                             | 1 +
 sysdeps/x86_64/fpu/fraiseexcpt.c | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

commit 229fb1a83cfd9ca89ac6002c21d11768c35b7666
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Tue Feb 21 09:20:28 2023 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 9 00:14:44 2023 +0200

    gshadow: Matching sgetsgent, sgetsgent_r ERANGE handling (bug 30151)
    
    Before this change, sgetsgent_r did not set errno to ERANGE, but
    sgetsgent only check errno, not the return value from sgetsgent_r.
    Consequently, sgetsgent did not detect any error, and reported
    success to the caller, without initializing the struct sgrp object
    whose address was returned.
    
    This commit changes sgetsgent_r to set errno as well.  This avoids
    similar issues in applications which only change errno.
    
    Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    (cherry picked from commit 969e9733c7d17edf1e239a73fa172f357561f440)
    (cherry picked from commit 97ad4c64b9b65f4aacfef0176c1ab52264d94a9a)

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

commit fca36fd1c57118f55ee075f635135cf88d04daf3
Author:     Sam James <sam@gentoo.org>
AuthorDate: Tue Feb 21 09:27:26 2023 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue May 9 00:14:02 2023 +0200

    stdio-common: tests: don't double-define _FORTIFY_SOURCE
    
    Exactly the same as 35bcb08eaa953c9b8bef6ab2486dc4361e1f26c0.
    
    If using -D_FORITFY_SOURCE=3 (in my case, I've patched GCC to add
    =3 instead of =2 (we've done =2 for years in Gentoo)), building
    glibc tests will fail on tst-bz11319-fortify2 like:
    ```
    <command-line>: error: "_FORTIFY_SOURCE" redefined [-Werror]
    <built-in>: note: this is the location of the previous definition
    cc1: all warnings being treated as errors
    ```
    
    It's just because we're always setting -D_FORTIFY_SOURCE=2
    rather than unsetting it first. If F_S is already 2, it's harmless,
    but if it's another value (say, 1, or 3), the compiler will bawk.
    
    (I'm not aware of a reason this couldn't be tested with =3,
    but the toolchain support is limited for that (too new), and we want
    to run the tests everywhere possible.)
    
    As Siddhesh noted previously, we could implement some fallback
    logic to determine the maximal F_S value supported by the toolchain,
    which is a bit easier now that autoconf-archive has been updated for F_S=3
    (https://github.com/autoconf-archive/autoconf-archive/pull/269), but let's
    revisit this if it continues to crop up.
    
    Signed-off-by: Sam James <sam@gentoo.org>
    Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    (cherry picked from commit ecf8ae6704d5034fc2d5e29e5dc88dbca981581e)
    (cherry picked from commit 1d63573f81945a489ea169636fa11850bc74716b)

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

commit 009844bd9afb60882b503f49eb634ef370b2d9dd
Author:     Arsen Arsenović <arsen@gentoo.org>
AuthorDate: Tue Mar 7 11:29:35 2023 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon May 8 23:42:27 2023 +0200

    elf: Add missing dependency between resolvfail and testobj1.so
    
    It was possible to run this test individually and have it fail because
    it can't find testobj1.so.  This patch adds that dependency, to prevent
    such issues.
    
    Reviewed-by: Florian Weimer <fweimer@redhat.com>
    (cherry picked from commit f7e751affbedf67e16ef97e9da430bd67d793891)

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

commit dc2ae0658733805d0deed56ee630836e107b89d8
Author:     Arsen Arsenović <arsen@gentoo.org>
AuthorDate: Tue Mar 7 11:29:34 2023 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon May 8 23:42:17 2023 +0200

    elf: Add -z lazy to some more tests
    
    Some toolchains, such as that used on Gentoo Hardened, set -z now out of
    the box.  This trips up a couple of tests.
    
    Reviewed-by: Florian Weimer <fweimer@redhat.com>
    (cherry picked from commit 6c7388d0b95ef9ae39fbe6f733e2c5049769c4f9)

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

commit 4a99d09c68732cfac2c8efb6b963f25f42b43805 (tag: gentoo/glibc-2.37-4)
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Tue Feb 21 09:20:28 2023 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue Apr 11 00:38:43 2023 +0200

    gshadow: Matching sgetsgent, sgetsgent_r ERANGE handling (bug 30151)
    
    Before this change, sgetsgent_r did not set errno to ERANGE, but
    sgetsgent only check errno, not the return value from sgetsgent_r.
    Consequently, sgetsgent did not detect any error, and reported
    success to the caller, without initializing the struct sgrp object
    whose address was returned.
    
    This commit changes sgetsgent_r to set errno as well.  This avoids
    similar issues in applications which only change errno.
    
    Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    (cherry picked from commit 969e9733c7d17edf1e239a73fa172f357561f440)

 gshadow/Makefile        |  2 +-
 gshadow/sgetsgent_r.c   |  5 +++-
 gshadow/tst-sgetsgent.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 74 insertions(+), 2 deletions(-)

commit 11fcbaca45b3f25bab261b17c5b46832de24208f (tag: gentoo/glibc-2.37-3)
Author:     Joan Bruguera <joanbrugueram@gmail.com>
AuthorDate: Sat Feb 18 21:52:15 2023 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Feb 23 23:08:35 2023 +0100

    elf: Restore ldconfig libc6 implicit soname logic [BZ #30125]
    
    While cleaning up old libc version support, the deprecated libc4 code was
    accidentally kept in `implicit_soname`, instead of the libc6 code.
    
    This causes additional symlinks to be created by `ldconfig` for libraries
    without a soname, e.g. a library `libsomething.123.456.789` without a soname
    will create a `libsomething.123` -> `libsomething.123.456.789` symlink.
    
    As the libc6 version of the `implicit_soname` code is a trivial `xstrdup`,
    just inline it and remove `implicit_soname` altogether.
    
    Some further simplification looks possible (e.g. the call to `create_links`
    looks like a no-op if `soname == NULL`, other than the verbose printfs), but
    logic is kept as-is for now.
    
    Fixes: BZ #30125
    Fixes: 8ee878592c4a ("Assume only FLAG_ELF_LIBC6 suport")
    Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit 1b0ea8c5d886fedabd611a569b5ec58a6f5153e6)
    (cherry picked from commit 590d0e089b06f158ded713f5e5600eaa66dcea44)

 NEWS                                         |  2 ++
 elf/Makefile                                 | 14 ++++++++
 elf/ldconfig.c                               |  4 +--
 elf/readlib.c                                | 19 -----------
 elf/tst-ldconfig-soname-lib-with-soname.c    |  1 +
 elf/tst-ldconfig-soname-lib-without-soname.c |  1 +
 elf/tst-ldconfig-soname.sh                   | 49 ++++++++++++++++++++++++++++
 sysdeps/generic/ldconfig.h                   |  2 --
 8 files changed, 69 insertions(+), 23 deletions(-)

commit 12dd16c80471a986c7e01fd134794581bbb9813a
Author:     Vitaly Buka <vitalybuka@google.com>
AuthorDate: Sat Feb 18 12:53:41 2023 -0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Feb 23 23:08:07 2023 +0100

    stdlib: Undo post review change to 16adc58e73f3 [BZ #27749]
    
    Post review removal of "goto restart" from
    https://sourceware.org/pipermail/libc-alpha/2021-April/125470.html
    introduced a bug when some atexit handers skipped.
    
    Signed-off-by: Vitaly Buka <vitalybuka@google.com>
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit fd78cfa72ea2bab30fdb4e1e0672b34471426c05)
    (cherry picked from commit 790e504a172a5ef7399b3e3f481d76394dce0a23)

 stdlib/Makefile                |  1 +
 stdlib/exit.c                  |  7 ++--
 stdlib/test-atexit-recursive.c | 75 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 81 insertions(+), 2 deletions(-)

commit 3e7452792297e2d224f473dbc6b9d3259e9d2e5d
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Wed Feb 8 18:11:04 2023 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Feb 23 23:07:43 2023 +0100

    elf: Smoke-test ldconfig -p against system /etc/ld.so.cache
    
    The test is sufficient to detect the ldconfig bug fixed in
    commit 9fe6f6363886aae6b2b210cae3ed1f5921299083 ("elf: Fix 64 time_t
    support for installed statically binaries").
    
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    (cherry picked from commit 9fd63e35371b9939e9153907c6a753e6960b68ad)
    (cherry picked from commit d8e1a7590d375159fb5aac07ad8111ab4699e994)

 elf/Makefile          |  6 ++++
 elf/tst-ldconfig-p.sh | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 83 insertions(+)

commit bb5e6edec2f9c73a16bc127f8baa22a64977393a (tag: gentoo/glibc-2.37-2)
Author:     Carlos O'Donell <carlos@redhat.com>
AuthorDate: Mon Feb 6 10:36:32 2023 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Feb 8 15:03:19 2023 +0100

    NEWS: Document CVE-2023-25139.
    
    Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    (cherry picked from commit 67c37737ed474d25fd4dc535dfd822c426e6b971)
    (cherry picked from commit 6fe86ecd787a2624cd638131629ba9a824040308)

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

commit 6b914951502185f6c2de134801d9642a0ead1321
Author:     Carlos O'Donell <carlos@redhat.com>
AuthorDate: Thu Jan 19 12:50:20 2023 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Feb 8 15:02:55 2023 +0100

    Account for grouping in printf width (bug 30068)
    
    This is a partial fix for mishandling of grouping when formatting
    integers.  It properly computes the width in the presence of grouping
    characters when the width is larger than the number of significant
    digits. The precision related issue is documented in bug 23432.
    
    Co-authored-by: Andreas Schwab <schwab@suse.de>
    (cherry picked from commit c980549cc6a1c03c23cc2fe3e7b0fe626a0364b0)
    (cherry picked from commit 07b9521fc6369d000216b96562ff7c0ed32a16c4)

 stdio-common/Makefile               |  2 ++
 stdio-common/tst-grouping3.c        | 54 +++++++++++++++++++++++++++++++++++++
 stdio-common/vfprintf-process-arg.c | 22 +++++++++++----
 3 files changed, 73 insertions(+), 5 deletions(-)

commit 94c6e75618c55c724b33f4e39dcd38c87f619d79
Author:     Andreas Schwab <schwab@suse.de>
AuthorDate: Thu Jan 26 14:25:05 2023 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Feb 8 01:09:33 2023 +0100

    Use 64-bit time_t interfaces in strftime and strptime (bug 30053)
    
    Both functions use time_t only internally, so the ABI is not affected.
    
    (cherry picked from commit 41349f6f67c83e7bafe49f985b56493d2c4c9c77)
    (cherry picked from commit fb7b95dc47b0d5ecd48339512d091b6b23e7d900)

 NEWS                        |  6 ++++++
 time/Makefile               |  3 ++-
 time/strftime_l.c           |  4 ++++
 time/strptime_l.c           |  4 +++-
 time/tst-strftime4-time64.c |  1 +
 time/tst-strftime4.c        | 52 +++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 68 insertions(+), 2 deletions(-)

commit 56f12fb5b392c27d74a2d39861173f3779c526d6
Author:     caiyinyu <caiyinyu@loongson.cn>
AuthorDate: Tue Jan 31 20:40:10 2023 +0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Feb 8 01:09:18 2023 +0100

    LoongArch: Add new relocation types.
    
    (cherry picked from commit 9f8513dc64119a424b312db97cef5d87d376defa)

 elf/elf.h | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

commit 91a357e3926a220fe79094a46ef8c6e5db75866e
Author:     Siddhesh Poyarekar <siddhesh@sourceware.org>
AuthorDate: Thu Feb 2 07:49:02 2023 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Feb 2 19:54:25 2023 +0100

    cdefs: Limit definition of fortification macros
    
    Define the __glibc_fortify and other macros only when __FORTIFY_LEVEL >
    0.  This has the effect of not defining these macros on older C90
    compilers that do not have support for variable length argument lists.
    
    Also trim off the trailing backslashes from the definition of
    __glibc_fortify and __glibc_fortify_n macros.
    
    Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    Reviewed-by: Florian Weimer <fweimer@redhat.com>
    (cherry picked from commit 2337e04e21ba6040926ec871e403533f77043c40)
    (cherry picked from commit 020b43544a26237d752eae4a715c403f29226542)

 misc/sys/cdefs.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

commit c15bbc6a0bb9c4ae58e88afb86d60bcd627b8f44
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: Fri Jan 27 20:48:15 2023 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Feb 2 19:52:59 2023 +0100

    Make stdlib/testmb compile when _FORTIFY_SOURCE is not predefined 2
    
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

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

commit a242e26190a227a9ce65af12f214eee2e0ae5aba (tag: gentoo/glibc-2.37-1)
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Fri Jan 27 14:28:34 2023 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Feb 1 20:52:41 2023 +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/dirstream.h  | 13 ++++-
 sysdeps/unix/sysv/linux/getdents64.c | 93 ------------------------------------
 sysdeps/unix/sysv/linux/olddirent.h  |  2 -
 sysdeps/unix/sysv/linux/readdir64.c  | 50 ++++++++++++++-----
 4 files changed, 50 insertions(+), 108 deletions(-)

commit d24c3327778018501a864f4e609ff487306d1129
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Fri Jan 27 14:28:33 2023 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Feb 1 20:52:38 2023 +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   | 24 +++++++----
 sysdeps/unix/sysv/linux/readdir64_r.c | 79 ++++++++---------------------------
 3 files changed, 35 insertions(+), 70 deletions(-)

commit 48a4199f90b3cb2fc9057f238a6f5cb9c151de1c
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Fri Jan 27 14:28:32 2023 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Feb 1 20:52:36 2023 +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 f5752e44d6541f6616688a9f7ecdce787f6ea0b4
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Fri Jan 27 14:28:31 2023 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Feb 1 20:52:33 2023 +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 opendir creates a map entry between the DIR d_off
    offset and the returned long int (the telldir return value).
    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 removes 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/tst-seekdir.c                        |   8 ++
 sysdeps/unix/sysv/linux/Makefile            |   1 +
 sysdeps/unix/sysv/linux/alpha/bits/dirent.h |   3 +
 sysdeps/unix/sysv/linux/bits/dirent.h       |   4 +
 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           |  11 ++-
 sysdeps/unix/sysv/linux/rewinddir.c         |   5 +
 sysdeps/unix/sysv/linux/seekdir.c           |  35 ++++++-
 sysdeps/unix/sysv/linux/telldir.c           |  35 +++++++
 sysdeps/unix/sysv/linux/telldir.h           |  65 +++++++++++++
 sysdeps/unix/sysv/linux/tst-opendir-nolfs.c | 146 ++++++++++++++++++++++++++++
 13 files changed, 319 insertions(+), 7 deletions(-)

commit 533237b781a8a803953480d1a995da0bc814c273
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Fri Jan 27 14:28:30 2023 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Feb 1 20:52:30 2023 +0100

    linux: Use getdents64 on non-LFS readdir
    
    The non-LFS opendir reserves a translation entry to be used to return
    the entry and the 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.

 dirent/tst-scandir.c                |  6 ++-
 include/dirent.h                    |  2 +-
 sysdeps/unix/sysv/linux/dirstream.h |  5 +++
 sysdeps/unix/sysv/linux/readdir.c   | 83 +++++++++++++++++++++++++------------
 4 files changed, 67 insertions(+), 29 deletions(-)

commit 5f3622b3ae40e5a06f8ec8b7af7823758c7330e6
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: Sat Jul 11 20:06:51 2020 +0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Feb 1 20:52:27 2023 +0100

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

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

commit 9b8c53ad246c97eb93b93d701ee52e766d3b73e4
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: Wed Feb 1 20:52:24 2023 +0100

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

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

commit 248740bb97be20b276c5d4d7c435ebb068e2d218
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: Wed Feb 1 20:52:21 2023 +0100

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

 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 b56fc66ad6e0a9d4a203623084ff7d1c47bd9d04
Author:     Mike Frysinger <vapier@gentoo.org>
AuthorDate: Tue Aug 3 00:34:59 2021 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Feb 1 20:52:18 2023 +0100

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

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