commit c85af8cba881d751b352e534fa16d3e92798f625 (HEAD -> gentoo/2.39, gentoo/gentoo/2.39)
Author:     Stafford Horne <shorne@gmail.com>
AuthorDate: Wed Apr 3 06:40:37 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed May 29 23:17:03 2024 +0200

    misc: Add support for Linux uio.h RWF_NOAPPEND flag
    
    In Linux 6.9 a new flag is added to allow for Per-io operations to
    disable append mode even if a file was opened with the flag O_APPEND.
    This is done with the new RWF_NOAPPEND flag.
    
    This caused two test failures as these tests expected the flag 0x00000020
    to be unused.  Adding the flag definition now fixes these tests on Linux
    6.9 (v6.9-rc1).
    
      FAIL: misc/tst-preadvwritev2
      FAIL: misc/tst-preadvwritev64v2
    
    This patch adds the flag, adjusts the test and adds details to
    documentation.
    
    Link: https://lore.kernel.org/all/20200831153207.GO3265@brightrain.aerifal.cx/
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit 3db9d208dd5f30b12900989c6d2214782b8e2011)
    (cherry picked from commit 70f560fc22212f733647c9121c26bbb2307f2e10)

 manual/llio.texi                       | 4 ++++
 misc/tst-preadvwritev2-common.c        | 5 ++++-
 sysdeps/unix/sysv/linux/bits/uio-ext.h | 1 +
 3 files changed, 9 insertions(+), 1 deletion(-)

commit 55c0cad37c8d4a80eeabcb3a85a1f4059c359227
Author:     Sunil K Pandey <skpgkp2@gmail.com>
AuthorDate: Mon May 27 10:08:18 2024 -0700
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed May 29 23:16:39 2024 +0200

    i386: Disable Intel Xeon Phi tests for GCC 15 and above (BZ 31782)
    
    This patch disables Intel Xeon Phi tests for GCC 15 and above.
    
    GCC 15 removed Intel Xeon Phi ISA support.
    commit e1a7e2c54d52d0ba374735e285b617af44841ace
    Author: Haochen Jiang <haochen.jiang@intel.com>
    Date:   Mon May 20 10:43:44 2024 +0800
    
        i386: Remove Xeon Phi ISA support
    
    Fixes BZ 31782.
    
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    (cherry picked from commit 1b713c9a5349ef3cd1a8ccf9de017c7865713c67)
    (cherry picked from commit c9d8534406ab69b9bc1fd3fdfb9e88c9580d3f24)

 sysdeps/x86/tst-cpu-features-supports.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

commit 84c818a5b7705f0727ecc93c81e99fd929503d1d
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Fri Apr 5 09:02:36 2024 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed May 29 23:16:20 2024 +0200

    Reinstate generic features-time64.h
    
    The a4ed0471d7 removed the generic version which is included by
    features.h and used by Hurd.
    
    Checked by building i686-gnu and x86_64-gnu with build-many-glibc.py.
    
    (cherry picked from commit c27f8763cffbb7db9b3f1f5e09ef24d26cbb63f4)
    (cherry picked from commit aee37de299af95007a1f00f2cdf6c1452f39e682)

 sysdeps/generic/features-time64.h | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

commit e57a5e5a96b7d687f8b03c496979b8574f46b76f
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Thu Jan 18 10:18:01 2024 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed May 29 23:15:59 2024 +0200

    Always define __USE_TIME_BITS64 when 64 bit time_t is used
    
    It was raised on libc-help [1] that some Linux kernel interfaces expect
    the libc to define __USE_TIME_BITS64 to indicate the time_t size for the
    kABI.  Different than defined by the initial y2038 design document [2],
    the __USE_TIME_BITS64 is only defined for ABIs that support more than
    one time_t size (by defining the _TIME_BITS for each module).
    
    The 64 bit time_t redirects are now enabled using a different internal
    define (__USE_TIME64_REDIRECTS). There is no expected change in semantic
    or code generation.
    
    Checked on x86_64-linux-gnu, i686-linux-gnu, aarch64-linux-gnu, and
    arm-linux-gnueabi
    
    [1] https://sourceware.org/pipermail/libc-help/2024-January/006557.html
    [2] https://sourceware.org/glibc/wiki/Y2038ProofnessDesign
    
    Reviewed-by: DJ Delorie <dj@redhat.com>
    (cherry picked from commit a4ed0471d71739928a0d0fa3258b3ff3b158e9b9)
    (cherry picked from commit dd535f4f19ef2b5c367a362af445ecadcf45401e)

 io/bits/poll2.h                                    |  2 +-
 io/fcntl.h                                         |  4 ++--
 io/fts.h                                           |  6 +++---
 io/ftw.h                                           | 12 +++++------
 io/sys/poll.h                                      |  2 +-
 io/sys/stat.h                                      | 16 +++++++--------
 io/utime.h                                         |  4 ++--
 manual/creature.texi                               |  6 ++++++
 manual/maint.texi                                  |  4 ++++
 misc/sys/ioctl.h                                   |  2 +-
 misc/sys/select.h                                  |  4 ++--
 posix/glob.h                                       |  4 ++--
 posix/sched.h                                      |  2 +-
 posix/sys/wait.h                                   |  4 ++--
 resolv/netdb.h                                     |  2 +-
 resource/sys/resource.h                            |  2 +-
 rt/aio.h                                           |  4 ++--
 rt/mqueue.h                                        |  2 +-
 signal/signal.h                                    |  2 +-
 socket/sys/socket.h                                | 14 ++++++-------
 support/timespec.h                                 |  2 +-
 support/xtime.h                                    |  2 +-
 support/xunistd.h                                  |  2 +-
 sysdeps/generic/features-time64.h                  | 19 -----------------
 sysdeps/nptl/pthread.h                             | 18 ++++++++--------
 sysdeps/pthread/semaphore.h                        |  4 ++--
 sysdeps/pthread/threads.h                          |  6 +++---
 sysdeps/unix/sysv/linux/arm/bits/struct_stat.h     |  8 ++++----
 sysdeps/unix/sysv/linux/bits/socket-constants.h    |  2 +-
 sysdeps/unix/sysv/linux/bits/time.h                |  2 +-
 sysdeps/unix/sysv/linux/bits/timex.h               |  2 +-
 .../unix/sysv/linux/bits/types/struct_msqid_ds.h   |  2 +-
 .../unix/sysv/linux/bits/types/struct_semid_ds.h   |  2 +-
 .../unix/sysv/linux/bits/types/struct_shmid_ds.h   |  2 +-
 sysdeps/unix/sysv/linux/csky/bits/struct_stat.h    |  4 ++--
 sysdeps/unix/sysv/linux/features-time64.h          |  9 ++++++--
 .../unix/sysv/linux/hppa/bits/socket-constants.h   |  2 +-
 sysdeps/unix/sysv/linux/hppa/bits/struct_stat.h    |  8 ++++----
 .../sysv/linux/hppa/bits/types/struct_msqid_ds.h   |  2 +-
 .../sysv/linux/hppa/bits/types/struct_semid_ds.h   |  2 +-
 .../sysv/linux/hppa/bits/types/struct_shmid_ds.h   |  2 +-
 sysdeps/unix/sysv/linux/m68k/bits/struct_stat.h    |  8 ++++----
 .../unix/sysv/linux/microblaze/bits/struct_stat.h  | 12 +++++------
 .../unix/sysv/linux/mips/bits/socket-constants.h   |  2 +-
 sysdeps/unix/sysv/linux/mips/bits/struct_stat.h    | 14 ++++++-------
 .../sysv/linux/mips/bits/types/struct_msqid_ds.h   |  2 +-
 .../sysv/linux/mips/bits/types/struct_semid_ds.h   |  2 +-
 .../sysv/linux/mips/bits/types/struct_shmid_ds.h   |  2 +-
 sysdeps/unix/sysv/linux/nios2/bits/struct_stat.h   |  4 ++--
 .../sysv/linux/powerpc/bits/socket-constants.h     |  2 +-
 sysdeps/unix/sysv/linux/powerpc/bits/struct_stat.h |  8 ++++----
 .../linux/powerpc/bits/types/struct_msqid_ds.h     |  2 +-
 .../linux/powerpc/bits/types/struct_semid_ds.h     |  2 +-
 .../linux/powerpc/bits/types/struct_shmid_ds.h     |  2 +-
 sysdeps/unix/sysv/linux/s390/bits/struct_stat.h    |  4 ++--
 sysdeps/unix/sysv/linux/sh/bits/struct_stat.h      |  8 ++++----
 .../unix/sysv/linux/sparc/bits/socket-constants.h  |  2 +-
 sysdeps/unix/sysv/linux/sparc/bits/struct_stat.h   |  8 ++++----
 .../sysv/linux/sparc/bits/types/struct_msqid_ds.h  |  2 +-
 .../sysv/linux/sparc/bits/types/struct_semid_ds.h  |  2 +-
 .../sysv/linux/sparc/bits/types/struct_shmid_ds.h  |  2 +-
 sysdeps/unix/sysv/linux/sys/epoll.h                |  2 +-
 sysdeps/unix/sysv/linux/sys/prctl.h                |  2 +-
 sysdeps/unix/sysv/linux/sys/timerfd.h              |  4 ++--
 sysdeps/unix/sysv/linux/sys/timex.h                |  2 +-
 sysdeps/unix/sysv/linux/x86/bits/struct_stat.h     |  8 ++++----
 .../sysv/linux/x86/bits/types/struct_semid_ds.h    |  2 +-
 sysvipc/sys/msg.h                                  |  2 +-
 sysvipc/sys/sem.h                                  |  4 ++--
 sysvipc/sys/shm.h                                  |  2 +-
 time/bits/types/struct_timespec.h                  |  4 ++--
 time/bits/types/struct_timeval.h                   |  2 +-
 time/bits/types/time_t.h                           |  2 +-
 time/sys/time.h                                    | 10 ++++-----
 time/time.h                                        | 24 +++++++++++-----------
 75 files changed, 178 insertions(+), 182 deletions(-)

commit d63ab4aacbdf422523a5a2db030daee37d6cc610
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Sat May 18 09:33:19 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed May 29 23:15:25 2024 +0200

    socket: Use may_alias on sockaddr structs (bug 19622)
    
    This supports common coding patterns.  The GCC C front end before
    version 7 rejects the may_alias attribute on a struct definition
    if it was not present in a previous forward declaration, so this
    attribute can only be conditionally applied.
    
    This implements the spirit of the change in Austin Group issue 1641.
    
    Suggested-by: Marek Polacek <polacek@redhat.com>
    Suggested-by: Jakub Jelinek <jakub@redhat.com>
    Reviewed-by: Sam James <sam@gentoo.org>
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    (cherry picked from commit 8d7b6b4cb27d4dec1dd5f7960298c1699275f962)
    (cherry picked from commit 26e7005728f0eea2972474e6be2905c467661237)

 bits/socket.h                           | 4 ++--
 inet/netinet/in.h                       | 8 +++++---
 misc/sys/cdefs.h                        | 9 +++++++++
 socket/sys/un.h                         | 2 +-
 sysdeps/mach/hurd/bits/socket.h         | 4 ++--
 sysdeps/unix/sysv/linux/bits/socket.h   | 4 ++--
 sysdeps/unix/sysv/linux/net/if_packet.h | 2 +-
 sysdeps/unix/sysv/linux/netash/ash.h    | 2 +-
 sysdeps/unix/sysv/linux/neteconet/ec.h  | 2 +-
 sysdeps/unix/sysv/linux/netiucv/iucv.h  | 2 +-
 10 files changed, 25 insertions(+), 14 deletions(-)

commit 8b0be2360784e1894675a3594eac7bdd5a93ae23
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Sat May 25 05:13:41 2024 -0700
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed May 29 23:15:01 2024 +0200

    parse_fdinfo: Don't advance pointer twice [BZ #31798]
    
    pidfd_getpid.c has
    
          /* Ignore invalid large values.  */
          if (INT_MULTIPLY_WRAPV (10, n, &n)
              || INT_ADD_WRAPV (n, *l++ - '0', &n))
            return -1;
    
    For GCC older than GCC 7, INT_ADD_WRAPV(a, b, r) is defined as
    
       _GL_INT_OP_WRAPV (a, b, r, +, _GL_INT_ADD_RANGE_OVERFLOW)
    
    and *l++ - '0' is evaluated twice.  Fix BZ #31798 by moving "l++" out of
    the if statement.  Tested with GCC 6.4 and GCC 14.1.
    
    Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit f981bf6b9db87e0732b46bfe92fdad4d363225e8)
    (cherry picked from commit 9f2b100d6705b9bbb25206b53e80d7759644e06e)

 sysdeps/unix/sysv/linux/pidfd_getpid.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

