commit 967cca3aadaa467a96db0dabfb81df853f97d042 (HEAD -> gentoo/2.39, gentoo/gentoo/2.39)
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Apr 25 08:06:52 2024 -0700

    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>
Date:   Thu Apr 25 15:01:07 2024 +0200

    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>
Date:   Thu Apr 25 15:01:07 2024 +0200

    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>
Date:   Thu Apr 25 15:01:07 2024 +0200

    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>
Date:   Thu Apr 25 15:00:45 2024 +0200

    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>
Date:   Tue Apr 23 13:59:50 2024 -0700

    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>
Date:   Thu Apr 25 12:56:48 2024 +0200

    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>
Date:   Tue Apr 23 21:16:32 2024 +0200

    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>
Date:   Thu Mar 28 12:25:38 2024 -0300

    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>
Date:   Tue Feb 13 12:23:14 2024 -0800

    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>
Date:   Thu Feb 15 11:19:56 2024 -0800

    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>
Date:   Sun Apr 14 08:24:51 2024 +0200

    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>
Date:   Thu Feb 29 17:57:02 2024 -0800

    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>
Date:   Wed Feb 28 09:51:14 2024 -0800

    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>
Date:   Thu Mar 21 16:48:33 2024 +0000

    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>
Date:   Wed Mar 13 14:34:14 2024 +0000

    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>
Date:   Tue Feb 20 16:44:13 2024 +0000

    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>
Date:   Thu Feb 8 10:08:40 2024 -0300

    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>
Date:   Thu Feb 8 10:08:39 2024 -0300

    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>
Date:   Thu Feb 8 10:08:38 2024 -0300

    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>
Date:   Tue Mar 19 13:49:50 2024 +0100

    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>
Date:   Tue Mar 12 13:21:20 2024 -0300

    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>
Date:   Tue Mar 12 13:21:19 2024 -0300

    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>
Date:   Tue Mar 12 13:21:18 2024 -0300

    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>
Date:   Mon Mar 18 06:40:16 2024 -0700

    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>
Date:   Wed Feb 28 12:08:03 2024 -0800

    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>
Date:   Mon Feb 26 06:37:03 2024 -0800

    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>
Date:   Fri Feb 16 07:17:10 2024 -0800

    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>
Date:   Mon Mar 11 16:07:48 2024 +0800

    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>
Date:   Tue Mar 19 19:08:47 2024 -0500

    ﻿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>
Date:   Tue Mar 19 15:29:48 2024 -0500

    ﻿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>
Date:   Fri Mar 15 19:08:24 2024 +0100

    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>
Date:   Wed Jan 31 19:17:27 2024 +0100

    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>
Date:   Thu Feb 22 15:03:27 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>
Date:   Thu Feb 22 21:26:55 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>
Date:   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>
Date:   Fri Feb 16 07:40:37 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>
Date:   Thu Feb 1 14:29:53 2024 -0300

    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>
Date:   Mon Feb 5 16:10:24 2024 +0000

    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>
Date:   Mon Apr 13 18:09:20 2020 -0300

    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>
Date:   Wed Mar 1 14:41:23 2023 -0300

    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>
Date:   Tue Oct 20 13:37:15 2020 -0300

    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>
Date:   Fri Dec 14 20:43:04 2018 +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>
Date:   Mon Oct 22 22:34:13 2018 +0200

    Adapt to Gentoo-specific /etc/mail/aliases
    
    Patch by pacho2
    
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
    (cherry picked from commit 4e616cda056f471b799beba2b1cedc787ad4ecc0)
    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>
Date:   Tue Aug 3 00:34:59 2021 +0200

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