commit 2bebc22b5472fdffbc264979c243c4b73c97e34f
Author:     caiyinyu <caiyinyu@loongson.cn>
AuthorDate: Sat May 11 10:25:54 2024 +0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed May 29 23:14:40 2024 +0200

    LoongArch: Fix undefined `__memset_aligned` reference in ld.so linking.
    
    This patch from 095067efdf68c8061d6f99a21a0300841bede999 (LoongArch: Add
    glibc.cpu.hwcap support.)
    
    (cherry picked from commit c7c3f5bf80ae86b34501f473f1a9fc545c911b7f)

 sysdeps/loongarch/lp64/multiarch/dl-symbol-redir-ifunc.h | 3 +++
 1 file changed, 3 insertions(+)

commit 00beed71cfed8559f8082d03173c57069b4fd32d
Author:     Sergey Kolosov <skolosov@redhat.com>
AuthorDate: Wed Apr 10 17:58:05 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed May 29 23:14:24 2024 +0200

    socket: Add new test for connect
    
    This commit adds a simple bind/accept/connect test for an IPv4 TCP
    connection to a local process via the loopback interface.
    
    Reviewed-by: Arjun Shankar <arjun@redhat.com>
    (cherry picked from commit 3a83f79024cc023a74c3892a1673542e8e972485)
    (cherry picked from commit 32969a2b36b8cc74343182b768b3babe6f81c3aa)

 socket/Makefile      |   1 +
 socket/tst-connect.c | 113 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 114 insertions(+)

commit c4cd569b0b9fc25c54dd787cc978233a7fdf4521
Author:     Sergey Kolosov <skolosov@redhat.com>
AuthorDate: Wed Apr 10 17:58:04 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed May 29 23:14:07 2024 +0200

    libsupport: Add xgetpeername
    
    The patch adds redirections for getpeername.
    
    Reviewed-by: Arjun Shankar <arjun@redhat.com>
    (cherry picked from commit 6687a6e3f962759536a8019d31c68c1009ccd6eb)
    (cherry picked from commit 2db79c96baa1256b8fc2656596143da92fabd074)

 support/Makefile       |  1 +
 support/xgetpeername.c | 30 ++++++++++++++++++++++++++++++
 support/xsocket.h      |  1 +
 3 files changed, 32 insertions(+)

commit e0596bcd61fffcbdffaf36eaf6d384b56fd7e65c (tag: gentoo/glibc-2.39-6)
Author:     Gabi Falk <gabifalk@gmx.com>
AuthorDate: Tue May 7 18:25:00 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun May 12 12:20:13 2024 +0200

    x86_64: Fix missing wcsncat function definition without multiarch (x86-64-v4)
    
    This code expects the WCSCAT preprocessor macro to be predefined in case
    the evex implementation of the function should be defined with a name
    different from __wcsncat_evex.  However, when glibc is built for
    x86-64-v4 without multiarch support, sysdeps/x86_64/wcsncat.S defines
    WCSNCAT variable instead of WCSCAT to build it as wcsncat.  Rename the
    variable to WCSNCAT, as it is actually a better naming choice for the
    variable in this case.
    
    Reported-by: Kenton Groombridge
    Link: https://bugs.gentoo.org/921945
    Fixes: 64b8b6516b ("x86: Add evex optimized functions for the wchar_t strcpy family")
    Signed-off-by: Gabi Falk <gabifalk@gmx.com>
    Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com>
    (cherry picked from commit dd5f891c1ad9f1b43b9db93afe2a55cbb7a6194e)
    (cherry picked from commit ab4ef4421f85ea7afeb482ded51003658b08de7e)

 sysdeps/x86_64/multiarch/wcsncat-evex.S | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

commit 9aafe1104cb3b6fce27fd31f3f478250d9e64aba
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Thu May 9 20:07:01 2024 -0700
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun May 12 12:19:48 2024 +0200

    Force DT_RPATH for --enable-hardcoded-path-in-tests
    
    On Fedora 40/x86-64, linker enables --enable-new-dtags by default which
    generates DT_RUNPATH instead of DT_RPATH.  Unlike DT_RPATH, DT_RUNPATH
    only applies to DT_NEEDED entries in the executable and doesn't applies
    to DT_NEEDED entries in shared libraries which are loaded via DT_NEEDED
    entries in the executable.  Some glibc tests have libstdc++.so.6 in
    DT_NEEDED, which has libm.so.6 in DT_NEEDED.  When DT_RUNPATH is generated,
    /lib64/libm.so.6 is loaded for such tests.  If the newly built glibc is
    older than glibc 2.36, these tests fail with
    
    assert/tst-assert-c++: /export/build/gnu/tools-build/glibc-gitlab-release/build-x86_64-linux/libc.so.6: version `GLIBC_2.36' not found (required by /lib64/libm.so.6)
    assert/tst-assert-c++: /export/build/gnu/tools-build/glibc-gitlab-release/build-x86_64-linux/libc.so.6: version `GLIBC_ABI_DT_RELR' not found (required by /lib64/libm.so.6)
    
    Pass -Wl,--disable-new-dtags to linker when building glibc tests with
    --enable-hardcoded-path-in-tests.  This fixes BZ #31719.
    
    Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
    (cherry picked from commit 2dcaf70643710e22f92a351e36e3cff8b48c60dc)
    (cherry picked from commit 97bb89668d7171164975f3dc895e38343a2f3a95)

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

commit 67c2e31f7c0be205303d2873a64dcbf4d63dfc6e
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Mon May 6 13:18:45 2024 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun May 12 12:19:27 2024 +0200

    elf: Only process multiple tunable once (BZ 31686)
    
    The 680c597e9c3 commit made loader reject ill-formatted strings by
    first tracking all set tunables and then applying them. However, it does
    not take into consideration if the same tunable is set multiple times,
    where parse_tunables_string appends the found tunable without checking
    if it was already in the list. It leads to a stack-based buffer overflow
    if the tunable is specified more than the total number of tunables.  For
    instance:
    
      GLIBC_TUNABLES=glibc.malloc.check=2:... (repeat over the number of
      total support for different tunable).
    
    Instead, use the index of the tunable list to get the expected tunable
    entry.  Since now the initial list is zero-initialized, the compiler
    might emit an extra memset and this requires some minor adjustment
    on some ports.
    
    Checked on x86_64-linux-gnu and aarch64-linux-gnu.
    
    Reported-by: Yuto Maeda <maeda@cyberdefense.jp>
    Reported-by: Yutaro Shimizu <shimizu@cyberdefense.jp>
    Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    (cherry picked from commit bcae44ea8536b30a7119c0986ff5692bddacb672)
    (cherry picked from commit 71149c2a2e85a8233631cc816030d449f021bb2a)

 elf/dl-tunables.c                          | 28 ++++++++------
 elf/tst-tunables.c                         | 61 +++++++++++++++++++++++++++++-
 sysdeps/aarch64/multiarch/memset_generic.S |  4 ++
 sysdeps/sparc/sparc64/rtld-memset.c        |  3 ++
 4 files changed, 84 insertions(+), 12 deletions(-)

commit b113a6b8005ae79b7bfe438ba1c6ed1f3f227659 (tag: gentoo/glibc-2.39-5)
Author:     Gabi Falk <gabifalk@gmx.com>
AuthorDate: Tue Apr 30 20:05:04 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 4 14:37:26 2024 +0200

    Add a test to check for duplicate definitions in the static library
    
    This change follows two previous fixes addressing multiple definitions
    of __memcpy_chk and __mempcpy_chk functions on i586, and __memmove_chk
    and __memset_chk functions on i686.  The test is intended to prevent
    such issues from occurring in the future.
    
    Signed-off-by: Gabi Falk <gabifalk@gmx.com>
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    Reviewed-by: Dmitry V. Levin <ldv@altlinux.org>
    (cherry picked from commit ded2e0753e9c46debeb2e0d26c5e560d2581d314)
    (cherry picked from commit f8e462342189525e4605cf233b8f798d1c7f398d)

 Makefile | 7 +++++++
 1 file changed, 7 insertions(+)

commit 00d33b834fa88e2a7bedd3a4822deb1c17391b22
Author:     Gabi Falk <gabifalk@gmx.com>
AuthorDate: Tue Apr 30 20:05:03 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 4 14:37:05 2024 +0200

    i686: Fix multiple definitions of __memmove_chk and __memset_chk
    
    Commit c73c96a4a1af1326df7f96eec58209e1e04066d8 updated memcpy.S and
    mempcpy.S, but omitted memmove.S and memset.S.  As a result, the static
    library built as PIC, whether with or without multiarch support,
    contains two definitions for each of the __memmove_chk and __memset_chk
    symbols.
    
    /usr/lib/gcc/i686-pc-linux-gnu/14/../../../../i686-pc-linux-gnu/bin/ld: /usr/lib/gcc/i686-pc-linux-gnu/14/../../../../lib/libc.a(memset-ia32.o): in function `__memset_chk':
    /var/tmp/portage/sys-libs/glibc-2.39-r3/work/glibc-2.39/string/../sysdeps/i386/i686/memset.S:32: multiple definition of `__memset_chk'; /usr/lib/gcc/i686-pc-linux-gnu/14/../../../../lib/libc.a(memset_chk.o):/var/tmp/portage/sys-libs/glibc-2.39-r3/work/glibc-2.39/debug/../sysdeps/i386/i686/multiarch/memset_chk.c:24: first defined here
    
    After this change, regardless of PIC options, the static library, built
    for i686 with multiarch contains implementations of these functions
    respectively from debug/memmove_chk.c and debug/memset_chk.c, and
    without multiarch contains implementations of these functions
    respectively from sysdeps/i386/memmove_chk.S and
    sysdeps/i386/memset_chk.S.  This ensures that memmove and memset won't
    pull in __chk_fail and the routines it calls.
    
    Reported-by: Sam James <sam@gentoo.org>
    Tested-by: Sam James <sam@gentoo.org>
    Fixes: c73c96a4a1 ("i686: Fix build with --disable-multiarch")
    Signed-off-by: Gabi Falk <gabifalk@gmx.com>
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    Reviewed-by: Dmitry V. Levin <ldv@altlinux.org>
    (cherry picked from commit 5a2cf833f5772d6c37c7adac388dd9af9cc1c4b9)
    (cherry picked from commit 8b005d7869debac4d5cd67f65e49a0fad89da9ad)

 sysdeps/i386/i686/memmove.S | 2 +-
 sysdeps/i386/i686/memset.S  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

commit 57f0b4bec47023242d259a54d345d0bd43bb2b6e
Author:     Gabi Falk <gabifalk@gmx.com>
AuthorDate: Tue Apr 30 20:05:02 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 4 14:36:48 2024 +0200

    i586: Fix multiple definitions of __memcpy_chk and __mempcpy_chk
    
    /home/bmg/install/compilers/x86_64-linux-gnu/lib/gcc/x86_64-glibc-linux-gnu/13.2.1/../../../../x86_64-glibc-linux-gnu/bin/ld: /home/bmg/build/glibcs/i586-linux-gnu/glibc/libc.a(memcpy_chk.o): in function `__memcpy_chk':
    /home/bmg/src/glibc/debug/../sysdeps/i386/memcpy_chk.S:29: multiple definition of `__memcpy_chk';/home/bmg/build/glibcs/i586-linux-gnu/glibc/libc.a(memcpy.o):/home/bmg/src/glibc/string/../sysdeps/i386/i586/memcpy.S:31: first defined here /home/bmg/install/compilers/x86_64-linux-gnu/lib/gcc/x86_64-glibc-linux-gnu/13.2.1/../../../../x86_64-glibc-linux-gnu/bin/ld: /home/bmg/build/glibcs/i586-linux-gnu/glibc/libc.a(mempcpy_chk.o): in function `__mempcpy_chk': /home/bmg/src/glibc/debug/../sysdeps/i386/mempcpy_chk.S:28: multiple definition of `__mempcpy_chk'; /home/bmg/build/glibcs/i586-linux-gnu/glibc/libc.a(mempcpy.o):/home/bmg/src/glibc/string/../sysdeps/i386/i586/memcpy.S:31: first defined here
    
    After this change, the static library built for i586, regardless of PIC
    options, contains implementations of these functions respectively from
    sysdeps/i386/memcpy_chk.S and sysdeps/i386/mempcpy_chk.S.  This ensures
    that memcpy and mempcpy won't pull in __chk_fail and the routines it
    calls.
    
    Reported-by: Florian Weimer <fweimer@redhat.com>
    Signed-off-by: Gabi Falk <gabifalk@gmx.com>
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    Reviewed-by: Dmitry V. Levin <ldv@altlinux.org>
    (cherry picked from commit 0fdf4ba48ccce5abf567340b0ab8fa8ed8a9bc6e)
    (cherry picked from commit 8323a83abd73446dc434aceff66219712c09140b)

 sysdeps/i386/i586/memcpy.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 54b19e9905d3e152bf685ef4eb4e9a027ebc1ea7
Author:     Sam James <sam@gentoo.org>
AuthorDate: Sat May 4 13:28:54 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 4 14:36:30 2024 +0200

    Revert "i586: Fix multiple definitions of __memcpy_chk and __mempcpy_chk"
    
    This reverts commit 3148714ab61ad61281bae5a30f530d637034ac3b.
    
    I had the wrong cherry-pick reference (the commit content is right; it's
    just referring to a base that isn't upstream), but let's revert and reapply
    for clarity.
    
    Signed-off-by: Sam James <sam@gentoo.org>
    (cherry picked from commit 5141d4d83c17406f0eaea3e345ef2b52e10f386e)

 sysdeps/i386/i586/memcpy.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit a8b978125733c21199521993f6686063a6e5a3fe
Author:     Sam James <sam@gentoo.org>
AuthorDate: Sat May 4 13:28:51 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 4 14:36:13 2024 +0200

    Revert "i686: Fix multiple definitions of __memmove_chk and __memset_chk"
    
    This reverts commit ad92c483a4bd34db1cfb3eb625212ea64848244f.
    
    I had the wrong cherry-pick reference (the commit content is right; it's
    just referring to a base that isn't upstream), but let's revert and reapply
    for clarity.
    
    Signed-off-by: Sam James <sam@gentoo.org>
    (cherry picked from commit c16871e662cd0f3370173d916864b19e69f1bc9a)

 sysdeps/i386/i686/memmove.S | 2 +-
 sysdeps/i386/i686/memset.S  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

commit 54992c91ed89929e562ffc95e414340d0832677e
Author:     Sam James <sam@gentoo.org>
AuthorDate: Sat May 4 13:28:13 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 4 14:35:45 2024 +0200

    Revert "Add a test to check for duplicate definitions in the static library"
    
    This reverts commit ff110b2591f0bdeccd121c3726af19c62d6fb184.
    
    I had the wrong cherry-pick reference (the commit content is right; it's
    just referring to a base that isn't upstream), but let's revert and reapply
    for clarity.
    
    Signed-off-by: Sam James <sam@gentoo.org>
    (cherry picked from commit fa616ea3730cb42046d19f28d611be0bc390af7c)

 Makefile | 7 -------
 1 file changed, 7 deletions(-)

commit 1b54bab7e2ae42b0c8543b0d011f3218a3944b93
Author:     Gabi Falk <gabifalk@gmx.com>
AuthorDate: Tue Apr 30 20:05:04 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 4 14:35:19 2024 +0200

    Add a test to check for duplicate definitions in the static library
    
    This change follows two previous fixes addressing multiple definitions
    of __memcpy_chk and __mempcpy_chk functions on i586, and __memmove_chk
    and __memset_chk functions on i686.  The test is intended to prevent
    such issues from occurring in the future.
    
    Signed-off-by: Gabi Falk <gabifalk@gmx.com>
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    Reviewed-by: Dmitry V. Levin <ldv@altlinux.org>
    (cherry picked from commit ded2e0753e9c46debeb2e0d26c5e560d2581d314)
    (cherry picked from commit ff110b2591f0bdeccd121c3726af19c62d6fb184)

 Makefile | 7 +++++++
 1 file changed, 7 insertions(+)

commit 2f74bbfe716ccbd2b93473b51ce7665921e81f99
Author:     Gabi Falk <gabifalk@gmx.com>
AuthorDate: Tue Apr 30 20:05:03 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 4 14:35:01 2024 +0200

    i686: Fix multiple definitions of __memmove_chk and __memset_chk
    
    Commit c73c96a4a1af1326df7f96eec58209e1e04066d8 updated memcpy.S and
    mempcpy.S, but omitted memmove.S and memset.S.  As a result, the static
    library built as PIC, whether with or without multiarch support,
    contains two definitions for each of the __memmove_chk and __memset_chk
    symbols.
    
    /usr/lib/gcc/i686-pc-linux-gnu/14/../../../../i686-pc-linux-gnu/bin/ld: /usr/lib/gcc/i686-pc-linux-gnu/14/../../../../lib/libc.a(memset-ia32.o): in function `__memset_chk':
    /var/tmp/portage/sys-libs/glibc-2.39-r3/work/glibc-2.39/string/../sysdeps/i386/i686/memset.S:32: multiple definition of `__memset_chk'; /usr/lib/gcc/i686-pc-linux-gnu/14/../../../../lib/libc.a(memset_chk.o):/var/tmp/portage/sys-libs/glibc-2.39-r3/work/glibc-2.39/debug/../sysdeps/i386/i686/multiarch/memset_chk.c:24: first defined here
    
    After this change, regardless of PIC options, the static library, built
    for i686 with multiarch contains implementations of these functions
    respectively from debug/memmove_chk.c and debug/memset_chk.c, and
    without multiarch contains implementations of these functions
    respectively from sysdeps/i386/memmove_chk.S and
    sysdeps/i386/memset_chk.S.  This ensures that memmove and memset won't
    pull in __chk_fail and the routines it calls.
    
    Reported-by: Sam James <sam@gentoo.org>
    Tested-by: Sam James <sam@gentoo.org>
    Fixes: c73c96a4a1 ("i686: Fix build with --disable-multiarch")
    Signed-off-by: Gabi Falk <gabifalk@gmx.com>
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    Reviewed-by: Dmitry V. Levin <ldv@altlinux.org>
    (cherry picked from commit 5a2cf833f5772d6c37c7adac388dd9af9cc1c4b9)
    (cherry picked from commit ad92c483a4bd34db1cfb3eb625212ea64848244f)

 sysdeps/i386/i686/memmove.S | 2 +-
 sysdeps/i386/i686/memset.S  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

commit 0c0601425d66a67a0d9e6e00bc2421cd90c83094
Author:     Gabi Falk <gabifalk@gmx.com>
AuthorDate: Tue Apr 30 20:05:02 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 4 14:34:37 2024 +0200

    i586: Fix multiple definitions of __memcpy_chk and __mempcpy_chk
    
    /home/bmg/install/compilers/x86_64-linux-gnu/lib/gcc/x86_64-glibc-linux-gnu/13.2.1/../../../../x86_64-glibc-linux-gnu/bin/ld: /home/bmg/build/glibcs/i586-linux-gnu/glibc/libc.a(memcpy_chk.o): in function `__memcpy_chk':
    /home/bmg/src/glibc/debug/../sysdeps/i386/memcpy_chk.S:29: multiple definition of `__memcpy_chk';/home/bmg/build/glibcs/i586-linux-gnu/glibc/libc.a(memcpy.o):/home/bmg/src/glibc/string/../sysdeps/i386/i586/memcpy.S:31: first defined here /home/bmg/install/compilers/x86_64-linux-gnu/lib/gcc/x86_64-glibc-linux-gnu/13.2.1/../../../../x86_64-glibc-linux-gnu/bin/ld: /home/bmg/build/glibcs/i586-linux-gnu/glibc/libc.a(mempcpy_chk.o): in function `__mempcpy_chk': /home/bmg/src/glibc/debug/../sysdeps/i386/mempcpy_chk.S:28: multiple definition of `__mempcpy_chk'; /home/bmg/build/glibcs/i586-linux-gnu/glibc/libc.a(mempcpy.o):/home/bmg/src/glibc/string/../sysdeps/i386/i586/memcpy.S:31: first defined here
    
    After this change, the static library built for i586, regardless of PIC
    options, contains implementations of these functions respectively from
    sysdeps/i386/memcpy_chk.S and sysdeps/i386/mempcpy_chk.S.  This ensures
    that memcpy and mempcpy won't pull in __chk_fail and the routines it
    calls.
    
    Reported-by: Florian Weimer <fweimer@redhat.com>
    Signed-off-by: Gabi Falk <gabifalk@gmx.com>
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    Reviewed-by: Dmitry V. Levin <ldv@altlinux.org>
    (cherry picked from commit 789894a2f554d4503ecb2f13b2b4e93e43414f33)
    (cherry picked from commit 3148714ab61ad61281bae5a30f530d637034ac3b)

 sysdeps/i386/i586/memcpy.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit ac5b8016e2b6f57ce8cdd4f2d10003e11611a1d4
Author:     Carlos O'Donell <carlos@redhat.com>
AuthorDate: Tue Apr 23 13:30:37 2024 -0400
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 4 14:34:05 2024 +0200

    time: Allow later version licensing.
    
    The FSF's Licensing and Compliance Lab noted a discrepancy in the
    licensing of several files in the glibc package.
    
    When timespect_get.c was impelemented the license did not include
    the standard ", or (at your option) any later version." text.
    
    Change the license in timespec_get.c and all copied files to match
    the expected license.
    
    This change was previously approved in principle by the FSF in
    RT ticket #1316403. And a similar instance was fixed in
    commit 46703efa02f6ddebce5ee54c92f7c32598de0de6.
    
    (cherry picked from commit 91695ee4598b39d181ab8df579b888a8863c4cab)
    (cherry picked from commit 273a835fe7c685cc54266bb8b502787bad5e9bae)

 sysdeps/unix/sysv/linux/timespec_get.c    | 2 +-
 sysdeps/unix/sysv/linux/timespec_getres.c | 2 +-
 time/timespec_get.c                       | 2 +-
 time/timespec_getres.c                    | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

commit b64c22d30282fa8c9b537e9cc5242534c71b36bf
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Thu May 2 17:06:19 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 4 14:33:47 2024 +0200

    nscd: Use time_t for return type of addgetnetgrentX
    
    Using int may give false results for future dates (timeouts after the
    year 2028).
    
    Fixes commit 04a21e050d64a1193a6daab872bca2528bda44b ("CVE-2024-33601,
    CVE-2024-33602: nscd: netgroup: Use two buffers in addgetnetgrentX
    (bug 31680)").
    
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    (cherry picked from commit 4bbca1a44691a6e9adcee5c6798a707b626bc331)
    (cherry picked from commit acc56074b0a5127631a64640aef1b7c5c103ebd8)

 nscd/netgroupcache.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

commit 6c7904910095622e47ab4e362e640e775ba1a3f9
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Fri Apr 19 14:38:17 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 4 14:33:30 2024 +0200

    login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701)
    
    These structs describe file formats under /var/log, and should not
    depend on the definition of _TIME_BITS.  This is achieved by
    defining __WORDSIZE_TIME64_COMPAT32 to 1 on 32-bit ports that
    support 32-bit time_t values (where __time_t is 32 bits).
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit 9abdae94c7454c45e02e97e4ed1eb1b1915d13d8)
    (cherry picked from commit 836d43b98973e0845b739ff5d3aad3af09dc7d0f)

 bits/wordsize.h                                 |  6 ++++--
 login/Makefile                                  |  4 +++-
 login/tst-utmp-size-64.c                        |  2 ++
 sysdeps/arm/bits/wordsize.h                     | 21 +++++++++++++++++++++
 sysdeps/csky/bits/wordsize.h                    | 21 +++++++++++++++++++++
 sysdeps/m68k/bits/wordsize.h                    | 21 +++++++++++++++++++++
 sysdeps/microblaze/bits/wordsize.h              | 21 +++++++++++++++++++++
 sysdeps/mips/bits/wordsize.h                    |  6 +-----
 sysdeps/nios2/bits/wordsize.h                   | 21 +++++++++++++++++++++
 sysdeps/powerpc/powerpc32/bits/wordsize.h       |  3 +--
 sysdeps/powerpc/powerpc64/bits/wordsize.h       |  3 +--
 sysdeps/sh/bits/wordsize.h                      | 21 +++++++++++++++++++++
 sysdeps/sparc/sparc32/bits/wordsize.h           |  2 +-
 sysdeps/sparc/sparc64/bits/wordsize.h           |  3 +--
 sysdeps/unix/sysv/linux/hppa/bits/wordsize.h    | 21 +++++++++++++++++++++
 sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h |  3 +--
 sysdeps/unix/sysv/linux/sparc/bits/wordsize.h   |  3 +--
 sysdeps/x86/bits/wordsize.h                     |  5 ++---
 18 files changed, 165 insertions(+), 22 deletions(-)

commit 27b9e86157fd07afa8d8aac0c5cf2871e9c97087
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Fri Apr 19 14:38:17 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 4 14:33:10 2024 +0200

    login: Check default sizes of structs utmp, utmpx, lastlog
    
    The default <utmp-size.h> is for ports with a 64-bit time_t.
    Ports with a 32-bit time_t or with __WORDSIZE_TIME64_COMPAT32=1
    need to override it.
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit 4d4da5aab936504b2d3eca3146e109630d9093c4)
    (cherry picked from commit 9831f98c266a8d56d1bf729b709c08e40375540c)

 login/Makefile                 |  2 +-
 login/tst-utmp-size.c          | 33 +++++++++++++++++++++++++++++++++
 sysdeps/arc/utmp-size.h        |  3 +++
 sysdeps/arm/utmp-size.h        |  2 ++
 sysdeps/csky/utmp-size.h       |  2 ++
 sysdeps/generic/utmp-size.h    | 23 +++++++++++++++++++++++
 sysdeps/hppa/utmp-size.h       |  2 ++
 sysdeps/m68k/utmp-size.h       |  3 +++
 sysdeps/microblaze/utmp-size.h |  2 ++
 sysdeps/mips/utmp-size.h       |  2 ++
 sysdeps/nios2/utmp-size.h      |  2 ++
 sysdeps/or1k/utmp-size.h       |  3 +++
 sysdeps/powerpc/utmp-size.h    |  2 ++
 sysdeps/riscv/utmp-size.h      |  2 ++
 sysdeps/sh/utmp-size.h         |  2 ++
 sysdeps/sparc/utmp-size.h      |  2 ++
 sysdeps/x86/utmp-size.h        |  2 ++
 17 files changed, 88 insertions(+), 1 deletion(-)

commit 967cca3aadaa467a96db0dabfb81df853f97d042 (tag: gentoo/glibc-2.39-4)
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Thu Apr 25 08:06:52 2024 -0700
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Apr 26 17:18:16 2024 +1100

    elf: Also compile dl-misc.os with $(rtld-early-cflags)
    
    Also compile dl-misc.os with $(rtld-early-cflags) to avoid
    
    Program received signal SIGILL, Illegal instruction.
    0x00007ffff7fd36ea in _dl_strtoul (nptr=nptr@entry=0x7fffffffe2c9 "2",
        endptr=endptr@entry=0x7fffffffd728) at dl-misc.c:156
    156       bool positive = true;
    (gdb) bt
     #0  0x00007ffff7fd36ea in _dl_strtoul (nptr=nptr@entry=0x7fffffffe2c9 "2",
        endptr=endptr@entry=0x7fffffffd728) at dl-misc.c:156
     #1  0x00007ffff7fdb1a9 in tunable_initialize (
        cur=cur@entry=0x7ffff7ffbc00 <tunable_list+2176>,
        strval=strval@entry=0x7fffffffe2c9 "2", len=len@entry=1)
        at dl-tunables.c:131
     #2  0x00007ffff7fdb3a2 in parse_tunables (valstring=<optimized out>)
        at dl-tunables.c:258
     #3  0x00007ffff7fdb5d9 in __GI___tunables_init (envp=0x7fffffffdd58)
        at dl-tunables.c:288
     #4  0x00007ffff7fe44c3 in _dl_sysdep_start (
        start_argptr=start_argptr@entry=0x7fffffffdcb0,
        dl_main=dl_main@entry=0x7ffff7fe5f80 <dl_main>)
        at ../sysdeps/unix/sysv/linux/dl-sysdep.c:110
     #5  0x00007ffff7fe5cae in _dl_start_final (arg=0x7fffffffdcb0) at rtld.c:494
     #6  _dl_start (arg=0x7fffffffdcb0) at rtld.c:581
     #7  0x00007ffff7fe4b38 in _start ()
    (gdb)
    
    when setting GLIBC_TUNABLES in glibc compiled with APX.
    Reviewed-by: Florian Weimer <fweimer@redhat.com>
    
    (cherry picked from commit 049b7684c912dd32b67b1b15b0f43bf07d5f512e)
    (cherry picked from commit fd658f026f25cf59e8db243bc3b3e09cd5a20ba0)

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

commit ca3f19a71ce3dd3dd97fbf935dfda187681ac5e7
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Thu Apr 25 15:01:07 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Apr 26 17:17:58 2024 +1100

    CVE-2024-33601, CVE-2024-33602: nscd: netgroup: Use two buffers in addgetnetgrentX (bug 31680)
    
    This avoids potential memory corruption when the underlying NSS
    callback function does not use the buffer space to store all strings
    (e.g., for constant strings).
    
    Instead of custom buffer management, two scratch buffers are used.
    This increases stack usage somewhat.
    
    Scratch buffer allocation failure is handled by return -1
    (an invalid timeout value) instead of terminating the process.
    This fixes bug 31679.
    
    Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    (cherry picked from commit c04a21e050d64a1193a6daab872bca2528bda44b)
    (cherry picked from commit a9a8d3eebb145779a18d90e3966009a1daa63cd8)

 nscd/netgroupcache.c | 219 ++++++++++++++++++++++++++++-----------------------
 1 file changed, 121 insertions(+), 98 deletions(-)

commit 413eeaa14266570694e820570fcf86397da06b01
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Thu Apr 25 15:01:07 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Apr 26 17:17:40 2024 +1100

    CVE-2024-33600: nscd: Avoid null pointer crashes after notfound response (bug 31678)
    
    The addgetnetgrentX call in addinnetgrX may have failed to produce
    a result, so the result variable in addinnetgrX can be NULL.
    Use db->negtimeout as the fallback value if there is no result data;
    the timeout is also overwritten below.
    
    Also avoid sending a second not-found response.  (The client
    disconnects after receiving the first response, so the data stream did
    not go out of sync even without this fix.)  It is still beneficial to
    add the negative response to the mapping, so that the client can get
    it from there in the future, instead of going through the socket.
    
    Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    (cherry picked from commit b048a482f088e53144d26a61c390bed0210f49f2)
    (cherry picked from commit c99f886de54446cd4447db6b44be93dabbdc2f8b)

 nscd/netgroupcache.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

commit b502c954fa64e47d8cc36df35afb9289627821c3
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Thu Apr 25 15:01:07 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Apr 26 17:17:21 2024 +1100

    CVE-2024-33600: nscd: Do not send missing not-found response in addgetnetgrentX (bug 31678)
    
    If we failed to add a not-found response to the cache, the dataset
    point can be null, resulting in a null pointer dereference.
    
    Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    (cherry picked from commit 7835b00dbce53c3c87bbbb1754a95fb5e58187aa)
    (cherry picked from commit 5a508e0b508c8ad53bd0d2fb48fd71b242626341)

 nscd/netgroupcache.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

commit dfc8a08f82afcb6a064b3814fd85d32a81e36566
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Thu Apr 25 15:00:45 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Apr 26 17:17:06 2024 +1100

    CVE-2024-33599: nscd: Stack-based buffer overflow in netgroup cache (bug 31677)
    
    Using alloca matches what other caches do.  The request length is
    bounded by MAXKEYLEN.
    
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    (cherry picked from commit 87801a8fd06db1d654eea3e4f7626ff476a9bdaa)
    (cherry picked from commit 1263d583d2e28afb8be53f8d6922f0842036f35d)

 nscd/netgroupcache.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

commit c5aa32aed01906ed2156ae1526a7f7bec1a5f1c2
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Tue Apr 23 13:59:50 2024 -0700
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Apr 26 17:16:41 2024 +1100

    x86: Define MINIMUM_X86_ISA_LEVEL in config.h [BZ #31676]
    
    Define MINIMUM_X86_ISA_LEVEL at configure time to avoid
    
    /usr/bin/ld: …/build/elf/librtld.os: in function `init_cpu_features':
    …/git/elf/../sysdeps/x86/cpu-features.c:1202: undefined reference to `_dl_runtime_resolve_fxsave'
    /usr/bin/ld: …/build/elf/librtld.os: relocation R_X86_64_PC32 against undefined hidden symbol `_dl_runtime_resolve_fxsave' can not be used when making a shared object
    /usr/bin/ld: final link failed: bad value
    collect2: error: ld returned 1 exit status
    
    when glibc is built with -march=x86-64-v3 and configured with
    --with-rtld-early-cflags=-march=x86-64, which is used to allow ld.so to
    print an error message on unsupported CPUs:
    
    Fatal glibc error: CPU does not support x86-64-v3
    
    This fixes BZ #31676.
    Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com>
    
    (cherry picked from commit 46c999741340ea559784c20a45077955b50aca43)
    (cherry picked from commit 2f8f157eb0cc7f1d8d9a3fcaa8c55bed53b092a8)

 config.h.in              | 3 +++
 sysdeps/x86/configure    | 7 +++++++
 sysdeps/x86/configure.ac | 5 +++++
 sysdeps/x86/isa-level.h  | 4 +++-
 4 files changed, 18 insertions(+), 1 deletion(-)

commit 6d60e3d4d6aff571fb25b8a21606fdd6e141e6ed
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Thu Apr 25 12:56:48 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Apr 26 17:16:21 2024 +1100

    i386: ulp update for SSE2 --disable-multi-arch configurations
    
    (cherry picked from commit 3a3a4497421422aa854c855cbe5110ca7d598ffc)
    (cherry picked from commit e701c7d761f6e5c48d8e9dd5da88cbe2e94943f4)

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

commit efc9aac02e235bd5994b52ba6417a4890ad5c1d4
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Tue Apr 23 21:16:32 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Apr 26 17:16:06 2024 +1100

    nptl: Fix tst-cancel30 on kernels without ppoll_time64 support
    
    Fall back to ppoll if ppoll_time64 fails with ENOSYS.
    Fixes commit 370da8a121c3ba9eeb2f13da15fc0f21f4136b25 ("nptl: Fix
    tst-cancel30 on sparc64").
    
    Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
    (cherry picked from commit f4724843ada64a51d66f65d3199fe431f9d4c254)
    (cherry picked from commit e828914cf9f2fc2caa5bced0fc6a03cb78324979)

 sysdeps/pthread/tst-cancel30.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

commit fca4658496cec902192956cedb06f990db621962 (tag: gentoo/glibc-2.39-3)
Author:     Charles Fol <folcharles@gmail.com>
AuthorDate: Thu Mar 28 12:25:38 2024 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Apr 18 09:20:51 2024 +1100

    iconv: ISO-2022-CN-EXT: fix out-of-bound writes when writing escape sequence (CVE-2024-2961)
    
    ISO-2022-CN-EXT uses escape sequences to indicate character set changes
    (as specified by RFC 1922).  While the SOdesignation has the expected
    bounds checks, neither SS2designation nor SS3designation have its;
    allowing a write overflow of 1, 2, or 3 bytes with fixed values:
    '$+I', '$+J', '$+K', '$+L', '$+M', or '$*H'.
    
    Checked on aarch64-linux-gnu.
    
    Co-authored-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    Tested-by: Carlos O'Donell <carlos@redhat.com>
    
    (cherry picked from commit f9dc609e06b1136bb0408be9605ce7973a767ada)
    (cherry picked from commit 31da30f23cddd36db29d5b6a1c7619361b271fb4)

 iconvdata/Makefile                    |   5 +-
 iconvdata/iso-2022-cn-ext.c           |  12 ++++
 iconvdata/tst-iconv-iso-2022-cn-ext.c | 128 ++++++++++++++++++++++++++++++++++
 3 files changed, 144 insertions(+), 1 deletion(-)

commit ef58b1550d74a0422ded62922be39b5d6782d384
Author:     Sunil K Pandey <skpgkp2@gmail.com>
AuthorDate: Tue Feb 13 12:23:14 2024 -0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Apr 18 09:20:32 2024 +1100

    x86_64: Exclude SSE, AVX and FMA4 variants in libm multiarch
    
    When glibc is built with ISA level 3 or higher by default, the resulting
    glibc binaries won't run on SSE or FMA4 processors.  Exclude SSE, AVX and
    FMA4 variants in libm multiarch when ISA level 3 or higher is enabled by
    default.
    
    When glibc is built with ISA level 2 enabled by default, only keep SSE4.1
    variant.
    
    Fixes BZ 31335.
    
    NB: elf/tst-valgrind-smoke test fails with ISA level 4, because valgrind
    doesn't support AVX512 instructions:
    
    https://bugs.kde.org/show_bug.cgi?id=383010
    
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    (cherry picked from commit 9f78a7c1d0963282608da836b840f0d5ae1c478e)
    (cherry picked from commit 423099a03264ea28298f47355d7811b8efe03c97)

 sysdeps/x86/configure                              |  33 +++++
 sysdeps/x86/configure.ac                           |  24 ++++
 sysdeps/x86_64/fpu/multiarch/Makefile              | 148 +++++++++++----------
 sysdeps/x86_64/fpu/multiarch/e_asin.c              |  19 +--
 sysdeps/x86_64/fpu/multiarch/e_atan2.c             |  11 +-
 sysdeps/x86_64/fpu/multiarch/e_exp.c               |  13 +-
 sysdeps/x86_64/fpu/multiarch/e_exp2f.c             |  19 +--
 sysdeps/x86_64/fpu/multiarch/e_expf.c              |  19 +--
 sysdeps/x86_64/fpu/multiarch/e_log.c               |  13 +-
 sysdeps/x86_64/fpu/multiarch/e_log2.c              |  19 +--
 sysdeps/x86_64/fpu/multiarch/e_log2f.c             |  19 +--
 sysdeps/x86_64/fpu/multiarch/e_logf.c              |  19 +--
 sysdeps/x86_64/fpu/multiarch/e_pow.c               |  13 +-
 sysdeps/x86_64/fpu/multiarch/e_powf.c              |  27 ++--
 sysdeps/x86_64/fpu/multiarch/s_atan.c              |  11 +-
 sysdeps/x86_64/fpu/multiarch/s_ceil-avx.S          |  28 ++++
 sysdeps/x86_64/fpu/multiarch/s_ceil-sse4_1.S       |  12 ++
 sysdeps/x86_64/fpu/multiarch/s_ceil.c              |  21 +--
 sysdeps/x86_64/fpu/multiarch/s_ceilf-avx.S         |  28 ++++
 sysdeps/x86_64/fpu/multiarch/s_ceilf-sse4_1.S      |  12 ++
 sysdeps/x86_64/fpu/multiarch/s_ceilf.c             |  21 +--
 sysdeps/x86_64/fpu/multiarch/s_cosf.c              |  11 +-
 sysdeps/x86_64/fpu/multiarch/s_expm1.c             |  11 +-
 sysdeps/x86_64/fpu/multiarch/s_floor-avx.S         |  28 ++++
 sysdeps/x86_64/fpu/multiarch/s_floor-sse4_1.S      |  12 ++
 sysdeps/x86_64/fpu/multiarch/s_floor.c             |  21 +--
 sysdeps/x86_64/fpu/multiarch/s_floorf-avx.S        |  28 ++++
 sysdeps/x86_64/fpu/multiarch/s_floorf-sse4_1.S     |  12 ++
 sysdeps/x86_64/fpu/multiarch/s_floorf.c            |  21 +--
 sysdeps/x86_64/fpu/multiarch/s_log1p.c             |  11 +-
 sysdeps/x86_64/fpu/multiarch/s_nearbyint-avx.S     |  28 ++++
 sysdeps/x86_64/fpu/multiarch/s_nearbyint-sse4_1.S  |  12 ++
 sysdeps/x86_64/fpu/multiarch/s_nearbyint.c         |  19 +--
 sysdeps/x86_64/fpu/multiarch/s_nearbyintf-avx.S    |  28 ++++
 sysdeps/x86_64/fpu/multiarch/s_nearbyintf-sse4_1.S |  12 ++
 sysdeps/x86_64/fpu/multiarch/s_nearbyintf.c        |  19 +--
 sysdeps/x86_64/fpu/multiarch/s_rint-avx.S          |  28 ++++
 sysdeps/x86_64/fpu/multiarch/s_rint-sse4_1.S       |  12 ++
 sysdeps/x86_64/fpu/multiarch/s_rint.c              |  21 +--
 sysdeps/x86_64/fpu/multiarch/s_rintf-avx.S         |  28 ++++
 sysdeps/x86_64/fpu/multiarch/s_rintf-sse4_1.S      |  12 ++
 sysdeps/x86_64/fpu/multiarch/s_rintf.c             |  21 +--
 sysdeps/x86_64/fpu/multiarch/s_roundeven-avx.S     |  28 ++++
 sysdeps/x86_64/fpu/multiarch/s_roundeven-sse4_1.S  |  12 ++
 sysdeps/x86_64/fpu/multiarch/s_roundeven.c         |  19 +--
 sysdeps/x86_64/fpu/multiarch/s_roundevenf-avx.S    |  28 ++++
 sysdeps/x86_64/fpu/multiarch/s_roundevenf-sse4_1.S |  12 ++
 sysdeps/x86_64/fpu/multiarch/s_roundevenf.c        |  19 +--
 sysdeps/x86_64/fpu/multiarch/s_sin.c               |  19 +--
 sysdeps/x86_64/fpu/multiarch/s_sincos.c            |  11 +-
 sysdeps/x86_64/fpu/multiarch/s_sincosf.c           |  11 +-
 sysdeps/x86_64/fpu/multiarch/s_sinf.c              |  11 +-
 sysdeps/x86_64/fpu/multiarch/s_tan.c               |  11 +-
 sysdeps/x86_64/fpu/multiarch/s_trunc-avx.S         |  28 ++++
 sysdeps/x86_64/fpu/multiarch/s_trunc-sse4_1.S      |  12 ++
 sysdeps/x86_64/fpu/multiarch/s_trunc.c             |  21 +--
 sysdeps/x86_64/fpu/multiarch/s_truncf-avx.S        |  28 ++++
 sysdeps/x86_64/fpu/multiarch/s_truncf-sse4_1.S     |  12 ++
 sysdeps/x86_64/fpu/multiarch/s_truncf.c            |  21 +--
 sysdeps/x86_64/fpu/multiarch/w_exp.c               |   7 +-
 sysdeps/x86_64/fpu/multiarch/w_log.c               |   7 +-
 sysdeps/x86_64/fpu/multiarch/w_pow.c               |   7 +-
 62 files changed, 953 insertions(+), 295 deletions(-)

commit e8a49873f73f8b37ee2714748710b8e4eeca465b
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Thu Feb 15 11:19:56 2024 -0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Apr 18 09:20:00 2024 +1100

    Apply the Makefile sorting fix
    
    Apply the Makefile sorting fix generated by sort-makefile-lines.py.
    
    (cherry picked from commit ef7f4b1fef67430a8f3cfc77fa6aada2add851d7)
    (cherry picked from commit 04df8652eb1919da18d54b3dcd6db1675993d45d)

 sysdeps/loongarch/lp64/multiarch/Makefile | 80 +++++++++++++++----------------
 sysdeps/x86/Makefile                      |  6 +--
 sysdeps/x86_64/Makefile                   | 10 ++--
 sysdeps/x86_64/fpu/multiarch/Makefile     | 14 +++---
 sysdeps/x86_64/multiarch/Makefile         |  4 +-
 5 files changed, 57 insertions(+), 57 deletions(-)

commit ebb41e14af9968f4e3b6931ec3560b3aec55fa03
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Sun Apr 14 08:24:51 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Apr 18 09:19:44 2024 +1100

    powerpc: Fix ld.so address determination for PCREL mode (bug 31640)
    
    This seems to have stopped working with some GCC 14 versions,
    which clobber r2.  With other compilers, the kernel-provided
    r2 value is still available at this point.
    
    Reviewed-by: Peter Bergner <bergner@linux.ibm.com>
    (cherry picked from commit 14e56bd4ce15ac2d1cc43f762eb2e6b83fec1afe)
    (cherry picked from commit edb9a76e3008725e9dc035d38a58e849a3bde0f1)

 sysdeps/powerpc/powerpc64/dl-machine.h | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

commit 1a27a021ae851f0d8ecc20f4ae5d4014af69bc68
Author:     Sunil K Pandey <skpgkp2@gmail.com>
AuthorDate: Thu Feb 29 17:57:02 2024 -0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Apr 18 09:19:22 2024 +1100

    x86-64: Simplify minimum ISA check ifdef conditional with if
    
    Replace minimum ISA check ifdef conditional with if.  Since
    MINIMUM_X86_ISA_LEVEL and AVX_X86_ISA_LEVEL are compile time constants,
    compiler will perform constant folding optimization, getting same
    results.
    
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    (cherry picked from commit b6e3898194bbae78910bbe9cd086937014961e45)
    (cherry picked from commit 7b92f46f04c6cbce19d19ae1099628431858996c)

 sysdeps/x86/cpu-features.c | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

commit ee2b2080f9c6c03d271a9420e25b37c89c7aac79
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Wed Feb 28 09:51:14 2024 -0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Apr 18 09:18:58 2024 +1100

    x86-64: Don't use SSE resolvers for ISA level 3 or above
    
    When glibc is built with ISA level 3 or above enabled, SSE resolvers
    aren't available and glibc fails to build:
    
    ld: .../elf/librtld.os: in function `init_cpu_features':
    .../elf/../sysdeps/x86/cpu-features.c:1200:(.text+0x1445f): undefined reference to `_dl_runtime_resolve_fxsave'
    ld: .../elf/librtld.os: relocation R_X86_64_PC32 against undefined hidden symbol `_dl_runtime_resolve_fxsave' can not be used when making a shared object
    /usr/local/bin/ld: final link failed: bad value
    
    For ISA level 3 or above, don't use _dl_runtime_resolve_fxsave nor
    _dl_tlsdesc_dynamic_fxsave.
    
    This fixes BZ #31429.
    Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
    
    (cherry picked from commit befe2d3c4dec8be2cdd01a47132e47bdb7020922)
    (cherry picked from commit 9883f4304cfb1558d0f1e6d9f48c4ab0a35355fe)

 sysdeps/x86/cpu-features.c  | 17 +++++++++++------
 sysdeps/x86_64/dl-tlsdesc.S | 15 +++++++++------
 2 files changed, 20 insertions(+), 12 deletions(-)

commit 24d968ef541a47fad165ded719ad5fc5726cc24c
Author:     Wilco Dijkstra <wilco.dijkstra@arm.com>
AuthorDate: Thu Mar 21 16:48:33 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Apr 18 09:18:38 2024 +1100

    AArch64: Check kernel version for SVE ifuncs
    
    Old Linux kernels disable SVE after every system call.  Calling the
    SVE-optimized memcpy afterwards will then cause a trap to reenable SVE.
    As a result, applications with a high use of syscalls may run slower with
    the SVE memcpy.  This is true for kernels between 4.15.0 and before 6.2.0,
    except for 5.14.0 which was patched.  Avoid this by checking the kernel
    version and selecting the SVE ifunc on modern kernels.
    
    Parse the kernel version reported by uname() into a 24-bit kernel.major.minor
    value without calling any library functions.  If uname() is not supported or
    if the version format is not recognized, assume the kernel is modern.
    
    Tested-by: Florian Weimer <fweimer@redhat.com>
    Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
    (cherry picked from commit 2e94e2f5d2bf2de124c8ad7da85463355e54ccb2)
    (cherry picked from commit 9d92452c70805a2e2dbbdb2b1ffc34bd86e1c8df)

 sysdeps/aarch64/cpu-features.h                 |  1 +
 sysdeps/aarch64/multiarch/init-arch.h          |  2 ++
 sysdeps/aarch64/multiarch/memcpy.c             |  2 +-
 sysdeps/aarch64/multiarch/memmove.c            |  2 +-
 sysdeps/unix/sysv/linux/aarch64/cpu-features.c | 48 ++++++++++++++++++++++++++
 5 files changed, 53 insertions(+), 2 deletions(-)

commit ee356d1c4648a1d2d1bfdaf45f7ccc81bf186e7e
Author:     Szabolcs Nagy <szabolcs.nagy@arm.com>
AuthorDate: Wed Mar 13 14:34:14 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Apr 18 09:18:19 2024 +1100

    aarch64: fix check for SVE support in assembler
    
    Due to GCC bug 110901 -mcpu can override -march setting when compiling
    asm code and thus a compiler targetting a specific cpu can fail the
    configure check even when binutils gas supports SVE.
    
    The workaround is that explicit .arch directive overrides both -mcpu
    and -march, and since that's what the actual SVE memcpy uses the
    configure check should use that too even if the GCC issue is fixed
    independently.
    
    Reviewed-by: Florian Weimer <fweimer@redhat.com>
    (cherry picked from commit 73c26018ed0ecd9c807bb363cc2c2ab4aca66a82)
    (cherry picked from commit 395a89f61e19fa916ae4cc93fc10d81a28ce3039)

 sysdeps/aarch64/configure    | 5 +++--
 sysdeps/aarch64/configure.ac | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

commit 752846f90dab62b0c3ad338ff6051b669dba27d7
Author:     Joe Ramsay <Joe.Ramsay@arm.com>
AuthorDate: Tue Feb 20 16:44:13 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Apr 18 09:17:56 2024 +1100

    aarch64/fpu: Sync libmvec routines from 2.39 and before with AOR
    
    This includes a fix for big-endian in AdvSIMD log, some cosmetic
    changes, and numerous small optimisations mainly around inlining and
    using indexed variants of MLA intrinsics.
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    
    (cherry picked from commit e302e1021391d13a9611ba3a910df128830bd19e)
    (cherry picked from commit b0e0a07018098c2c5927796be5681a298c312626)

 sysdeps/aarch64/fpu/acos_advsimd.c   |  4 ++--
 sysdeps/aarch64/fpu/asin_advsimd.c   |  4 ++--
 sysdeps/aarch64/fpu/atan2_sve.c      | 29 ++++++++++++++---------------
 sysdeps/aarch64/fpu/atan2f_sve.c     | 30 ++++++++++++++++--------------
 sysdeps/aarch64/fpu/cos_advsimd.c    |  3 +--
 sysdeps/aarch64/fpu/cosf_advsimd.c   |  3 +--
 sysdeps/aarch64/fpu/exp10_advsimd.c  |  4 ++--
 sysdeps/aarch64/fpu/exp10f_advsimd.c | 21 ++++++++++-----------
 sysdeps/aarch64/fpu/exp2_advsimd.c   | 20 +++++++++++---------
 sysdeps/aarch64/fpu/exp2f_sve.c      |  4 +++-
 sysdeps/aarch64/fpu/exp_advsimd.c    |  4 ++--
 sysdeps/aarch64/fpu/expm1_advsimd.c  | 11 +++++------
 sysdeps/aarch64/fpu/expm1f_advsimd.c | 17 +++++++++--------
 sysdeps/aarch64/fpu/log_advsimd.c    |  5 +++++
 sysdeps/aarch64/fpu/sin_advsimd.c    |  3 +--
 sysdeps/aarch64/fpu/sinf_advsimd.c   |  3 +--
 sysdeps/aarch64/fpu/tan_advsimd.c    | 26 +++++++++++++-------------
 sysdeps/aarch64/fpu/tanf_advsimd.c   | 25 +++++++++++++------------
 18 files changed, 111 insertions(+), 105 deletions(-)

commit 67070385c9b826211f806f2eba6ed56dca8ac51a
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Thu Feb 8 10:08:40 2024 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Apr 7 00:25:06 2024 +0200

    x86: Expand the comment on when REP STOSB is used on memset
    
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    (cherry picked from commit 491e55beab7457ed310a4a47496f4a333c5d1032)
    (cherry picked from commit 5d070d12b3a52bc44dd1b71743abc4b6243862ae)

 sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

commit 285b47462d978c7c8204a9103b436ff7e5937f8b
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Thu Feb 8 10:08:39 2024 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Apr 7 00:24:50 2024 +0200

    x86: Do not prefer ERMS for memset on Zen3+
    
    For AMD Zen3+ architecture, the performance of the vectorized loop is
    slightly better than ERMS.
    
    Checked on x86_64-linux-gnu on Zen3.
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    
    (cherry picked from commit 272708884cb750f12f5c74a00e6620c19dc6d567)
    (cherry picked from commit 6484a92698039c4a7a510f0214e22d067b0d78b3)

 sysdeps/x86/dl-cacheinfo.h | 5 +++++
 1 file changed, 5 insertions(+)

commit 3d05a75e01e7d2f4dd79c4d0fa6ab4ed1ee799dc
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Thu Feb 8 10:08:38 2024 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Apr 7 00:24:32 2024 +0200

    x86: Fix Zen3/Zen4 ERMS selection (BZ 30994)
    
    The REP MOVSB usage on memcpy/memmove does not show much performance
    improvement on Zen3/Zen4 cores compared to the vectorized loops.  Also,
    as from BZ 30994, if the source is aligned and the destination is not
    the performance can be 20x slower.
    
    The performance difference is noticeable with small buffer sizes, closer
    to the lower bounds limits when memcpy/memmove starts to use ERMS.  The
    performance of REP MOVSB is similar to vectorized instruction on the
    size limit (the L2 cache).  Also, there is no drawback to multiple cores
    sharing the cache.
    
    Checked on x86_64-linux-gnu on Zen3.
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    
    (cherry picked from commit 0c0d39fe4aeb0f69b26e76337c5dfd5530d5d44e)
    (cherry picked from commit aa4249266e9906c4bc833e4847f4d8feef59504f)

 sysdeps/x86/dl-cacheinfo.h | 38 ++++++++++++++++++--------------------
 1 file changed, 18 insertions(+), 20 deletions(-)

commit 868362cffdd692765c0e2c1dc8f810959685b3a6
Author:     Andreas Schwab <schwab@suse.de>
AuthorDate: Tue Mar 19 13:49:50 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Apr 7 00:24:12 2024 +0200

    Add tst-gnu2-tls2mod1 to test-internal-extras
    
    That allows sysdeps/x86_64/tst-gnu2-tls2mod1.S to use internal headers.
    
    Fixes: 717ebfa85c ("x86-64: Allocate state buffer space for RDI, RSI and RBX")
    (cherry picked from commit fd7ee2e6c5eb49e4a630a9978b4d668bff6354ee)
    (cherry picked from commit 5a461f2949ded98d8211939f84988bc464c7b4fe)

 sysdeps/x86_64/Makefile | 2 ++
 1 file changed, 2 insertions(+)

commit 62ae77d2354c22a2f7e659f5f67fa795359c7cb0
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Tue Mar 12 13:21:20 2024 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Apr 7 00:23:53 2024 +0200

    elf: Enable TLS descriptor tests on aarch64
    
    The aarch64 uses 'trad' for traditional tls and 'desc' for tls
    descriptors, but unlike other targets it defaults to 'desc'.  The
    gnutls2 configure check does not set aarch64 as an ABI that uses
    TLS descriptors, which then disable somes stests.
    
    Also rename the internal machinery fron gnu2 to tls descriptors.
    
    Checked on aarch64-linux-gnu.
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    
    (cherry picked from commit 3d53d18fc71c5d9ef4773b8bce04d54b80181926)
    (cherry picked from commit aded2fc004e7ee85cf0b45b1382552d41e555a23)

 configure                    | 23 +++++++++++++----------
 configure.ac                 | 15 +++++++++------
 elf/Makefile                 | 26 +++++++++++++-------------
 sysdeps/aarch64/preconfigure |  1 +
 sysdeps/arm/Makefile         |  8 ++++----
 5 files changed, 40 insertions(+), 33 deletions(-)

commit 48662b4d27ca89f2d7c17754bd7623e45140511c
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Tue Mar 12 13:21:19 2024 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Apr 7 00:23:30 2024 +0200

    arm: Update _dl_tlsdesc_dynamic to preserve caller-saved registers (BZ 31372)
    
    ARM _dl_tlsdesc_dynamic slow path has two issues:
    
      * The ip/r12 is defined by AAPCS as a scratch register, and gcc is
        used to save the stack pointer before on some function calls.  So it
        should also be saved/restored as well.  It fixes the tst-gnu2-tls2.
    
      * None of the possible VFP registers are saved/restored.  ARM has the
        additional complexity to have different VFP bank sizes (depending of
        VFP support by the chip).
    
    The tst-gnu2-tls2 test is extended to check for VFP registers, although
    only for hardfp builds.  Different than setcontext, _dl_tlsdesc_dynamic
    does not have  HWCAP_ARM_IWMMXT (I don't have a way to properly test
    it and it is almost a decade since newer hardware was released).
    
    With this patch there is no need to mark tst-gnu2-tls2 as XFAIL.
    
    Checked on arm-linux-gnueabihf.
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    
    (cherry picked from commit 64c7e344289ed085517c2227d8e3b06388242c13)
    (cherry picked from commit a8ba52bde58c69f2b31da62ad2311f119adf6cb9)

 config.h.in                 |   3 ++
 elf/Makefile                |   4 --
 elf/tst-gnu2-tls2.h         |   4 ++
 elf/tst-gnu2-tls2mod0.c     |   3 +-
 elf/tst-gnu2-tls2mod1.c     |   3 +-
 elf/tst-gnu2-tls2mod2.c     |   3 +-
 sysdeps/arm/configure       |  32 +++++++++++
 sysdeps/arm/configure.ac    |  15 ++++++
 sysdeps/arm/dl-tlsdesc.S    |  70 +++++++++++++++++++++---
 sysdeps/arm/tst-gnu2-tls2.h | 128 ++++++++++++++++++++++++++++++++++++++++++++
 10 files changed, 250 insertions(+), 15 deletions(-)

commit 504704c9d690c7d67b4ff51968ceb334b7880f3c
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Tue Mar 12 13:21:18 2024 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Apr 7 00:23:09 2024 +0200

    Ignore undefined symbols for -mtls-dialect=gnu2
    
    So it does not fail for arm config that defaults to -mtp=soft (which
    issues a call to __aeabi_read_tp).
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    
    (cherry picked from commit 968b0ca9440040a2b31248a572891f0e55c1ab10)
    (cherry picked from commit 15aebdbada54098787715448c94701f17033fc92)

 configure    | 2 +-
 configure.ac | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

commit 40066a40d57d6a17cc4a1bc0ea80ac5f9504a301
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Mon Mar 18 06:40:16 2024 -0700
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Apr 7 00:22:47 2024 +0200

    x86-64: Allocate state buffer space for RDI, RSI and RBX
    
    _dl_tlsdesc_dynamic preserves RDI, RSI and RBX before realigning stack.
    After realigning stack, it saves RCX, RDX, R8, R9, R10 and R11.  Define
    TLSDESC_CALL_REGISTER_SAVE_AREA to allocate space for RDI, RSI and RBX
    to avoid clobbering saved RDI, RSI and RBX values on stack by xsave to
    STATE_SAVE_OFFSET(%rsp).
    
       +==================+<- stack frame start aligned at 8 or 16 bytes
       |                  |<- RDI saved in the red zone
       |                  |<- RSI saved in the red zone
       |                  |<- RBX saved in the red zone
       |                  |<- paddings for stack realignment of 64 bytes
       |------------------|<- xsave buffer end aligned at 64 bytes
       |                  |<-
       |                  |<-
       |                  |<-
       |------------------|<- xsave buffer start at STATE_SAVE_OFFSET(%rsp)
       |                  |<- 8-byte padding for 64-byte alignment
       |                  |<- 8-byte padding for 64-byte alignment
       |                  |<- R11
       |                  |<- R10
       |                  |<- R9
       |                  |<- R8
       |                  |<- RDX
       |                  |<- RCX
       +==================+<- RSP aligned at 64 bytes
    
    Define TLSDESC_CALL_REGISTER_SAVE_AREA, the total register save area size
    for all integer registers by adding 24 to STATE_SAVE_OFFSET since RDI, RSI
    and RBX are saved onto stack without adjusting stack pointer first, using
    the red-zone.  This fixes BZ #31501.
    Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com>
    
    (cherry picked from commit 717ebfa85c8240d32d0d19d86a484c31c55c9617)
    (cherry picked from commit 354cabcb2634abe16da7a2ba5e648aac1204b58e)

 sysdeps/x86/cpu-features.c         | 11 +++--
 sysdeps/x86/sysdep.h               | 60 +++++++++++++++++++++++---
 sysdeps/x86_64/tst-gnu2-tls2mod1.S | 87 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 147 insertions(+), 11 deletions(-)

commit e8c2f5ad9686457360b0f4b8f99c13216777f304
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Wed Feb 28 12:08:03 2024 -0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Apr 7 00:21:57 2024 +0200

    x86-64: Update _dl_tlsdesc_dynamic to preserve AMX registers
    
    _dl_tlsdesc_dynamic should also preserve AMX registers which are
    caller-saved.  Add X86_XSTATE_TILECFG_ID and X86_XSTATE_TILEDATA_ID
    to x86-64 TLSDESC_CALL_STATE_SAVE_MASK.  Compute the AMX state size
    and save it in xsave_state_full_size which is only used by
    _dl_tlsdesc_dynamic_xsave and _dl_tlsdesc_dynamic_xsavec.  This fixes
    the AMX part of BZ #31372.  Tested on AMX processor.
    
    AMX test is enabled only for compilers with the fix for
    
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114098
    
    GCC 14 and GCC 11/12/13 branches have the bug fix.
    Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com>
    
    (cherry picked from commit 9b7091415af47082664717210ac49d51551456ab)
    (cherry picked from commit 853e915fdd6ae6c5f1a7a68d2594ec8dbfef1286)

 sysdeps/unix/sysv/linux/x86_64/Makefile            | 27 +++++++
 sysdeps/unix/sysv/linux/x86_64/include/asm/prctl.h |  5 ++
 .../sysv/linux/x86_64/tst-gnu2-tls2-amx-mod0.c     |  2 +
 .../sysv/linux/x86_64/tst-gnu2-tls2-amx-mod1.c     |  2 +
 .../sysv/linux/x86_64/tst-gnu2-tls2-amx-mod2.c     |  2 +
 sysdeps/unix/sysv/linux/x86_64/tst-gnu2-tls2-amx.c | 83 ++++++++++++++++++++++
 sysdeps/unix/sysv/linux/x86_64/tst-gnu2-tls2-amx.h | 63 ++++++++++++++++
 sysdeps/x86/cpu-features-offsets.sym               |  1 +
 sysdeps/x86/cpu-features.c                         | 55 +++++++++++++-
 sysdeps/x86/include/cpu-features.h                 |  2 +
 sysdeps/x86/sysdep.h                               | 18 ++++-
 sysdeps/x86_64/configure                           | 28 ++++++++
 sysdeps/x86_64/configure.ac                        | 15 ++++
 sysdeps/x86_64/dl-tlsdesc-dynamic.h                |  2 +-
 14 files changed, 299 insertions(+), 6 deletions(-)

commit 140da1ef2316f8ec84030d5a0873f804173fb1c4
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Mon Feb 26 06:37:03 2024 -0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Apr 7 00:21:33 2024 +0200

    x86: Update _dl_tlsdesc_dynamic to preserve caller-saved registers
    
    Compiler generates the following instruction sequence for GNU2 dynamic
    TLS access:
    
            leaq    tls_var@TLSDESC(%rip), %rax
            call    *tls_var@TLSCALL(%rax)
    
    or
    
            leal    tls_var@TLSDESC(%ebx), %eax
            call    *tls_var@TLSCALL(%eax)
    
    CALL instruction is transparent to compiler which assumes all registers,
    except for EFLAGS and RAX/EAX, are unchanged after CALL.  When
    _dl_tlsdesc_dynamic is called, it calls __tls_get_addr on the slow
    path.  __tls_get_addr is a normal function which doesn't preserve any
    caller-saved registers.  _dl_tlsdesc_dynamic saved and restored integer
    caller-saved registers, but didn't preserve any other caller-saved
    registers.  Add _dl_tlsdesc_dynamic IFUNC functions for FNSAVE, FXSAVE,
    XSAVE and XSAVEC to save and restore all caller-saved registers.  This
    fixes BZ #31372.
    
    Add GLRO(dl_x86_64_runtime_resolve) with GLRO(dl_x86_tlsdesc_dynamic)
    to optimize elf_machine_runtime_setup.
    Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
    
    (cherry picked from commit 0aac205a814a8511e98d02b91a8dc908f1c53cde)
    (cherry picked from commit a364304718725a31ab141936322855c76c73e35e)

 elf/Makefile                                 |  18 +++
 elf/tst-gnu2-tls2.c                          | 122 +++++++++++++++++
 elf/tst-gnu2-tls2.h                          |  36 +++++
 elf/tst-gnu2-tls2mod0.c                      |  31 +++++
 elf/tst-gnu2-tls2mod1.c                      |  31 +++++
 elf/tst-gnu2-tls2mod2.c                      |  31 +++++
 sysdeps/i386/dl-machine.h                    |   2 +-
 sysdeps/i386/dl-tlsdesc-dynamic.h            | 190 +++++++++++++++++++++++++++
 sysdeps/i386/dl-tlsdesc.S                    | 115 +++++++---------
 sysdeps/x86/Makefile                         |   7 +-
 sysdeps/x86/cpu-features.c                   |  56 +++++++-
 sysdeps/x86/dl-procinfo.c                    |  16 +++
 sysdeps/{x86_64 => x86}/features-offsets.sym |   2 +
 sysdeps/x86/sysdep.h                         |   6 +
 sysdeps/x86/tst-gnu2-tls2.c                  |  20 +++
 sysdeps/x86_64/Makefile                      |   2 +-
 sysdeps/x86_64/dl-machine.h                  |  19 +--
 sysdeps/x86_64/dl-procinfo.c                 |  16 +++
 sysdeps/x86_64/dl-tlsdesc-dynamic.h          | 166 +++++++++++++++++++++++
 sysdeps/x86_64/dl-tlsdesc.S                  | 108 +++++----------
 sysdeps/x86_64/dl-trampoline-save.h          |  34 +++++
 sysdeps/x86_64/dl-trampoline-state.h         |  51 +++++++
 sysdeps/x86_64/dl-trampoline.S               |  20 +--
 sysdeps/x86_64/dl-trampoline.h               |  34 +----
 24 files changed, 920 insertions(+), 213 deletions(-)

commit 9b386733ef9785ef1613eb6bb9c5c55c08179d5b
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Fri Feb 16 07:17:10 2024 -0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Apr 7 00:21:06 2024 +0200

    x86-64: Save APX registers in ld.so trampoline
    
    Add APX registers to STATE_SAVE_MASK so that APX registers are saved in
    ld.so trampoline.  This fixes BZ #31371.
    
    Also update STATE_SAVE_OFFSET and STATE_SAVE_MASK for i386 which will
    be used by i386 _dl_tlsdesc_dynamic.
    Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
    
    (cherry picked from commit dfb05f8e704edac70db38c4c8ee700769d91a413)
    (cherry picked from commit 7fc8242bf87828c935ac5df5cafb9dc7ab635fd9)

 sysdeps/x86/sysdep.h | 52 ++++++++++++++++++++++++++++++++++++++++++++++------
 1 file changed, 46 insertions(+), 6 deletions(-)

commit e291979f85f5311ee4ca50470940f49e86970a41
Author:     caiyinyu <caiyinyu@loongson.cn>
AuthorDate: Mon Mar 11 16:07:48 2024 +0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Apr 7 00:20:47 2024 +0200

    LoongArch: Correct {__ieee754, _}_scalb -> {__ieee754, _}_scalbf
    
    (cherry picked from commit 983f34a1252de3ca6f2305c211d86530ea42010e)

 sysdeps/loongarch/fpu/e_scalbf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit d8ac8b13612c4f6654589bc6be93a171d65133d0
Author:     Amrita H S <amritahs@linux.ibm.com>
AuthorDate: Tue Mar 19 19:08:47 2024 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Apr 7 00:20:27 2024 +0200

    ﻿powerpc: Placeholder and infrastructure/build support to add Power11 related changes.
    
    The following three changes have been added to provide initial Power11 support.
        1. Add the directories to hold Power11 files.
        2. Add support to select Power11 libraries based on AT_PLATFORM.
        3. Let submachine=power11 be set automatically.
    
    Reviewed-by: Florian Weimer <fweimer@redhat.com>
    Reviewed-by: Peter Bergner <bergner@linux.ibm.com>
    (cherry picked from commit 1ea051145612f199d8716ecdf78b084b00b5a727)
    (cherry picked from commit aad45c8ac30aa1072e54903ce6aead22702f244a)

 sysdeps/powerpc/dl-procinfo.h                              | 8 +++++++-
 sysdeps/powerpc/powerpc32/power11/Implies                  | 2 ++
 sysdeps/powerpc/powerpc32/power11/fpu/multiarch/Implies    | 1 +
 sysdeps/powerpc/powerpc32/power11/multiarch/Implies        | 1 +
 sysdeps/powerpc/powerpc64/be/power11/Implies               | 2 ++
 sysdeps/powerpc/powerpc64/be/power11/fpu/Implies           | 1 +
 sysdeps/powerpc/powerpc64/be/power11/fpu/multiarch/Implies | 1 +
 sysdeps/powerpc/powerpc64/be/power11/multiarch/Implies     | 1 +
 sysdeps/powerpc/powerpc64/le/power11/Implies               | 2 ++
 sysdeps/powerpc/powerpc64/le/power11/fpu/Implies           | 1 +
 sysdeps/powerpc/powerpc64/le/power11/fpu/multiarch/Implies | 1 +
 sysdeps/powerpc/powerpc64/le/power11/multiarch/Implies     | 1 +
 sysdeps/powerpc/powerpc64/le/tst-glibc-hwcaps.c            | 6 ++++--
 sysdeps/powerpc/preconfigure                               | 2 +-
 sysdeps/powerpc/preconfigure.ac                            | 2 +-
 15 files changed, 27 insertions(+), 5 deletions(-)

commit ac49d5bd5a838284dc7603ab8b79e6f52dbb1ee9
Author:     Manjunath Matti <mmatti@linux.ibm.com>
AuthorDate: Tue Mar 19 15:29:48 2024 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Apr 7 00:20:02 2024 +0200

    ﻿powerpc: Add HWCAP3/HWCAP4 data to TCB for Power Architecture.
    
    This patch adds a new feature for powerpc.  In order to get faster
    access to the HWCAP3/HWCAP4 masks, similar to HWCAP/HWCAP2 (i.e. for
    implementing __builtin_cpu_supports() in GCC) without the overhead of
    reading them from the auxiliary vector, we now reserve space for them
    in the TCB.
    
    Suggested-by: Peter Bergner <bergner@linux.ibm.com>
    Reviewed-by: Peter Bergner <bergner@linux.ibm.com>
    (cherry picked from commit 3ab9b88e2ac91062b6d493fe32bd101a55006c6a)
    (cherry picked from commit ee7f4c54e19738c2c27d3846e1e9b3595c89221f)

 elf/dl-diagnostics.c                           |  2 +
 elf/dl-support.c                               |  2 +
 elf/elf.h                                      |  4 ++
 sysdeps/generic/ldsodefs.h                     |  2 +
 sysdeps/powerpc/dl-procinfo.c                  |  6 ++-
 sysdeps/powerpc/dl-procinfo.h                  | 52 ++++++++++++++++++--------
 sysdeps/powerpc/hwcapinfo.c                    | 11 ++++--
 sysdeps/unix/sysv/linux/dl-parse_auxv.h        |  2 +
 sysdeps/unix/sysv/linux/dl-sysdep.c            |  2 +
 sysdeps/unix/sysv/linux/powerpc/cpu-features.c |  2 +
 sysdeps/unix/sysv/linux/powerpc/cpu-features.h |  2 +
 sysdeps/unix/sysv/linux/powerpc/libc-start.c   |  6 +++
 12 files changed, 74 insertions(+), 19 deletions(-)

commit b9eaea9754e91d40307606baf31f8959ce83303f
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Fri Mar 15 19:08:24 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Apr 7 00:19:40 2024 +0200

    linux: Use rseq area unconditionally in sched_getcpu (bug 31479)
    
    Originally, nptl/descr.h included <sys/rseq.h>, but we removed that
    in commit 2c6b4b272e6b4d07303af25709051c3e96288f2d ("nptl:
    Unconditionally use a 32-byte rseq area").  After that, it was
    not ensured that the RSEQ_SIG macro was defined during sched_getcpu.c
    compilation that provided a definition.  This commit always checks
    the rseq area for CPU number information before using the other
    approaches.
    
    This adds an unnecessary (but well-predictable) branch on
    architectures which do not define RSEQ_SIG, but its cost is small
    compared to the system call.  Most architectures that have vDSO
    acceleration for getcpu also have rseq support.
    
    Fixes: 2c6b4b272e6b4d07303af25709051c3e96288f2d
    Fixes: 1d350aa06091211863e41169729cee1bca39f72f
    Reviewed-by: Arjun Shankar <arjun@redhat.com>
    (cherry picked from commit 7a76f218677d149d8b7875b336722108239f7ee9)
    (cherry picked from commit 71fcdba577884627c3ee4e43beb915da752efb1f)

 sysdeps/unix/sysv/linux/sched_getcpu.c | 8 --------
 1 file changed, 8 deletions(-)

commit 3f689b5c9acff8ba74722f3724b426e904a62a9e
Author:     Jakub Jelinek <jakub@redhat.com>
AuthorDate: Wed Jan 31 19:17:27 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Apr 7 00:19:09 2024 +0200

    Use gcc __builtin_stdc_* builtins in stdbit.h if possible
    
    The following patch uses the GCC 14 __builtin_stdc_* builtins in stdbit.h
    for the type-generic macros, so that when compiled with GCC 14 or later,
    it supports not just 8/16/32/64-bit unsigned integers, but also 128-bit
    (if target supports them) and unsigned _BitInt (any supported precision).
    And so that the macros don't expand arguments multiple times and can be
    evaluated in constant expressions.
    
    The new testcase is gcc's gcc/testsuite/gcc.dg/builtin-stdc-bit-1.c
    adjusted to test stdbit.h and the type-generic macros in there instead
    of the builtins and adjusted to use glibc test framework rather than
    gcc style tests with __builtin_abort ().
    
    Signed-off-by: Jakub Jelinek <jakub@redhat.com>
    Reviewed-by: Joseph Myers <josmyers@redhat.com>
    (cherry picked from commit da89496337b97e6a2aaf1e81d55cf998f6db1070)
    (cherry picked from commit 1b9c1a0047fb26a65a9b2a7b8cd977243f7d353c)

 manual/stdbit.texi           |   8 +-
 stdlib/Makefile              |   1 +
 stdlib/stdbit.h              |  84 ++++-
 stdlib/tst-stdbit-builtins.c | 778 +++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 856 insertions(+), 15 deletions(-)

commit 25f58ba8f03747d86d28a372266a039d318af613 (tag: gentoo/glibc-2.39-2)
Author:     Stefan Liebler <stli@linux.ibm.com>
AuthorDate: Thu Feb 22 15:03:27 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 3 01:53:00 2024 +0100

    S390: Do not clobber r7 in clone [BZ #31402]
    
    Starting with commit e57d8fc97b90127de4ed3e3a9cdf663667580935
    "S390: Always use svc 0"
    clone clobbers the call-saved register r7 in error case:
    function or stack is NULL.
    
    This patch restores the saved registers also in the error case.
    Furthermore the existing test misc/tst-clone is extended to check
    all error cases and that clone does not clobber registers in this
    error case.
    
    (cherry picked from commit 02782fd12849b6673cb5c2728cb750e8ec295aa3)
    (cherry picked from commit e0910f1d3278f05439fb434ee528fc9be1b6bd5e)

 sysdeps/unix/sysv/linux/s390/s390-32/clone.S |  1 +
 sysdeps/unix/sysv/linux/s390/s390-64/clone.S |  1 +
 sysdeps/unix/sysv/linux/tst-clone.c          | 73 +++++++++++++++++++++++-----
 3 files changed, 63 insertions(+), 12 deletions(-)

commit 3369051b95362a6d66c867c48b8802e36cc80444
Author:     Xi Ruoyao <xry111@xry111.site>
AuthorDate: Thu Feb 22 21:26:55 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 3 01:52:40 2024 +0100

    math: Update mips64 ulps
    
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
    (cherry picked from commit e2a65ecc4b30a797df7dc6529f09b712aa256029)
    (cherry picked from commit d0724994de40934c552f1f68de89053848a44927)

 sysdeps/mips/mips64/libm-test-ulps | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

commit fa441cd6be9a34d81306d41defeefaa2ac31d0b8
Author:     Michael Karcher <sourceware-bugzilla@mkarcher.dialup.fu-berlin.de>
AuthorDate: Sat Feb 17 22:47:58 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Feb 17 22:47:58 2024 +0100

    Mitigation for "clone on sparc might fail with -EFAULT for no valid reason"
    
    Bug: https://www.mail-archive.com/debian-glibc@lists.debian.org/msg62592.html
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31394
    See-also: https://lore.kernel.org/sparclinux/62f9be9d-a086-4134-9a9f-5df8822708af@mkarcher.dialup.fu-berlin.de/
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 sysdeps/unix/sysv/linux/sparc/sparc32/clone.S | 3 +++
 sysdeps/unix/sysv/linux/sparc/sparc64/clone.S | 3 +++
 2 files changed, 6 insertions(+)

commit 7c002cd8169e113bcc85afb08c8e7b66f1dd3b19
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Fri Feb 16 07:40:37 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Feb 17 22:26:58 2024 +0100

    i386: Use generic memrchr in libc (bug 31316)
    
    Before this change, we incorrectly used the SSE2 variant in the
    implementation, without checking that the system actually supports
    SSE2.
    
    Tested-by: Sam James <sam@gentoo.org>
    (cherry picked from commit 0d9166c2245cad4ac520b337dee40c9a583872b6)

 sysdeps/i386/i686/multiarch/memrchr-c.c    | 1 +
 sysdeps/i386/i686/multiarch/memrchr-sse2.S | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

commit 15025887a98895c032f7a23e8b5ab240acf0038d
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Thu Feb 1 14:29:53 2024 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Feb 14 18:17:49 2024 +0100

    mips: FIx clone3 implementation (BZ 31325)
    
    For o32 we need to setup a minimal stack frame to allow cprestore
    on __thread_start_clone3 (which instruct the linker to save the
    gp for PIC).  Also, there is no guarantee by kABI that $8 will be
    preserved after syscall execution, so we need to save it on the
    provided stack.
    
    Checked on mipsel-linux-gnu.
    
    Reported-by: Khem Raj <raj.khem@gmail.com>
    Tested-by: Khem Raj <raj.khem@gmail.com>
    (cherry picked from commit bbd248ac0d75efdef8fe61ea69b1fb25fb95b6e7)
    (cherry picked from commit 312e159626b67fe11f39e83e222cf4348a3962f3)

 sysdeps/unix/sysv/linux/mips/clone3.S | 32 +++++++++++++++++++++++++++-----
 1 file changed, 27 insertions(+), 5 deletions(-)

commit a6bb63aae62b2b803e4e48d11268710603e7b710
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Mon Feb 5 16:10:24 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Feb 14 18:17:33 2024 +0100

    arm: Remove wrong ldr from _dl_start_user (BZ 31339)
    
    The commit 49d877a80b29d3002887b084eec6676d9f5fec18 (arm: Remove
    _dl_skip_args usage) removed the _SKIP_ARGS literal, which was
    previously loader to r4 on loader _start.  However, the cleanup did not
    remove the following 'ldr r4, [sl, r4]' on _dl_start_user, used to check
    to skip the arguments after ld self-relocations.
    
    In my testing, the kernel initially set r4 to 0, which makes the
    ldr instruction just read the _GLOBAL_OFFSET_TABLE_.  However, since r4
    is a callee-saved register; a different runtime might not zero
    initialize it and thus trigger an invalid memory access.
    
    Checked on arm-linux-gnu.
    
    Reported-by: Adrian Ratiu <adrian.ratiu@collabora.com>
    Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
    (cherry picked from commit 1e25112dc0cb2515d27d8d178b1ecce778a9d37a)
    (cherry picked from commit 63295e4fda1f6dab4bf7442706fe303bf283036c)

 sysdeps/arm/dl-machine.h | 1 -
 1 file changed, 1 deletion(-)

commit b93ccc85146592a26598ff4f408616f50826800d (tag: gentoo/glibc-2.39-1)
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: Wed Jan 31 18:43:19 2024 +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.

 include/dirent.h                            |   2 +-
 sysdeps/unix/sysv/linux/Makefile            |   2 +
 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         |   9 +-
 sysdeps/unix/sysv/linux/opendir.c           |   3 +
 sysdeps/unix/sysv/linux/readdir.c           |  21 ++--
 sysdeps/unix/sysv/linux/readdir64.c         |  11 +++
 sysdeps/unix/sysv/linux/rewinddir.c         |   5 +
 sysdeps/unix/sysv/linux/seekdir.c           |  30 +++++-
 sysdeps/unix/sysv/linux/telldir.c           |  36 +++++++
 sysdeps/unix/sysv/linux/telldir.h           |  70 ++++++++++++++
 sysdeps/unix/sysv/linux/tst-opendir-lfs.c   |   2 +
 sysdeps/unix/sysv/linux/tst-opendir.c       | 145 ++++++++++++++++++++++++++++
 15 files changed, 329 insertions(+), 18 deletions(-)

commit 0426961424c951ab0134b2f9ce4c8a6304f663fc
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Wed Mar 1 14:41:23 2023 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Jan 31 18:43:16 2024 +0100

    support: Add xreallocarray
    
    As a wrapper over reallocarray.

 support/Makefile        |  1 +
 support/support.h       |  2 ++
 support/xreallocarray.c | 29 +++++++++++++++++++++++++++++
 3 files changed, 32 insertions(+)

commit f3ae05fa3af53b449d2de89a2cba97a92c946dd1
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: Wed Jan 31 18:43:13 2024 +0100

    linux: Use getdents64 on non-LFS readdir
    
    It is similar to what non-LFS getdents do (including overflow check).
    
    Checked on x86_64-linux-gnu and i686-linux-gnu.

 sysdeps/unix/sysv/linux/readdir.c | 97 +++++++++++++++++++++++++++++----------
 1 file changed, 73 insertions(+), 24 deletions(-)

commit 5b843e85f8fc4203006fe551f3eccd5e8b89039b
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 Jan 31 18:43:10 2024 +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 df97c5b32f884ed58cf4ef2cf795855407ca65df
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 Jan 31 18:43:07 2024 +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 3824bc990ba6ae8cb695867d6c8807dfb09d9fb9
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 Jan 31 18:43:04 2024 +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(+)

commit 6d1e3fb07b45e2e31e469b16cf21b24bccf8914c
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: Wed Jan 31 02:12:43 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Jan 31 02:12:43 2024 +0100

    Replace advisories directory
    
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 ADVISORIES                    |  2 ++
 advisories/GLIBC-SA-2023-0001 | 14 ---------
 advisories/GLIBC-SA-2023-0002 | 15 ---------
 advisories/GLIBC-SA-2023-0003 | 15 ---------
 advisories/GLIBC-SA-2023-0004 | 16 ----------
 advisories/GLIBC-SA-2023-0005 | 18 -----------
 advisories/GLIBC-SA-2024-0001 | 15 ---------
 advisories/GLIBC-SA-2024-0002 | 15 ---------
 advisories/GLIBC-SA-2024-0003 | 13 --------
 advisories/README             | 73 -------------------------------------------
 10 files changed, 2 insertions(+), 194 deletions(-)
