commit 7338afe69aaad075f613676862aeb30114ffbb50 (HEAD -> gentoo/2.40)
Author:     Michael Jeanson <mjeanson@efficios.com>
AuthorDate: Fri Feb 14 13:54:22 2025 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:43:50 2025 +0100

    nptl: clear the whole rseq area before registration
    
    Due to the extensible nature of the rseq area we can't explictly
    initialize fields that are not part of the ABI yet. It was agreed with
    upstream that all new fields will be documented as zero initialized by
    userspace. Future kernels configured with CONFIG_DEBUG_RSEQ will
    validate the content of all fields during registration.
    
    Replace the explicit field initialization with a memset of the whole
    rseq area which will cover fields as they are added to future kernels.
    
    Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
    Reviewed-by: Florian Weimer <fweimer@redhat.com>
    (cherry picked from commit 689a62a4217fae78b9ce0db781dc2a421f2b1ab4)
    (cherry picked from commit 3e820e17a8cef84645d83b67abcbc3f88c7fd268)

 sysdeps/nptl/dl-tls_init_tp.c           |  1 +
 sysdeps/unix/sysv/linux/rseq-internal.h | 11 +++++------
 2 files changed, 6 insertions(+), 6 deletions(-)

commit dd1af7715e47b8f370259fad6b3eb1bc9a224576
Author:     Wilco Dijkstra <wilco.dijkstra@arm.com>
AuthorDate: Fri Dec 13 15:43:07 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:43:33 2025 +0100

    math: Improve layout of exp/exp10 data
    
    GCC aligns global data to 16 bytes if their size is >= 16 bytes.  This patch
    changes the exp_data struct slightly so that the fields are better aligned
    and without gaps.  As a result on targets that support them, more load-pair
    instructions are used in exp.  Exp10 is improved by moving invlog10_2N later
    so that neglog10_2hiN and neglog10_2loN can be loaded using load-pair.
    
    The exp benchmark improves 2.5%, "144bits" by 7.2%, "768bits" by 12.7% on
    Neoverse V2.  Exp10 improves by 1.5%.
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit 5afaf99edb326fd9f36eb306a828d129a3a1d7f7)
    (cherry picked from commit d8e8342369831808b00324790c8809ba33408ee7)

 sysdeps/ieee754/dbl-64/math_config.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

commit 0d13583f6f0d82c7da2f39e58f39245f4f198076
Author:     Wilco Dijkstra <wilco.dijkstra@arm.com>
AuthorDate: Thu Feb 27 16:28:52 2025 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:43:16 2025 +0100

    AArch64: Use prefer_sve_ifuncs for SVE memset
    
    Use prefer_sve_ifuncs for SVE memset just like memcpy.
    
    Reviewed-by: Yury Khrustalev <yury.khrustalev@arm.com>
    (cherry picked from commit 0f044be1dae5169d0e57f8d487b427863aeadab4)
    (cherry picked from commit d6175a44e95fe443d0fbfed37a9ff7424f1e2661)

 sysdeps/aarch64/multiarch/memset.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 0a9cb633a1d78e62817f149395b861c693b957ba
Author:     Wilco Dijkstra <wilco.dijkstra@arm.com>
AuthorDate: Tue Dec 24 18:01:59 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:42:30 2025 +0100

    AArch64: Add SVE memset
    
    Add SVE memset based on the generic memset with predicated load for sizes < 16.
    Unaligned memsets of 128-1024 are improved by ~20% on average by using aligned
    stores for the last 64 bytes.  Performance of random memset benchmark improves
    by ~2% on Neoverse V1.
    
    Reviewed-by: Yury Khrustalev <yury.khrustalev@arm.com>
    (cherry picked from commit 163b1bbb76caba4d9673c07940c5930a1afa7548)
    (cherry picked from commit 7038970f1f485fb660606f0c596f432fdef250f6)

 sysdeps/aarch64/multiarch/Makefile           |   1 +
 sysdeps/aarch64/multiarch/ifunc-impl-list.c  |   1 +
 sysdeps/aarch64/multiarch/memset.c           |   4 +
 sysdeps/aarch64/multiarch/memset_sve_zva64.S | 123 +++++++++++++++++++++++++++
 4 files changed, 129 insertions(+)

commit deaf6aa4c48f9f70a80d8972f2d6d11e30172265
Author:     Wilco Dijkstra <wilco.dijkstra@arm.com>
AuthorDate: Wed Jul 24 15:17:47 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:42:08 2025 +0100

    math: Improve layout of expf data
    
    GCC aligns global data to 16 bytes if their size is >= 16 bytes.  This patch
    changes the exp2f_data struct slightly so that the fields are better aligned.
    As a result on targets that support them, load-pair instructions accessing
    poly_scaled and invln2_scaled are now 16-byte aligned.
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit 44fa9c1080fe6a9539f0d2345b9d2ae37b8ee57a)
    (cherry picked from commit 27fa0268ead054810a5e2669d0b5bb88ceb05b05)

 sysdeps/ieee754/flt-32/math_config.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 2551638fdaaeb83cd4e73e41c0aaef1a28c149ff
Author:     Wilco Dijkstra <wilco.dijkstra@arm.com>
AuthorDate: Mon Nov 25 18:43:08 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:41:51 2025 +0100

    AArch64: Remove zva_128 from memset
    
    Remove ZVA 128 support from memset - the new memset no longer
    guarantees count >= 256, which can result in underflow and a
    crash if ZVA size is 128 ([1]).  Since only one CPU uses a ZVA
    size of 128 and its memcpy implementation was removed in commit
    e162ab2bf1b82c40f29e1925986582fa07568ce8, remove this special
    case too.
    
    [1] https://sourceware.org/pipermail/libc-alpha/2024-November/161626.html
    
    Reviewed-by: Andrew Pinski <quic_apinski@quicinc.com>
    (cherry picked from commit a08d9a52f967531a77e1824c23b5368c6434a72d)
    (cherry picked from commit 41eb2f8b5847079caca90a74659456adbb80ec29)

 sysdeps/aarch64/memset.S | 25 +------------------------
 1 file changed, 1 insertion(+), 24 deletions(-)

commit 54194134c6ea5eca350918a6b2d2543e0159f3f4
Author:     Wilco Dijkstra <wilco.dijkstra@arm.com>
AuthorDate: Mon Sep 9 15:26:47 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:41:34 2025 +0100

    AArch64: Optimize memset
    
    Improve small memsets by avoiding branches and use overlapping stores.
    Use DC ZVA for copies over 128 bytes.  Remove unnecessary code for ZVA sizes
    other than 64 and 128.  Performance of random memset benchmark improves by 24%
    on Neoverse N1.
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit cec3aef32412779e207f825db0d057ebb4628ae8)
    (cherry picked from commit 544fb349d35efd5f86ed7e482759ff21496a32fd)

 sysdeps/aarch64/memset.S | 195 ++++++++++++++++++++---------------------------
 1 file changed, 84 insertions(+), 111 deletions(-)

commit e03ac4920c98810f70dd758dab22b4c376deda86
Author:     Wilco Dijkstra <wilco.dijkstra@arm.com>
AuthorDate: Wed Aug 7 14:43:47 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:41:17 2025 +0100

    AArch64: Improve generic strlen
    
    Improve performance by handling another 16 bytes before entering the loop.
    Use ADDHN in the loop to avoid SHRN+FMOV when it terminates.  Change final
    size computation to avoid increasing latency.  On Neoverse V1 performance
    of the random strlen benchmark improves by 4.6%.
    
    Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
    (cherry picked from commit 3dc426b642dcafdbc11a99f2767e081d086f5fc7)
    (cherry picked from commit 64896b7d329809127035fde42768a6f7eeffed75)

 sysdeps/aarch64/strlen.S | 39 +++++++++++++++++++++++++++------------
 1 file changed, 27 insertions(+), 12 deletions(-)

commit 7cf8a6b965cdbb5cbfa9efbcdec9affaf64930f2
Author:     Wilco Dijkstra <wilco.dijkstra@arm.com>
AuthorDate: Thu Feb 27 20:34:34 2025 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:41:00 2025 +0100

    Revert "AArch64: Add vector logp1 alias for log1p"
    
    This reverts commit a991a0fc7c051d7ef2ea7778e0a699f22d4e53d7.
    
    (cherry picked from commit fd9a3a36fdcf14d1678c469e8b9033a46aa6c6fb)

 bits/libm-simd-decl-stubs.h                     | 11 -----------
 math/bits/mathcalls.h                           |  2 +-
 sysdeps/aarch64/fpu/Versions                    |  7 -------
 sysdeps/aarch64/fpu/advsimd_f32_protos.h        |  1 -
 sysdeps/aarch64/fpu/bits/math-vector.h          |  8 --------
 sysdeps/aarch64/fpu/log1p_advsimd.c             |  2 --
 sysdeps/aarch64/fpu/log1p_sve.c                 |  2 --
 sysdeps/aarch64/fpu/log1pf_advsimd.c            |  3 ---
 sysdeps/aarch64/fpu/log1pf_sve.c                |  2 --
 sysdeps/unix/sysv/linux/aarch64/libmvec.abilist |  5 -----
 10 files changed, 1 insertion(+), 42 deletions(-)

commit 9ef7093c807a649256f083bb7c9ad147a8d2cfb4
Author:     Yat Long Poon <yatlong.poon@arm.com>
AuthorDate: Thu Feb 13 18:03:04 2025 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:40:42 2025 +0100

    AArch64: Improve codegen for SVE powf
    
    Improve memory access with indexed/unpredicated instructions.
    Eliminate register spills.  Speedup on Neoverse V1: 3%.
    
    Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
    (cherry picked from commit 95e807209b680257a9afe81a507754f1565dbb4d)
    (cherry picked from commit 06fd8ad78f35a6cc65dc7c6c08ce55faf6ad079d)

 sysdeps/aarch64/fpu/powf_sve.c | 117 +++++++++++++++++++++--------------------
 1 file changed, 59 insertions(+), 58 deletions(-)

commit ef3a485e2e060072fe6606637c3cd0724f96661f
Author:     Yat Long Poon <yatlong.poon@arm.com>
AuthorDate: Thu Feb 13 18:02:01 2025 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:40:28 2025 +0100

    AArch64: Improve codegen for SVE pow
    
    Move constants to struct.  Improve memory access with indexed/unpredicated
    instructions.  Eliminate register spills.  Speedup on Neoverse V1: 24%.
    
    Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
    (cherry picked from commit 0b195651db3ae793187c7dd6d78b5a7a8da9d5e6)
    (cherry picked from commit 7dc549c5a4af3c32689147550144397116404d22)

 sysdeps/aarch64/fpu/pow_sve.c | 245 ++++++++++++++++++++++++------------------
 1 file changed, 142 insertions(+), 103 deletions(-)

commit 3362e1f1ec51a0a7228241439c8d6d3a79cbc013
Author:     Yat Long Poon <yatlong.poon@arm.com>
AuthorDate: Thu Feb 13 18:00:50 2025 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:40:13 2025 +0100

    AArch64: Improve codegen for SVE erfcf
    
    Reduce number of MOV/MOVPRFXs and use unpredicated FMUL.
    Replace MUL with LSL.  Speedup on Neoverse V1: 6%.
    
    Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
    (cherry picked from commit f5ff34cb3c75ec1061c75bb9188b3c1176426947)
    (cherry picked from commit 194185c28954dfa11a6ded8b32f34fee680d3218)

 sysdeps/aarch64/fpu/erfcf_sve.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

commit 88cd397f1cb3283c8854cde136b105787e7640bb
Author:     Luna Lamb <luna.lamb@arm.com>
AuthorDate: Thu Feb 13 17:54:46 2025 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:39:53 2025 +0100

    Aarch64: Improve codegen in SVE exp and users, and update expf_inline
    
    Use unpredicted muls, and improve memory access.
    7%, 3% and 1% improvement in throughput microbenchmark on Neoverse V1,
    for exp, exp2 and cosh respectively.
    
    Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
    (cherry picked from commit c0ff447edf19bd4630fe79adf5e8b896405b059f)
    (cherry picked from commit 4b0bb84eb7e52a135c873fd9d0fc6c30599aedf4)

 sysdeps/aarch64/fpu/cosh_sve.c       | 18 ++++++++++--------
 sysdeps/aarch64/fpu/exp10_sve.c      | 25 +++++++++++++++----------
 sysdeps/aarch64/fpu/exp2_sve.c       | 26 ++++++++++++++------------
 sysdeps/aarch64/fpu/exp_sve.c        | 36 +++++++++++++++++++-----------------
 sysdeps/aarch64/fpu/sv_expf_inline.h |  3 +--
 5 files changed, 59 insertions(+), 49 deletions(-)

commit 6b8abddeff05e83ae5a44956e087dfbbc8747170
Author:     Luna Lamb <luna.lamb@arm.com>
AuthorDate: Thu Feb 13 17:52:09 2025 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:39:36 2025 +0100

    Aarch64: Improve codegen in SVE asinh
    
    Use unpredicated muls, use lanewise mla's and improve memory access.
    1% regression in throughput microbenchmark on Neoverse V1.
    
    Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
    (cherry picked from commit 8f0e7fe61e0a2ad5ed777933703ce09053810ec4)
    (cherry picked from commit 0ff6a9ff79bca9384ce4ba20e8942d39cc377a14)

 sysdeps/aarch64/fpu/asinh_sve.c | 111 ++++++++++++++++++++++++++++------------
 1 file changed, 77 insertions(+), 34 deletions(-)

commit 6f73375988bfaad72d004174a5eda7b37b75bffc
Author:     Luna Lamb <luna.lamb@arm.com>
AuthorDate: Fri Jan 3 20:15:17 2025 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:39:05 2025 +0100

    AArch64: Improve codegen in SVE expm1f and users
    
    Use unpredicated muls, use absolute compare and improve memory access.
    Expm1f, sinhf and tanhf show 7%, 5% and 1% improvement in throughput
    microbenchmark on Neoverse V1.
    
    (cherry picked from commit f86b4cf87581cf1e45702b07880679ffa0b1f47a)
    (cherry picked from commit d983f14c304df2d880c7b01e904e4a889064b9b3)

 sysdeps/aarch64/fpu/expm1f_sve.c       | 31 +++++++++++++------------------
 sysdeps/aarch64/fpu/sinhf_sve.c        |  2 +-
 sysdeps/aarch64/fpu/sv_expm1f_inline.h | 28 ++++++++++++----------------
 sysdeps/aarch64/fpu/tanhf_sve.c        | 28 ++++++++++++++++++----------
 4 files changed, 44 insertions(+), 45 deletions(-)

commit b0bdf1d034b0af5385666f84b730a56a2bf08fda
Author:     Yat Long Poon <yatlong.poon@arm.com>
AuthorDate: Fri Jan 3 19:09:05 2025 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:38:45 2025 +0100

    AArch64: Improve codegen for SVE log1pf users
    
    Reduce memory access by using lanewise MLA and reduce number of MOVPRFXs.
    Move log1pf implementation to inline helper function.
    Speedup on Neoverse V1 for log1pf (10%), acoshf (-1%), atanhf (2%), asinhf (2%).
    
    (cherry picked from commit 91c1fadba338752bf514cd4cca057b27b1b10eed)
    (cherry picked from commit aa7c61ea15e27ae14717e065a5d4c50baa472851)

 sysdeps/aarch64/fpu/acoshf_sve.c       | 21 ++++----
 sysdeps/aarch64/fpu/asinhf_sve.c       | 17 +++---
 sysdeps/aarch64/fpu/atanhf_sve.c       | 14 +++--
 sysdeps/aarch64/fpu/log1pf_sve.c       | 68 +++---------------------
 sysdeps/aarch64/fpu/sv_log1pf_inline.h | 97 +++++++++++++++++++++-------------
 5 files changed, 95 insertions(+), 122 deletions(-)

commit 1be39d1d92e478fb264fa023745023149f7526db
Author:     Yat Long Poon <yatlong.poon@arm.com>
AuthorDate: Fri Jan 3 19:07:30 2025 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:38:29 2025 +0100

    AArch64: Improve codegen for SVE logs
    
    Reduce memory access by using lanewise MLA and moving constants to struct
    and reduce number of MOVPRFXs.
    Update maximum ULP error for double log_sve from 1 to 2.
    Speedup on Neoverse V1 for log (3%), log2 (5%), and log10 (4%).
    
    (cherry picked from commit 32d193a372feb28f9da247bb7283d404b84429c6)
    (cherry picked from commit ab5ba6c188159bb5e12be95cd90458924c2fe592)

 sysdeps/aarch64/fpu/log10_sve.c | 47 +++++++++++++++++++++-------
 sysdeps/aarch64/fpu/log2_sve.c  | 43 +++++++++++++++++++------
 sysdeps/aarch64/fpu/log_sve.c   | 69 ++++++++++++++++++++++++++---------------
 sysdeps/aarch64/libm-test-ulps  |  2 +-
 4 files changed, 114 insertions(+), 47 deletions(-)

commit 47c6bd3a81c2410d928fca41d7456b12d0a603f6
Author:     Luna Lamb <luna.lamb@arm.com>
AuthorDate: Fri Jan 3 19:02:52 2025 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:38:14 2025 +0100

    AArch64: Improve codegen in SVE tans
    
    Improves memory access.
    Tan: MOVPRFX 7 -> 2, LD1RD 12 -> 5, move MOV away from return.
    Tanf: MOV 2 -> 1, MOVPRFX 6 -> 3, LD1RW 5 -> 4, move mov away from return.
    
    (cherry picked from commit aa6609feb20ebf8653db639dabe2a6afc77b02cc)
    (cherry picked from commit 5f45c0f91eae99b7d49f5c63b900441eb3491213)

 sysdeps/aarch64/fpu/tan_sve.c  | 91 ++++++++++++++++++++++++++++--------------
 sysdeps/aarch64/fpu/tanf_sve.c | 18 ++++-----
 2 files changed, 68 insertions(+), 41 deletions(-)

commit de3f519c6d7191f961350b741d10caa69ba3710d
Author:     Luna Lamb <luna.lamb@arm.com>
AuthorDate: Fri Jan 3 19:00:12 2025 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:37:58 2025 +0100

    AArch64: Improve codegen in AdvSIMD asinh
    
    Improves memory access and removes spills.
    Load the polynomial evaluation coefficients into 2 vectors and use lanewise
    MLAs.  Reduces MOVs 6->3 , LDR 11->5, STR/STP 2->0, ADRP 3->2.
    
    (cherry picked from commit 140b985e5a2071000122b3cb63ebfe88cf21dd29)
    (cherry picked from commit abfd20ebbd2883f2c6e5f16709f7b9781c3c8068)

 sysdeps/aarch64/fpu/asinh_advsimd.c | 174 ++++++++++++++++++++++++------------
 1 file changed, 119 insertions(+), 55 deletions(-)

commit df7a834c5ab0b2bfc57af8371d6568e11392d415
Author:     Joana Cruz <Joana.Cruz@arm.com>
AuthorDate: Tue Dec 17 14:50:33 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:37:40 2025 +0100

    AArch64: Improve codegen of AdvSIMD expf family
    
    Load the polynomial evaluation coefficients into 2 vectors and use lanewise MLAs.
    Also use intrinsics instead of native operations.
    expf: 3% improvement in throughput microbenchmark on Neoverse V1, exp2f: 5%,
    exp10f: 13%, coshf: 14%.
    
    Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
    (cherry picked from commit cff9648d0b50d19cdaf685f6767add040d4e1a8e)
    (cherry picked from commit bf2b60a56036c951a798845223a2e04cc48507e4)

 sysdeps/aarch64/fpu/coshf_advsimd.c  | 28 +++++++++++------
 sysdeps/aarch64/fpu/exp10f_advsimd.c | 60 +++++++++++++++++++-----------------
 sysdeps/aarch64/fpu/exp2f_advsimd.c  | 54 ++++++++++++++++----------------
 sysdeps/aarch64/fpu/expf_advsimd.c   | 54 ++++++++++++++++----------------
 sysdeps/aarch64/fpu/v_expf_inline.h  | 49 +++++++++++++----------------
 5 files changed, 127 insertions(+), 118 deletions(-)

commit 3d0a126ffae355f3e9c3e1261eee9a995632d4c6
Author:     Joana Cruz <Joana.Cruz@arm.com>
AuthorDate: Tue Dec 17 14:49:30 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:37:23 2025 +0100

    AArch64: Improve codegen of AdvSIMD atan(2)(f)
    
    Load the polynomial evaluation coefficients into 2 vectors and use lanewise MLAs.
    8% improvement in throughput microbenchmark on Neoverse V1.
    
    Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
    (cherry picked from commit 6914774b9d3460876d9ad4482782213ec01a752e)
    (cherry picked from commit 41dc9e7c2d80bc5e886950b8a7bd21f77c9793b3)

 sysdeps/aarch64/fpu/atan2_advsimd.c  | 110 +++++++++++++++++++++++++----------
 sysdeps/aarch64/fpu/atan2f_advsimd.c |  58 ++++++++++--------
 sysdeps/aarch64/fpu/atan_advsimd.c   |  60 ++++++++++++++-----
 3 files changed, 160 insertions(+), 68 deletions(-)

commit d6c44943512d75b5d373ffb449c085147d4e9c51
Author:     Joana Cruz <Joana.Cruz@arm.com>
AuthorDate: Tue Dec 17 14:47:31 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:37:05 2025 +0100

    AArch64: Improve codegen of AdvSIMD logf function family
    
    Load the polynomial evaluation coefficients into 2 vectors and use lanewise MLAs.
    8% improvement in throughput microbenchmark on Neoverse V1 for log2 and log,
    and 2% for log10.
    
    Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
    (cherry picked from commit d6e034f5b222a9ed1aeb5de0c0c7d0dda8b63da3)
    (cherry picked from commit 9170b921fa49d2ef37141506837baaae92c7d3f8)

 sysdeps/aarch64/fpu/log10f_advsimd.c | 29 ++++++++++++++++------
 sysdeps/aarch64/fpu/log2f_advsimd.c  | 29 ++++++++++++++++------
 sysdeps/aarch64/fpu/logf_advsimd.c   | 48 +++++++++++++++++-------------------
 3 files changed, 66 insertions(+), 40 deletions(-)

commit 21f7dd4c0a49d96417f91e32a2d10fbbe6596bcb
Author:     Pierre Blanchard <pierre.blanchard@arm.com>
AuthorDate: Mon Dec 9 15:55:39 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:36:46 2025 +0100

    AArch64: Improve codegen in users of ADVSIMD log1p helper
    
    Add inline helper for log1p and rearrange operations so MOV
    is not necessary in reduction or around the special-case handler.
    Reduce memory access by using more indexed MLAs in polynomial.
    Speedup on Neoverse V1 for log1p (3.5%), acosh (7.5%) and atanh (10%).
    
    (cherry picked from commit ca0c0d0f26fbf75b9cacc65122b457e8fdec40b8)
    (cherry picked from commit 2aed9796bfb17b257e63b12cefdb7ff60be09626)

 sysdeps/aarch64/fpu/acosh_advsimd.c  |   5 +-
 sysdeps/aarch64/fpu/atanh_advsimd.c  |  26 ++++++---
 sysdeps/aarch64/fpu/log1p_advsimd.c  | 105 ++++++-----------------------------
 sysdeps/aarch64/fpu/v_log1p_inline.h |  84 ++++++++++++++++++----------
 4 files changed, 93 insertions(+), 127 deletions(-)

commit 0a04ee21bf16295c04d2296f7694997b24def736
Author:     Pierre Blanchard <pierre.blanchard@arm.com>
AuthorDate: Mon Dec 9 15:54:34 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:36:32 2025 +0100

    AArch64: Improve codegen in AdvSIMD logs
    
    Remove spurious ADRP and a few MOVs.
    Reduce memory access by using more indexed MLAs in polynomial.
    Align notation so that algorithms are easier to compare.
    Speedup on Neoverse V1 for log10 (8%), log (8.5%), and log2 (10%).
    Update error threshold in AdvSIMD log (now matches SVE log).
    
    (cherry picked from commit 8eb5ad2ebc94cc5bedbac57c226c02ec254479c7)
    (cherry picked from commit ae04f63087415eba9060143608b03db693854bb7)

 sysdeps/aarch64/fpu/log10_advsimd.c | 79 +++++++++++++++++--------------
 sysdeps/aarch64/fpu/log2_advsimd.c  | 73 ++++++++++++++++------------
 sysdeps/aarch64/fpu/log_advsimd.c   | 94 ++++++++++++++++++++-----------------
 3 files changed, 140 insertions(+), 106 deletions(-)

commit 268dcdf4410eca2417059f4a6be50d97463d4ef0
Author:     Pierre Blanchard <pierre.blanchard@arm.com>
AuthorDate: Mon Dec 9 15:53:04 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:36:17 2025 +0100

    AArch64: Improve codegen in AdvSIMD pow
    
    Remove spurious ADRP. Improve memory access by shuffling constants and
    using more indexed MLAs.
    
    A few more optimisation with no impact on accuracy
    - force fmas contraction
    - switch from shift-aided rint to rint instruction
    
    Between 1 and 5% throughput improvement on Neoverse
    V1 depending on benchmark.
    
    (cherry picked from commit 569cfaaf4984ae70b23c61ee28a609b5aef93fea)
    (cherry picked from commit 4148940836eee07d1138da6f1805280eeb8217e3)

 sysdeps/aarch64/fpu/pow_advsimd.c | 115 ++++++++++++++++++++------------------
 1 file changed, 62 insertions(+), 53 deletions(-)

commit 2e970af05bc8d85e3097928d2e5f5ca953e625ff
Author:     Joe Ramsay <Joe.Ramsay@arm.com>
AuthorDate: Fri Nov 1 15:48:54 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:36:04 2025 +0100

    AArch64: Remove SVE erf and erfc tables
    
    By using a combination of mask-and-add instead of the shift-based
    index calculation the routines can share the same table as other
    variants with no performance degradation.
    
    The tables change name because of other changes in downstream AOR.
    
    Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
    (cherry picked from commit 2d82d781a539ce8e82178fc1fa2c99ae1884e7fe)
    (cherry picked from commit 76c923fe9d09befc8131205659d99cb9ac97460a)

 sysdeps/aarch64/fpu/Makefile         |    2 -
 sysdeps/aarch64/fpu/erf_advsimd.c    |    4 +-
 sysdeps/aarch64/fpu/erf_data.c       |    8 +-
 sysdeps/aarch64/fpu/erf_sve.c        |   10 +-
 sysdeps/aarch64/fpu/erfc_advsimd.c   |    4 +-
 sysdeps/aarch64/fpu/erfc_data.c      |    8 +-
 sysdeps/aarch64/fpu/erfc_sve.c       |    2 +-
 sysdeps/aarch64/fpu/erfcf_advsimd.c  |    8 +-
 sysdeps/aarch64/fpu/erfcf_data.c     |    8 +-
 sysdeps/aarch64/fpu/erfcf_sve.c      |    2 +-
 sysdeps/aarch64/fpu/erff_advsimd.c   |    8 +-
 sysdeps/aarch64/fpu/erff_data.c      |    8 +-
 sysdeps/aarch64/fpu/erff_sve.c       |   13 +-
 sysdeps/aarch64/fpu/sv_erf_data.c    | 1570 ----------------------------------
 sysdeps/aarch64/fpu/sv_erff_data.c   | 1058 -----------------------
 sysdeps/aarch64/fpu/vecmath_config.h |   28 +-
 16 files changed, 50 insertions(+), 2691 deletions(-)

commit 94dbda91bb1136c1b485c14eac8b4726aa8b5653
Author:     Joe Ramsay <Joe.Ramsay@arm.com>
AuthorDate: Mon Oct 28 14:58:35 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:35:48 2025 +0100

    AArch64: Small optimisation in AdvSIMD erf and erfc
    
    In both routines, reduce register pressure such that GCC 14 emits no
    spills for erf and fewer spills for erfc.  Also use more efficient
    comparison for the special-case in erf.
    
    Benchtests show erf improves by 6.4%, erfc by 1.0%.
    
    (cherry picked from commit 1cf29fbc5be23db775d1dfa6b332ded6e6554252)
    (cherry picked from commit 9ff7559b274eb0dbce2cbcf87284c1d30d47a2d6)

 sysdeps/aarch64/fpu/erf_advsimd.c  | 25 ++++++++++++++++---------
 sysdeps/aarch64/fpu/erfc_advsimd.c | 13 +++++++------
 2 files changed, 23 insertions(+), 15 deletions(-)

commit b353df1966827009a6b64ab1381486ff3110f8ba
Author:     Joe Ramsay <Joe.Ramsay@arm.com>
AuthorDate: Mon Sep 23 15:33:31 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:35:31 2025 +0100

    AArch64: Simplify rounding-multiply pattern in several AdvSIMD routines
    
    This operation can be simplified to use simpler multiply-round-convert
    sequence, which uses fewer instructions and constants.
    
    Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
    (cherry picked from commit 16a59571e4e9fd019d3fc23a2e7d73c1df8bb5cb)
    (cherry picked from commit 68f2eb20de698675ddc74068c2cd03fee29207df)

 sysdeps/aarch64/fpu/cos_advsimd.c  | 11 ++++-------
 sysdeps/aarch64/fpu/cosf_advsimd.c |  9 +++------
 sysdeps/aarch64/fpu/expf_advsimd.c | 10 ++++------
 sysdeps/aarch64/fpu/sin_advsimd.c  | 16 ++++++++--------
 sysdeps/aarch64/fpu/sinf_advsimd.c | 22 +++++++++++-----------
 5 files changed, 30 insertions(+), 38 deletions(-)

commit bba348ac64e5a39f270540d6cb6ee07e63363b4f
Author:     Joe Ramsay <Joe.Ramsay@arm.com>
AuthorDate: Mon Sep 23 15:32:53 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:35:15 2025 +0100

    AArch64: Improve codegen in users of ADVSIMD expm1f helper
    
    Rearrange operations so MOV is not necessary in reduction or around
    the special-case handler.  Reduce memory access by using more indexed
    MLAs in polynomial.
    
    Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
    (cherry picked from commit 7900ac490db32f6bccff812733f00280dde34e27)
    (cherry picked from commit a947a43b95bbea53ec50df058b42392fd5ea52b6)

 sysdeps/aarch64/fpu/expm1f_advsimd.c  | 62 +++++++----------------------------
 sysdeps/aarch64/fpu/sinhf_advsimd.c   | 23 +++++++------
 sysdeps/aarch64/fpu/tanhf_advsimd.c   | 21 ++++++++----
 sysdeps/aarch64/fpu/v_expm1f_inline.h | 43 ++++++++++++------------
 4 files changed, 58 insertions(+), 91 deletions(-)

commit 51ffbb48ee5d47823e917123c81cde5be31795b9
Author:     Joe Ramsay <Joe.Ramsay@arm.com>
AuthorDate: Mon Sep 23 15:32:14 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:34:58 2025 +0100

    AArch64: Improve codegen in users of AdvSIMD log1pf helper
    
    log1pf is quite register-intensive - use fewer registers for the
    polynomial, and make various changes to shorten dependency chains in
    parent routines.  There is now no spilling with GCC 14.  Accuracy moves
    around a little - comments adjusted accordingly but does not require
    regen-ulps.
    
    Use the helper in log1pf as well, instead of having separate
    implementations.  The more accurate polynomial means special-casing can
    be simplified, and the shorter dependency chain avoids the usual dance
    around v0, which is otherwise difficult.
    
    There is a small duplication of vectors containing 1.0f (or 0x3f800000) -
    GCC is not currently able to efficiently handle values which fit in FMOV
    but not MOVI, and are reinterpreted to integer.  There may be potential
    for more optimisation if this is fixed.
    
    Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
    (cherry picked from commit 5bc100bd4b7e00db3009ae93d25d303341545d23)
    (cherry picked from commit 520240173029fd03388ec01db9a5359291cbbd27)

 sysdeps/aarch64/fpu/acoshf_advsimd.c  |  34 +++++-----
 sysdeps/aarch64/fpu/asinhf_advsimd.c  |  33 ++++++----
 sysdeps/aarch64/fpu/atanhf_advsimd.c  |  26 +++++---
 sysdeps/aarch64/fpu/log1pf_advsimd.c  | 121 ++++++++++++----------------------
 sysdeps/aarch64/fpu/v_log1pf_inline.h |  71 +++++++++++++-------
 5 files changed, 146 insertions(+), 139 deletions(-)

commit 8d2e122081030c5a7d0d2d9c1abf0f687a8e7881
Author:     Joe Ramsay <Joe.Ramsay@arm.com>
AuthorDate: Mon Sep 23 15:30:20 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:34:41 2025 +0100

    AArch64: Improve codegen in SVE F32 logs
    
    Reduce MOVPRFXs by using unpredicated (non-destructive) instructions
    where possible.  Similar to the recent change to AdvSIMD F32 logs,
    adjust special-case arguments and bounds to allow for more optimal
    register usage.  For all 3 routines one MOVPRFX remains in the
    reduction, which cannot be avoided as immediate AND and ASR are both
    destructive.
    
    Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
    (cherry picked from commit a15b1394b5eba98ffe28a02a392b587e4fe13c0d)
    (cherry picked from commit c4373426e3a85ec483a0f412c2a7c6cdfa32ccdb)

 sysdeps/aarch64/fpu/log10f_sve.c | 41 +++++++++++++++++++++++-----------------
 sysdeps/aarch64/fpu/log2f_sve.c  | 37 +++++++++++++++++++++---------------
 sysdeps/aarch64/fpu/logf_sve.c   | 38 ++++++++++++++++++++++---------------
 3 files changed, 69 insertions(+), 47 deletions(-)

commit 46897730707358f597bc2e55b21cccaf3351abf0
Author:     Joe Ramsay <Joe.Ramsay@arm.com>
AuthorDate: Mon Sep 23 15:26:12 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:34:24 2025 +0100

    AArch64: Improve codegen in SVE expf & related routines
    
    Reduce MOV and MOVPRFX by improving special-case handling.  Use inline
    helper to duplicate the entire computation between the special- and
    non-special case branches, removing the contention for z0 between x
    and the return value.
    
    Also rearrange some MLAs and MLSs - by making the multiplicand the
    destination we can avoid a MOVPRFX in several cases.  Also change which
    constants go in the vector used for lanewise ops - the last lane is no
    longer wasted.
    
    Spotted that shift was incorrect in exp2f and exp10f, w.r.t. to the
    comment that explains it.  Fixed - worst-case ULP for exp2f moves
    around but it doesn't change significantly for either routine.
    
    Worst-case error for coshf increases due to passing x to exp rather
    than abs(x) - updated the comment, but does not require regen-ulps.
    
    Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
    (cherry picked from commit 7b8c134b5460ed933d610fa92ed1227372b68fdc)
    (cherry picked from commit 354aeaf2130c1484007025563fe87c997f07324a)

 sysdeps/aarch64/fpu/coshf_sve.c      | 35 ++++++++-------
 sysdeps/aarch64/fpu/exp10f_sve.c     | 83 ++++++++++++++++++++----------------
 sysdeps/aarch64/fpu/exp2f_sve.c      | 70 +++++++++++++++++-------------
 sysdeps/aarch64/fpu/expf_sve.c       | 62 ++++++---------------------
 sysdeps/aarch64/fpu/sv_expf_inline.h | 34 +++++++--------
 5 files changed, 136 insertions(+), 148 deletions(-)

commit 350bd22f141c4617ed13f3fb9253af4d29dce64a
Author:     Joe Ramsay <Joe.Ramsay@arm.com>
AuthorDate: Thu Sep 19 17:34:02 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:34:04 2025 +0100

    AArch64: Add vector logp1 alias for log1p
    
    This enables vectorisation of C23 logp1, which is an alias for log1p.
    There are no new tests or ulp entries because the new symbols are simply
    aliases.
    
    Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
    (cherry picked from commit 751a5502bea1d13551c62c47bb9bd25bff870cda)
    (cherry picked from commit a991a0fc7c051d7ef2ea7778e0a699f22d4e53d7)

 bits/libm-simd-decl-stubs.h                     | 11 +++++++++++
 math/bits/mathcalls.h                           |  2 +-
 sysdeps/aarch64/fpu/Versions                    |  7 +++++++
 sysdeps/aarch64/fpu/advsimd_f32_protos.h        |  1 +
 sysdeps/aarch64/fpu/bits/math-vector.h          |  8 ++++++++
 sysdeps/aarch64/fpu/log1p_advsimd.c             |  2 ++
 sysdeps/aarch64/fpu/log1p_sve.c                 |  2 ++
 sysdeps/aarch64/fpu/log1pf_advsimd.c            |  3 +++
 sysdeps/aarch64/fpu/log1pf_sve.c                |  2 ++
 sysdeps/unix/sysv/linux/aarch64/libmvec.abilist |  5 +++++
 10 files changed, 42 insertions(+), 1 deletion(-)

commit 80a11bfe5f47906af0463edeeed7d5f904409cda
Author:     Joe Ramsay <Joe.Ramsay@arm.com>
AuthorDate: Mon Sep 9 13:00:01 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:33:48 2025 +0100

    aarch64: Avoid redundant MOVs in AdvSIMD F32 logs
    
    Since the last operation is destructive, the first argument to the FMA
    also has to be the first argument to the special-case in order to
    avoid unnecessary MOVs. Reorder arguments and adjust special-case
    bounds to facilitate this.
    
    Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
    (cherry picked from commit 8b09af572b208bfde4d31c6abbae047dcc217675)
    (cherry picked from commit ff10623706ea0096f3af7b38a3330ffb7fb15ae7)

 sysdeps/aarch64/fpu/log10f_advsimd.c | 38 +++++++++++++++++++++------------
 sysdeps/aarch64/fpu/log2f_advsimd.c  | 38 +++++++++++++++++++++------------
 sysdeps/aarch64/fpu/logf_advsimd.c   | 41 +++++++++++++++++++++---------------
 3 files changed, 72 insertions(+), 45 deletions(-)

commit ce111dcf623dc2dc18928036b0886eaef9d15de0
Author:     John David Anglin <danglin@gcc.gnu.org>
AuthorDate: Tue Feb 25 15:57:53 2025 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:33:29 2025 +0100

    math: Add optimization barrier to ensure a1 + u.d is not reused [BZ #30664]
    
    A number of fma tests started to fail on hppa when gcc was changed to
    use Ranger rather than EVRP.  Eventually I found that the value of
    a1 + u.d in this is block of code was being computed in FE_TOWARDZERO
    mode and not the original rounding mode:
    
        if (TININESS_AFTER_ROUNDING)
          {
            w.d = a1 + u.d;
            if (w.ieee.exponent == 109)
              return w.d * 0x1p-108;
          }
    
    This caused the exponent value to be wrong and the wrong return path
    to be used.
    
    Here we add an optimization barrier after the rounding mode is reset
    to ensure that the previous value of a1 + u.d is not reused.
    
    Signed-off-by: John David Anglin <dave.anglin@bell.net>
    (cherry picked from commit 523f85558152a1b9cced6d669f758c27677775ba)

 sysdeps/ieee754/dbl-64/s_fma.c | 3 +++
 1 file changed, 3 insertions(+)

commit 07cd96d110d7b811a5eb5f7fbe9749328aa8e38d
Author:     Siddhesh Poyarekar <siddhesh@sourceware.org>
AuthorDate: Fri Jan 31 12:16:30 2025 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:33:09 2025 +0100

    assert: Add test for CVE-2025-0395
    
    Use the __progname symbol to override the program name to induce the
    failure that CVE-2025-0395 describes.
    
    This is related to BZ #32582
    
    Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit cdb9ba84191ce72e86346fb8b1d906e7cd930ea2)
    (cherry picked from commit d6c156c326999f144cb5b73d29982108d549ad8a)

 assert/Makefile                  |  1 +
 assert/tst-assert-sa-2025-0001.c | 92 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 93 insertions(+)

commit 3492b668c0e0bd08707cbe6763d60560209c4bd0
Author:     John David Anglin <danglin@gcc.gnu.org>
AuthorDate: Wed Jan 29 16:51:16 2025 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:32:49 2025 +0100

    nptl: Correct stack size attribute when stack grows up [BZ #32574]
    
    Set stack size attribute to the size of the mmap'd region only
    when the size of the remaining stack space is less than the size
    of the mmap'd region.
    
    This was reversed.  As a result, the initial stack size was only
    135168 bytes.  On architectures where the stack grows down, the
    initial stack size is approximately 8384512 bytes with the default
    rlimit settings.  The small main stack size on hppa broke
    applications like ruby that check for stack overflows.
    
    Signed-off-by: John David Anglin <dave.anglin@bell.net>
    (cherry picked from commit e899ca3651f8c5e01bf3420cfb34aad97d093f74)

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

commit 618075f301a638eafc226a72bb68f06821fd8925
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Fri Jan 24 18:53:13 2025 +0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:32:31 2025 +0100

    stdlib: Test using setenv with updated environ [BZ #32588]
    
    Add a test for setenv with updated environ.  Verify that BZ #32588 is
    fixed.
    
    Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
    Reviewed-by: Florian Weimer <fweimer@redhat.com>
    (cherry picked from commit 8ab34497de14e35aff09b607222fe1309ef156da)
    (cherry picked from commit 85668221974db44459527e04d04f77ca8f8e3115)

 stdlib/Makefile             |  1 +
 stdlib/tst-setenv-environ.c | 36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 37 insertions(+)

commit ec2faeda696aacfc2615c26140403a5d07d3efaa
Author:     Sam James <sam@gentoo.org>
AuthorDate: Fri Jan 10 03:03:47 2025 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:32:13 2025 +0100

    malloc: obscure calloc use in tst-calloc
    
    Similar to a9944a52c967ce76a5894c30d0274b824df43c7a and
    f9493a15ea9cfb63a815c00c23142369ec09d8ce, we need to hide calloc use from
    the compiler to accommodate GCC's r15-6566-g804e9d55d9e54c change.
    
    First, include tst-malloc-aux.h, but then use `volatile` variables
    for size.
    
    The test passes without the tst-malloc-aux.h change but IMO we want
    it there for consistency and to avoid future problems (possibly silent).
    
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    (cherry picked from commit c3d1dac96bdd10250aa37bb367d5ef8334a093a1)
    (cherry picked from commit be48b8f6ad0ec6d0d6b1d2f45eb59bf8e8c67dd7)

 malloc/tst-calloc.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

commit 54c3922410a13a0ea6a79d65d7074b430b7946ec
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Tue Dec 17 18:41:45 2024 +0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Mar 16 12:31:50 2025 +0100

    Hide all malloc functions from compiler [BZ #32366]
    
    Since -1 isn't a power of two, compiler may reject it, hide memalign from
    Clang 19 which issues an error:
    
    tst-memalign.c:86:31: error: requested alignment is not a power of 2 [-Werror,-Wnon-power-of-two-alignment]
       86 |   p = memalign (-1, pagesize);
          |                 ^~
    tst-memalign.c:86:31: error: requested alignment must be 4294967296 bytes or smaller; maximum alignment assumed [-Werror,-Wbuiltin-assume-aligned-alignment]
       86 |   p = memalign (-1, pagesize);
          |                 ^~
    
    Update tst-malloc-aux.h to hide all malloc functions and include it in
    all malloc tests to prevent compiler from optimizing out any malloc
    functions.
    
    Tested with Clang 19.1.5 and GCC 15 20241206 for BZ #32366.
    
    Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
    Reviewed-by: Sam James <sam@gentoo.org>
    (cherry picked from commit f9493a15ea9cfb63a815c00c23142369ec09d8ce)
    (cherry picked from commit aef8f8d6a947b290162393e1d717c7aee96fef8e)

 malloc/tst-mallinfo2.c        |  2 ++
 malloc/tst-malloc-aux.h       | 25 ++++++++++++++++++++-----
 malloc/tst-malloc-backtrace.c |  2 ++
 malloc/tst-memalign.c         |  2 ++
 malloc/tst-safe-linking.c     |  2 ++
 malloc/tst-valloc.c           |  2 ++
 6 files changed, 30 insertions(+), 5 deletions(-)

commit f37769b87745743434cff32ee3f8cdfb84104afb (tag: gentoo/glibc-2.40-8, gentoo/gentoo/2.40)
Author:     Siddhesh Poyarekar <siddhesh@sourceware.org>
AuthorDate: Tue Jan 21 16:11:06 2025 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Jan 22 23:31:35 2025 +0100

    Fix underallocation of abort_msg_s struct (CVE-2025-0395)
    
    Include the space needed to store the length of the message itself, in
    addition to the message string.  This resolves BZ #32582.
    
    Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    Reviewed: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit 68ee0f704cb81e9ad0a78c644a83e1e9cd2ee578)
    (cherry picked from commit 7d4b6bcae91f29d7b4daf15bab06b66cf1d2217c)

 assert/assert.c            | 4 +++-
 sysdeps/posix/libc_fatal.c | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

commit d6df843ecaae3522542e3448b9dbd6367e3d7f18
Author:     Andreas Schwab <schwab@suse.de>
AuthorDate: Wed Sep 25 11:49:30 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Jan 22 23:31:12 2025 +0100

    Fix missing randomness in __gen_tempname (bug 32214)
    
    Make sure to update the random value also if getrandom fails.
    
    Fixes: 686d542025 ("posix: Sync tempname with gnulib")
    (cherry picked from commit 5f62cf88c4530c11904482775b7582bd7f6d80d2)
    
    (cherry picked from commit 473597d8167f86afee3544215db108b170ec13c0)

 NEWS                     | 1 +
 sysdeps/posix/tempname.c | 2 ++
 2 files changed, 3 insertions(+)

commit e4ef305fc40cc5bbb01f5759bda81df85ccb653d
Author:     John David Anglin <danglin@gcc.gnu.org>
AuthorDate: Sun Dec 22 09:58:02 2024 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Jan 11 23:48:49 2025 +0100

    hppa: Simplify handling of sanity check errors in clone.S.
    
    This simplifies the handling of sanity check errors in clone.S.
    Adjusted a couple of comments to reflect current code.
    
    Signed-off-by: John David Anglin <dave.anglin@bell.net>
    (cherry picked from commit 7648e3c8e80b3f1b3b43506b2fbe370e4824ab97)

 sysdeps/unix/sysv/linux/hppa/clone.S | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

commit aea26c8570dba8db9e01a672fd698f05a748983c
Author:     John David Anglin <danglin@gcc.gnu.org>
AuthorDate: Thu Dec 19 11:30:09 2024 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Jan 11 23:48:33 2025 +0100

    hppa: Fix strace detach-vfork test
    
    This change implements vfork.S for direct support of the vfork
    syscall.  clone.S is revised to correct child support for the
    vfork case.
    
    The main bug was creating a frame prior to the clone syscall.
    This was done to allow the rp and r4 registers to be saved and
    restored from the stack frame.  r4 was used to save and restore
    the PIC register, r19, across the system call and the call to
    set errno.  But in the vfork case, it is undefined behavior
    for the child to return from the function in which vfork was
    called.  It is surprising that this usually worked.
    
    Syscalls on hppa save and restore rp and r19, so we don't need
    to create a frame prior to the clone syscall.  We only need a
    frame when __syscall_error is called.  We also don't need to
    save and restore r19 around the call to $$dyncall as r19 is not
    used in the code after $$dyncall.
    
    This considerably simplifies clone.S.
    
    Signed-off-by: John David Anglin <dave.anglin@bell.net>
    (cherry picked from commit 9fbfbd924f718663d5303858f34d1f857c375093)

 sysdeps/unix/sysv/linux/hppa/clone.S | 58 +++++++-----------------------------
 sysdeps/unix/sysv/linux/hppa/vfork.S | 53 ++++++++++++++++++++++++++++++++
 2 files changed, 64 insertions(+), 47 deletions(-)

commit 098aaa8d6b3568c63db413471439d0371ef3f5e4
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Tue Dec 17 18:12:03 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Jan 11 23:48:03 2025 +0100

    x86: Avoid integer truncation with large cache sizes (bug 32470)
    
    Some hypervisors report 1 TiB L3 cache size.  This results
    in some variables incorrectly getting zeroed, causing crashes
    in memcpy/memmove because invariants are violated.
    
    (cherry picked from commit 61c3450db96dce96ad2b24b4f0b548e6a46d68e5)
    (cherry picked from commit 94e4a8c7d68129075f1b494a0b26151a4f989b36)

 NEWS                       | 1 +
 sysdeps/x86/dl-cacheinfo.h | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

commit 4c028395a15a2e10233cae8001f8d208bd8c1df6
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Fri Oct 18 08:48:22 2024 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Jan 11 23:47:26 2025 +0100

    linux: Fix tst-syscall-restart.c on old gcc (BZ 32283)
    
    To avoid a parameter name omitted error.
    
    (cherry picked from commit ab564362d0470d10947c24155ec048c4e14a009d)
    (cherry picked from commit 0b39fe801208e805cc911f64a2fdd25d04b7151e)

 sysdeps/unix/sysv/linux/tst-syscall-restart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 70258d61105bab86c32846bc074114c7469a71a2
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Thu Dec 5 08:39:44 2024 +0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Jan 11 23:47:08 2025 +0100

    math: Exclude internal math symbols for tests [BZ #32414]
    
    Since internal tests don't have access to internal symbols in libm,
    exclude them for internal tests.  Also make tst-strtod5 and tst-strtod5i
    depend on $(libm) to support older versions of GCC which can't inline
    copysign family functions.  This fixes BZ #32414.
    
    Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
    Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com>
    (cherry picked from commit 5df09b444835fca6e64b3d4b4a5beb19b3b2ba21)
    (cherry picked from commit 9af64ca64c532b7e42a40b48fe5e01726a9b7943)

 include/math.h  | 5 ++++-
 stdlib/Makefile | 2 ++
 2 files changed, 6 insertions(+), 1 deletion(-)

commit 199b0f224764b60788e88f42e00aa197f0539cb9
Author:     Sam James <sam@gentoo.org>
AuthorDate: Mon Dec 9 23:11:25 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Jan 11 23:45:28 2025 +0100

    malloc: add indirection for malloc(-like) functions in tests [BZ #32366]
    
    GCC 15 introduces allocation dead code removal (DCE) for PR117370 in
    r15-5255-g7828dc070510f8. This breaks various glibc tests which want
    to assert various properties of the allocator without doing anything
    obviously useful with the allocated memory.
    
    Alexander Monakov rightly pointed out that we can and should do better
    than passing -fno-malloc-dce to paper over the problem. Not least because
    GCC 14 already does such DCE where there's no testing of malloc's return
    value against NULL, and LLVM has such optimisations too.
    
    Handle this by providing malloc (and friends) wrappers with a volatile
    function pointer to obscure that we're calling malloc (et. al) from the
    compiler.
    
    Reviewed-by: Paul Eggert <eggert@cs.ucla.edu>
    (cherry picked from commit a9944a52c967ce76a5894c30d0274b824df43c7a)
    (cherry picked from commit c6cdab1e01bc11bc4036dc5b1be6086f6259c123)

 malloc/tst-aligned-alloc.c    |  2 ++
 malloc/tst-compathooks-off.c  |  2 ++
 malloc/tst-malloc-aux.h       | 41 +++++++++++++++++++++++++++++++++++++++++
 malloc/tst-malloc-check.c     |  2 ++
 malloc/tst-malloc-too-large.c |  1 +
 malloc/tst-malloc.c           |  2 ++
 malloc/tst-realloc.c          |  2 ++
 support/support.h             |  2 +-
 test-skeleton.c               |  1 -
 9 files changed, 53 insertions(+), 2 deletions(-)

commit 2d6ede43d6eb371c8f4a2e41d5427d919fff1db3
Author:     Michael Jeanson <mjeanson@efficios.com>
AuthorDate: Wed Nov 20 14:15:42 2024 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Jan 11 23:45:05 2025 +0100

    nptl: initialize cpu_id_start prior to rseq registration
    
    When adding explicit initialization of rseq fields prior to
    registration, I glossed over the fact that 'cpu_id_start' is also
    documented as initialized by user-space.
    
    While current kernels don't validate the content of this field on
    registration, future ones could.
    
    Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
    Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
    (cherry picked from commit d9f40387d3305d97e30a8cf8724218c42a63680a)
    (cherry picked from commit 091dd12831792cef16eee24fe240c73a25b47a1d)

 sysdeps/unix/sysv/linux/rseq-internal.h | 1 +
 1 file changed, 1 insertion(+)

commit 38d45c44c59032e2e72804a6e2fa8b7066fd37ea
Author:     Michael Jeanson <mjeanson@efficios.com>
AuthorDate: Thu Nov 7 22:23:49 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Jan 11 23:44:47 2025 +0100

    nptl: initialize rseq area prior to registration
    
    Per the rseq syscall documentation, 3 fields are required to be
    initialized by userspace prior to registration, they are 'cpu_id',
    'rseq_cs' and 'flags'. Since we have no guarantee that 'struct pthread'
    is cleared on all architectures, explicitly set those 3 fields prior to
    registration.
    
    Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
    Reviewed-by: Florian Weimer <fweimer@redhat.com>
    (cherry picked from commit 97f60abd25628425971f07e9b0e7f8eec0741235)
    (cherry picked from commit 9b9545ba27613fa41efdfa7965b6fc580bf1b919)

 nptl/descr.h                            |  2 ++
 sysdeps/unix/sysv/linux/rseq-internal.h | 10 ++++++++++
 2 files changed, 12 insertions(+)

commit bcb521bd5f84f0396e0fe275a3e4e7f75e3f821f (tag: gentoo/glibc-2.40-7)
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: Fri Dec 6 16:23:29 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Dec 6 16:24:21 2024 +0100

    Revert "linux: Add support for getrandom vDSO"
    
    We have reports about lots of crashes in non-source applications. Blargh.
    This reverts commit 42dceceb33dd6a25e6dd84001a74038213b51283.

 NEWS                                         |   6 -
 elf/libc_early_init.c                        |   3 -
 malloc/malloc.c                              |   4 +-
 nptl/allocatestack.c                         |   2 -
 nptl/descr.h                                 |   3 -
 nptl/pthread_create.c                        |   5 -
 stdlib/Makefile                              |   4 -
 stdlib/tst-getrandom2.c                      |  47 -----
 sysdeps/generic/getrandom-internal.h         |  26 ---
 sysdeps/generic/not-cancel.h                 |   4 +-
 sysdeps/mach/hurd/not-cancel.h               |   4 +-
 sysdeps/nptl/_Fork.c                         |   2 -
 sysdeps/nptl/fork.h                          |  12 --
 sysdeps/unix/sysv/linux/aarch64/sysdep.h     |   1 -
 sysdeps/unix/sysv/linux/dl-vdso-setup.c      |   5 -
 sysdeps/unix/sysv/linux/dl-vdso-setup.h      |   3 -
 sysdeps/unix/sysv/linux/getrandom-internal.h |  29 ---
 sysdeps/unix/sysv/linux/getrandom.c          | 304 +--------------------------
 sysdeps/unix/sysv/linux/loongarch/sysdep.h   |   1 -
 sysdeps/unix/sysv/linux/not-cancel.h         |   7 +-
 sysdeps/unix/sysv/linux/powerpc/sysdep.h     |   1 -
 sysdeps/unix/sysv/linux/s390/sysdep.h        |   1 -
 sysdeps/unix/sysv/linux/x86_64/sysdep.h      |   1 -
 23 files changed, 7 insertions(+), 468 deletions(-)

commit 744a774ec9f01b9fa26d04c1b1e26b6bdcb6f1c1 (tag: gentoo/glibc-2.40-6)
Author:     Aurelien Jarno <aurelien@aurel32.net>
AuthorDate: Sun Nov 10 10:50:34 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Dec 4 23:02:38 2024 +0100

    elf: handle addition overflow in _dl_find_object_update_1 [BZ #32245]
    
    The remaining_to_add variable can be 0 if (current_used + count) wraps,
    This is caught by GCC 14+ on hppa, which determines from there that
    target_seg could be be NULL when remaining_to_add is zero, which in
    turns causes a -Wstringop-overflow warning:
    
     In file included from ../include/atomic.h:49,
                      from dl-find_object.c:20:
     In function '_dlfo_update_init_seg',
         inlined from '_dl_find_object_update_1' at dl-find_object.c:689:30,
         inlined from '_dl_find_object_update' at dl-find_object.c:805:13:
     ../sysdeps/unix/sysv/linux/hppa/atomic-machine.h:44:4: error: '__atomic_store_4' writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
        44 |    __atomic_store_n ((mem), (val), __ATOMIC_RELAXED);                        \
           |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     dl-find_object.c:644:3: note: in expansion of macro 'atomic_store_relaxed'
       644 |   atomic_store_relaxed (&seg->size, new_seg_size);
           |   ^~~~~~~~~~~~~~~~~~~~
     In function '_dl_find_object_update':
     cc1: note: destination object is likely at address zero
    
    In practice, this is not possible as it represent counts of link maps.
    Link maps have sizes larger than 1 byte, so the sum of any two link map
    counts will always fit within a size_t without wrapping around.
    
    This patch therefore adds a check on remaining_to_add == 0 and tell GCC
    that this can not happen using __builtin_unreachable.
    
    Thanks to Andreas Schwab for the investigation.
    
    Closes: BZ #32245
    Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
    Tested-by: John David Anglin <dave.anglin@bell.net>
    Reviewed-by: Florian Weimer <fweimer@redhat.com>
    (cherry picked from commit 6c915c73d08028987232f6dc718f218c61113240)
    (cherry picked from commit 626c048f32a979f77662bdcb1cca477c11d3f9c1)

 NEWS                 | 1 +
 elf/dl-find_object.c | 8 ++++++++
 2 files changed, 9 insertions(+)

commit 697cf525ce6c42b7449460f507c462a32fc5bff1
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Mon Sep 2 16:58:51 2024 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Dec 4 23:01:16 2024 +0100

    linux: sparc: Fix clone for LEON/sparcv8 (BZ 31394)
    
    The sparc clone mitigation (faeaa3bc9f76030) added the use of
    flushw, which is not support by LEON/sparcv8.  As discussed on
    the libc-alpha, 'ta 3' is a working alternative [1].
    
    [1] https://sourceware.org/pipermail/libc-alpha/2024-August/158905.html
    
    Checked with a build for sparcv8-linux-gnu targetting leon.
    
    Acked-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
    (cherry picked from commit 5e8cfc5d625e6dd000a0371d21d792836ea7951a)
    (cherry picked from commit efb710034e4c5e734d100cc4ef1b1e27d4315825)

 sysdeps/unix/sysv/linux/sparc/sparc32/clone.S | 4 ++++
 1 file changed, 4 insertions(+)

commit 79d68dbb59e04b54862477381570163cfb4acb68
Author:     Michael Karcher <Michael.Karcher@fu-berlin.de>
AuthorDate: Sun Jul 28 15:30:57 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Dec 4 23:00:43 2024 +0100

    Mitigation for "clone on sparc might fail with -EFAULT for no valid reason" (bz 31394)
    
    It seems the kernel can not deal with uncommitted stack space in the area intended
    for the register window when executing the clone() system call. So create a nested
    frame (proxy for the kernel frame) and flush it from the processor to memory to
    force committing pages to the stack before invoking the system call.
    
    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: Michael Karcher <sourceware-bugzilla@mkarcher.dialup.fu-berlin.de>
    Reviewed-by: DJ Delorie <dj@redhat.com>
    (cherry picked from commit faeaa3bc9f76030b9882ccfdee232fc0ca6dcb06)
    (cherry picked from commit 234458024300f0b4b430785999f33eddf059af6a)

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

commit 4c2cf259b23db88f37d76de01d48da00b03c3065
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Mon Oct 28 14:45:30 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Dec 4 23:00:04 2024 +0100

    elf: Change ldconfig auxcache magic number (bug 32231)
    
    In commit c628c2296392ed3bf2cb8d8470668e64fe53389f (elf: Remove
    ldconfig kernel version check), the layout of auxcache entries
    changed because the osversion field was removed from
    struct aux_cache_file_entry.  However, AUX_CACHEMAGIC was not
    changed, so existing files are still used, potentially leading
    to unintended ldconfig behavior.  This commit changes AUX_CACHEMAGIC,
    so that the file is regenerated.
    
    Reported-by: DJ Delorie <dj@redhat.com>
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit 0a536f6e2f76e3ef581b3fd9af1e5cf4ddc7a5a2)
    (cherry picked from commit 3a34851103d554b2c9b269ecae111648f9d7bb6d)

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

commit 40833e2570ea07f6ebe5e86f9462bfdc5f332609
Author:     Joseph Myers <josmyers@redhat.com>
AuthorDate: Fri Sep 20 23:25:32 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Dec 4 22:58:40 2024 +0100

    Make tst-strtod-underflow type-generic
    
    The test tst-strtod-underflow covers various edge cases close to the
    underflow threshold for strtod (especially cases where underflow on
    architectures with after-rounding tininess detection depends on the
    rounding mode).  Make it use the type-generic machinery, with
    corresponding test inputs for each supported floating-point format, so
    that other functions in the strtod family are tested for underflow
    edge cases as well.
    
    Tested for x86_64.
    
    (cherry picked from commit 94ca2c0894f0e1b62625c369cc598a2b9236622c)
    (cherry picked from commit 85e5850f2f4ea5f304be5356ecb7a15998766a4e)

 stdlib/tst-strtod-underflow.c | 357 +++++++++++++++++++++++++++++++++++-------
 1 file changed, 297 insertions(+), 60 deletions(-)

commit 42dceceb33dd6a25e6dd84001a74038213b51283
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Wed Sep 18 16:01:22 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Nov 13 20:30:03 2024 +0100

    linux: Add support for getrandom vDSO
    
    Linux 6.11 has getrandom() in vDSO. It operates on a thread-local opaque
    state allocated with mmap using flags specified by the vDSO.
    
    Multiple states are allocated at once, as many as fit into a page, and
    these are held in an array of available states to be doled out to each
    thread upon first use, and recycled when a thread terminates. As these
    states run low, more are allocated.
    
    To make this procedure async-signal-safe, a simple guard is used in the
    LSB of the opaque state address, falling back to the syscall if there's
    reentrancy contention.
    
    Also, _Fork() is handled by blocking signals on opaque state allocation
    (so _Fork() always sees a consistent state even if it interrupts a
    getrandom() call) and by iterating over the thread stack cache on
    reclaim_stack. Each opaque state will be in the free states list
    (grnd_alloc.states) or allocated to a running thread.
    
    The cancellation is handled by always using GRND_NONBLOCK flags while
    calling the vDSO, and falling back to the cancellable syscall if the
    kernel returns EAGAIN (would block). Since getrandom is not defined by
    POSIX and cancellation is supported as an extension, the cancellation is
    handled as 'may occur' instead of 'shall occur' [1], meaning that if
    vDSO does not block (the expected behavior) getrandom will not act as a
    cancellation entrypoint. It avoids a pthread_testcancel call on the fast
    path (different than 'shall occur' functions, like sem_wait()).
    
    It is currently enabled for x86_64, which is available in Linux 6.11,
    and aarch64, powerpc32, powerpc64, loongarch64, and s390x, which are
    available in Linux 6.12.
    
    Link: https://pubs.opengroup.org/onlinepubs/9799919799/nframe.html [1]
    Co-developed-by: Jason A. Donenfeld <Jason@zx2c4.com>
    Tested-by: Jason A. Donenfeld <Jason@zx2c4.com> # x86_64
    Tested-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> # x86_64, aarch64
    Tested-by: Xi Ruoyao <xry111@xry111.site> # x86_64, aarch64, loongarch64
    Tested-by: Stefan Liebler <stli@linux.ibm.com> # s390x
    (cherry picked from commit 461cab1de747f3842f27a5d24977d78d561d45f9)

 NEWS                                         |   6 +
 elf/libc_early_init.c                        |   3 +
 malloc/malloc.c                              |   4 +-
 nptl/allocatestack.c                         |   2 +
 nptl/descr.h                                 |   3 +
 nptl/pthread_create.c                        |   5 +
 stdlib/Makefile                              |   4 +
 stdlib/tst-getrandom2.c                      |  47 +++++
 sysdeps/generic/getrandom-internal.h         |  26 +++
 sysdeps/generic/not-cancel.h                 |   4 +-
 sysdeps/mach/hurd/not-cancel.h               |   4 +-
 sysdeps/nptl/_Fork.c                         |   2 +
 sysdeps/nptl/fork.h                          |  12 ++
 sysdeps/unix/sysv/linux/aarch64/sysdep.h     |   1 +
 sysdeps/unix/sysv/linux/dl-vdso-setup.c      |   5 +
 sysdeps/unix/sysv/linux/dl-vdso-setup.h      |   3 +
 sysdeps/unix/sysv/linux/getrandom-internal.h |  29 +++
 sysdeps/unix/sysv/linux/getrandom.c          | 304 ++++++++++++++++++++++++++-
 sysdeps/unix/sysv/linux/loongarch/sysdep.h   |   1 +
 sysdeps/unix/sysv/linux/not-cancel.h         |   7 +-
 sysdeps/unix/sysv/linux/powerpc/sysdep.h     |   1 +
 sysdeps/unix/sysv/linux/s390/sysdep.h        |   1 +
 sysdeps/unix/sysv/linux/x86_64/sysdep.h      |   1 +
 23 files changed, 468 insertions(+), 7 deletions(-)

commit 009f93ec103b4a6bd25452417b3cdebce9640f33
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Fri Sep 13 11:11:56 2024 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Oct 16 22:24:54 2024 +0200

    sparc: Fix restartable syscalls (BZ 32173)
    
    The commit 'sparc: Use Linux kABI for syscall return'
    (86c5d2cf0ce046279baddc7faa27da71f1a89fde) did not take into account
    a subtle sparc syscall kABI constraint.  For syscalls that might block
    indefinitely, on an interrupt (like SIGCONT) the kernel will set the
    instruction pointer to just before the syscall:
    
    arch/sparc/kernel/signal_64.c
    476 static void do_signal(struct pt_regs *regs, unsigned long orig_i0)
    477 {
    [...]
    525                 if (restart_syscall) {
    526                         switch (regs->u_regs[UREG_I0]) {
    527                         case ERESTARTNOHAND:
    528                         case ERESTARTSYS:
    529                         case ERESTARTNOINTR:
    530                                 /* replay the system call when we are done */
    531                                 regs->u_regs[UREG_I0] = orig_i0;
    532                                 regs->tpc -= 4;
    533                                 regs->tnpc -= 4;
    534                                 pt_regs_clear_syscall(regs);
    535                                 fallthrough;
    536                         case ERESTART_RESTARTBLOCK:
    537                                 regs->u_regs[UREG_G1] = __NR_restart_syscall;
    538                                 regs->tpc -= 4;
    539                                 regs->tnpc -= 4;
    540                                 pt_regs_clear_syscall(regs);
    541                         }
    
    However, on a SIGCONT it seems that 'g1' register is being clobbered after the
    syscall returns.  Before 86c5d2cf0ce046279, the 'g1' was always placed jus
    before the 'ta' instruction which then reloads the syscall number and restarts
    the syscall.
    
    On master, where 'g1' might be placed before 'ta':
    
      $ cat test.c
      #include <unistd.h>
    
      int main ()
      {
        pause ();
      }
      $ gcc test.c -o test
      $ strace -f ./t
      [...]
      ppoll(NULL, 0, NULL, NULL, 0
    
    On another terminal
    
      $ kill -STOP 2262828
    
      $ strace -f ./t
      [...]
      --- SIGSTOP {si_signo=SIGSTOP, si_code=SI_USER, si_pid=2521813, si_uid=8289} ---
      --- stopped by SIGSTOP ---
    
    And then
    
      $ kill -CONT 2262828
    
    Results in:
    
      --- SIGCONT {si_signo=SIGCONT, si_code=SI_USER, si_pid=2521813, si_uid=8289} ---
      restart_syscall(<... resuming interrupted ppoll ...>) = -1 EINTR (Interrupted system call)
    
    Where the expected behaviour would be:
    
      $ strace -f ./t
      [...]
      ppoll(NULL, 0, NULL, NULL, 0)           = ? ERESTARTNOHAND (To be restarted if no handler)
      --- SIGSTOP {si_signo=SIGSTOP, si_code=SI_USER, si_pid=2521813, si_uid=8289} ---
      --- stopped by SIGSTOP ---
      --- SIGCONT {si_signo=SIGCONT, si_code=SI_USER, si_pid=2521813, si_uid=8289} ---
      ppoll(NULL, 0, NULL, NULL, 0
    
    Just moving the 'g1' setting near the syscall asm is not suffice,
    the compiler might optimize it away (as I saw on cancellation.c by
    trying this fix).  Instead, I have change the inline asm to put the
    'g1' setup in ithe asm block.  This would require to change the asm
    constraint for INTERNAL_SYSCALL_NCS, since the syscall number is not
    constant.
    
    Checked on sparc64-linux-gnu.
    
    Reported-by: René Rebe <rene@exactcode.de>
    Tested-by: Sam James <sam@gentoo.org>
    Reviewed-by: Sam James <sam@gentoo.org>
    (cherry picked from commit 2c1903cbbac0022153a67776f474c221250ad6ed)
    (cherry picked from commit 1cd7e13289b91e1495a1865c1f678196d1bb7be4)

 sysdeps/unix/sysv/linux/Makefile               |   1 +
 sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h |   3 +-
 sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h |   3 +-
 sysdeps/unix/sysv/linux/sparc/sysdep.h         |  74 +++++++++-------
 sysdeps/unix/sysv/linux/tst-syscall-restart.c  | 112 +++++++++++++++++++++++++
 5 files changed, 161 insertions(+), 32 deletions(-)

commit c35c50fae01105a00c2d3a3a09edc49a68b8ab13
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Fri Sep 13 11:10:05 2024 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Oct 16 22:24:24 2024 +0200

    support: Make support_process_state_wait return the found state
    
    So caller can check which state was found if multiple ones are
    asked.
    
    Checked on x86_64-linux-gnu.
    
    Reviewed-by: Florian Weimer <fweimer@redhat.com>
    (cherry picked from commit 38316352e0f742f3a2b5816a61a4b603cb5573f8)
    (cherry picked from commit 2e38c5a090b3a54040b6e508d42e5a76e492c6e8)

 support/process_state.h             |  7 +++++--
 support/support_process_state.c     |  6 ++++--
 support/tst-support-process_state.c | 19 +++++++++++++++----
 3 files changed, 24 insertions(+), 8 deletions(-)

commit 6d6b908b56040ae81e9891b21cd72d914abe95cb (tag: gentoo/glibc-2.40-5)
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Sat Sep 7 08:32:32 2024 -0700
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue Oct 8 22:47:03 2024 +0200

    libio: Set _vtable_offset before calling _IO_link_in [BZ #32148]
    
    Since _IO_vtable_offset is used to detect the old binaries, set it
    in _IO_old_file_init_internal before calling _IO_link_in which checks
    _IO_vtable_offset.  Add a glibc 2.0 test with copy relocation on
    _IO_stderr_@GLIBC_2.0 to verify that fopen won't cause memory corruption.
    This fixes BZ #32148.
    
    Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
    Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
    (cherry picked from commit 9dfea3de7f690bff70e3c6eb346b9ad082bb2e35)
    (cherry picked from commit 5c06c6e0b5078ffb0aa0c09bac79f086145e0897)

 libio/Makefile           |  7 ++++
 libio/oldfileops.c       |  4 ++-
 libio/tst-fopen-compat.c | 85 ++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 95 insertions(+), 1 deletion(-)

commit 7bb87201e69dc57015ef006d4fbe12a2f67ff9de
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Tue Sep 10 09:22:19 2024 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue Oct 8 17:31:07 2024 +0200

    Disable _TIME_BITS if the compiler defaults to it
    
    Even though building glibc with 64 bit time_t flags is not supported,
    and the usual way is to patch the build system to avoid it; some
    systems do enable it by default, and it increases the requirements
    to build glibc in such cases (it also does not help newcomers when
    trying to build glibc).
    
    The conform namespace and linknamespace tests also do not expect
    that flag to be set by default, so disable it as well.
    
    Checked with a build/check for major ABI and some (i386, arm,
    mipsel, hppa) with a toolchain that has LFS flags by default.
    Reviewed-by: DJ Delorie <dj@redhat.com>
    
    (cherry picked from commit 4d8965f1304a205f7580fe23bb2d462828d1f8e5)

 Makeconfig       |  3 +++
 configure        | 30 ++++++++++++++++++++++++++++++
 configure.ac     | 11 +++++++++++
 conform/Makefile |  2 +-
 4 files changed, 45 insertions(+), 1 deletion(-)

commit 838ba39617b868c575070dedbea753021892265f
Author:     Adhemerval Zanella <adhemerval.zanella@linaro.org>
AuthorDate: Tue Sep 10 09:22:18 2024 -0300
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue Oct 8 17:30:51 2024 +0200

    Disable _FILE_OFFSET_BITS if the compiler defaults to it
    
    Even though building glibc with LFS flags is not supported, and the
    the usual way is to patch the build system to avoid it [1]; some system
    do enable it by default, and it increases the requirements to build
    glibc in such cases (it also does not help newcomers when trying
    to build glibc).
    
    The conform namespace and linknamespace tests also do not expect
    that flag to be set by default, so disable it as well.
    
    Checked with a build/check for major ABI and some (i386, arm,
    mipsel, hppa) with a toolchain that has LFS flags by default.
    
    [1] https://sourceware.org/bugzilla/show_bug.cgi?id=31624
    Reviewed-by: DJ Delorie <dj@redhat.com>
    
    (cherry picked from commit 3f1932ed2e6b643848ea7a42f9f15ed80552befb)

 Makeconfig       |  3 +++
 configure        | 32 ++++++++++++++++++++++++++++++++
 configure.ac     | 13 +++++++++++++
 conform/Makefile |  2 +-
 4 files changed, 49 insertions(+), 1 deletion(-)

commit 13f300db1955bca5c2e9a4f90b6da80fcffffe86 (tag: gentoo/glibc-2.40-4)
Author:     Joseph Myers <josmyers@redhat.com>
AuthorDate: Fri Sep 20 23:24:45 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue Oct 1 17:41:22 2024 +0200

    Add tests of more strtod special cases
    
    There is very little test coverage of inputs to strtod-family
    functions that don't contain anything that can be parsed as a number
    (one test of ".y" in tst-strtod2), and none that I can see of skipping
    initial whitespace.  Add some tests of these things to tst-strtod2.
    
    Tested for x86_64.
    
    (cherry picked from commit 378039ca578c2ea93095a1e710d96f58c68a3997)
    (cherry picked from commit cc256952ecb07789c423dff9712eb7a38f80e963)

 stdlib/tst-strtod2.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

commit 22cf4433111f22fffdfcadf093813b5b533e2c26
Author:     Joseph Myers <josmyers@redhat.com>
AuthorDate: Fri Sep 20 23:24:02 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue Oct 1 17:41:05 2024 +0200

    Add more tests of strtod end pointer
    
    Although there are some tests in tst-strtod2 and tst-strtod3 for the
    end pointer provided by strtod when it doesn't parse the whole string,
    they aren't very thorough.  Add tests of more such cases to
    tst-strtod2.
    
    Tested for x86_64.
    
    (cherry picked from commit b5d3737b305525315e0c7c93ca49eadc868eabd5)
    (cherry picked from commit 8f40dfbe2ad8a4a2d2fc3bbe01d289037d113ced)

 stdlib/tst-strtod2.c | 41 +++++++++++++++++++++++++++++++++++++++--
 1 file changed, 39 insertions(+), 2 deletions(-)

commit 3a11e0d9b64fc869d6e7379c0754de661e2b6a96
Author:     Joseph Myers <josmyers@redhat.com>
AuthorDate: Fri Sep 20 23:23:13 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue Oct 1 17:40:48 2024 +0200

    Make tst-strtod2 and tst-strtod5 type-generic
    
    Some of the strtod tests use type-generic machinery in tst-strtod.h to
    test the strto* functions for all floating types, while others only
    test double even when the tests are in fact meaningful for all
    floating types.
    
    Convert tst-strtod2 and tst-strtod5 to use the type-generic machinery
    so they test all floating types.  I haven't tried to convert them to
    use newer test interfaces in other ways, just made the changes
    necessary to use the type-generic machinery.
    
    Tested for x86_64.
    
    (cherry picked from commit 8de031bcb9adfa736c0caed2c79d10947b8d8f48)
    (cherry picked from commit 4a9b6cdc88335e2a7291418563073a58fe97346e)

 stdlib/tst-strtod2.c |  84 ++++++++++++++++++++++---------------
 stdlib/tst-strtod5.c | 116 +++++++++++++++++++++++++++++----------------------
 2 files changed, 118 insertions(+), 82 deletions(-)

commit 5abd2245d125ae5e22217d3b4552e3ebcefb07de
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Thu Sep 5 21:18:23 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue Oct 1 17:40:29 2024 +0200

    powerpc64le: Build new strtod tests with long double ABI flags (bug 32145)
    
    This fixes several test failures:
    
    =====FAIL: stdlib/tst-strtod1i.out=====
    Locale tests
    all OK
    Locale tests
    all OK
    Locale tests
    strtold("1,5") returns -6,38643e+367 and not 1,5
    strtold("1.5") returns 1,5 and not 1
    strtold("1.500") returns 1 and not 1500
    strtold("36.893.488.147.419.103.232") returns 1500 and not 3,68935e+19
    Locale tests
    all OK
    
    =====FAIL: stdlib/tst-strtod3.out=====
    0: got wrong results -2.5937e+4826, expected 0
    
    =====FAIL: stdlib/tst-strtod4.out=====
    0: got wrong results -6,38643e+367, expected 0
    1: got wrong results 0, expected 1e+06
    2: got wrong results 1e+06, expected 10
    
    =====FAIL: stdlib/tst-strtod5i.out=====
    0: got wrong results -6,38643e+367, expected 0
    2: got wrong results 0, expected -0
    4: got wrong results -0, expected 0
    5: got wrong results 0, expected -0
    6: got wrong results -0, expected 0
    7: got wrong results 0, expected -0
    8: got wrong results -0, expected 0
    9: got wrong results 0, expected -0
    10: got wrong results -0, expected 0
    11: got wrong results 0, expected -0
    12: got wrong results -0, expected 0
    13: got wrong results 0, expected -0
    14: got wrong results -0, expected 0
    15: got wrong results 0, expected -0
    16: got wrong results -0, expected 0
    17: got wrong results 0, expected -0
    18: got wrong results -0, expected 0
    20: got wrong results 0, expected -0
    22: got wrong results -0, expected 0
    23: got wrong results 0, expected -0
    24: got wrong results -0, expected 0
    25: got wrong results 0, expected -0
    26: got wrong results -0, expected 0
    27: got wrong results 0, expected -0
    
    Fixes commit 3fc063dee01da4f80920a14b7db637c8501d6fd4
    ("Make __strtod_internal tests type-generic").
    
    Suggested-by: Joseph Myers <josmyers@redhat.com>
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    (cherry picked from commit cc3e743fc09ee6fca45767629df9cbcbe1feba82)
    (cherry picked from commit 5a10d05c39689dcf7ee694ec94cd2fd069c747ee)

 sysdeps/powerpc/powerpc64/le/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

commit b55e3916d43ec545cf5c7c8f39372ec1ed18314c
Author:     Joseph Myers <josmyers@redhat.com>
AuthorDate: Wed Sep 4 13:21:23 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue Oct 1 17:40:07 2024 +0200

    Do not set errno for overflowing NaN payload in strtod/nan (bug 32045)
    
    As reported in bug 32045, it's incorrect for strtod/nan functions to
    set errno based on overflowing payload (strtod should only set errno
    for overflow / underflow of its actual result, and potentially if
    nothing in the string can be parsed as a number at all; nan should be
    a pure function that never sets it).  Save and restore errno around
    the internal strtoull call and add associated test coverage.
    
    Tested for x86_64.
    
    (cherry picked from commit 64f62c47e9c350f353336f2df6714e1d48ec50d8)
    (cherry picked from commit c4cc72d2efc741872d65ae1fd77572e47042d179)

 math/Makefile            |  1 +
 math/test-nan-payload.c  | 53 ++++++++++++++++++++++++++++++++++++++++++++++++
 stdlib/strtod_nan_main.c |  3 +++
 3 files changed, 57 insertions(+)

commit 7072204c71fd3676117f9decba7900eaf4c7b212
Author:     Joseph Myers <josmyers@redhat.com>
AuthorDate: Wed Sep 4 13:20:18 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue Oct 1 17:39:50 2024 +0200

    Improve NaN payload testing
    
    There are two separate sets of tests of NaN payloads in glibc:
    
    * libm-test-{get,set}payload* verify that getpayload, setpayload,
      setpayloadsig and __builtin_nan functions are consistent in their
      payload handling.
    
    * test-nan-payload verifies that strtod-family functions and the
      not-built-in nan functions are consistent in their payload handling.
    
    Nothing, however, connects the two sets of functions (i.e., verifies
    that strtod / nan are consistent with getpayload / setpayload /
    __builtin_nan).
    
    Improve test-nan-payload to check actual payload value with getpayload
    rather than just verifying that the strtod and nan functions produce
    the same NaN.  Also check that the NaNs produced aren't signaling and
    extend the tests to cover _FloatN / _FloatNx.
    
    Tested for x86_64.
    
    (cherry picked from commit be77d5ae417236883c02d3d67c0716e3f669fa41)
    (cherry picked from commit ad93c2047d791044d45e8f65070d821b0b918993)

 math/test-nan-payload.c | 59 ++++++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 54 insertions(+), 5 deletions(-)

commit 5123498d4cf7e7a492ea8ff53854c86b33565fb4
Author:     Joseph Myers <josmyers@redhat.com>
AuthorDate: Tue Aug 27 20:41:54 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue Oct 1 17:39:30 2024 +0200

    Make __strtod_internal tests type-generic
    
    Some of the strtod tests use type-generic machinery in tst-strtod.h to
    test the strto* functions for all floating types, while others only
    test double even when the tests are in fact meaningful for all
    floating types.
    
    Convert the tests of the internal __strtod_internal interface to cover
    all floating types.  I haven't tried to convert them to use newer test
    interfaces in other ways, just made the changes necessary to use the
    type-generic machinery.  As an internal interface, there are no
    aliases for different types with the same ABI (however,
    __strtold_internal is defined even if long double has the same ABI as
    double), so macros used by the type-generic testing code are redefined
    as needed to avoid expecting such aliases to be present.
    
    Tested for x86_64.
    
    (cherry picked from commit 3fc063dee01da4f80920a14b7db637c8501d6fd4)
    (cherry picked from commit cac10d88c684c0171e549d813bfef7a31029f257)

 stdlib/tst-strtod1i.c | 129 +++++++++++++++++++++++++----------------
 stdlib/tst-strtod3.c  | 102 +++++++++++++++++++++-----------
 stdlib/tst-strtod4.c  | 104 +++++++++++++++++++++------------
 stdlib/tst-strtod5i.c | 158 +++++++++++++++++++++++++++++++-------------------
 4 files changed, 313 insertions(+), 180 deletions(-)

commit a69bbf8a0aaec5000ce6ca118a6b08d1edddb95f
Author:     Joseph Myers <josmyers@redhat.com>
AuthorDate: Tue Aug 27 12:41:02 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue Oct 1 17:39:11 2024 +0200

    Fix strtod subnormal rounding (bug 30220)
    
    As reported in bug 30220, the implementation of strtod-family
    functions has a bug in the following case: the input string would,
    with infinite exponent range, take one more bit to represent than is
    available in the normal precision of the return type; the value
    represented is in the subnormal range; and there are no nonzero bits
    in the value, below those that can be represented in subnormal
    precision, other than the least significant bit and possibly the
    0.5ulp bit.  In this case, round_and_return ends up discarding the
    least significant bit.
    
    Fix by saving that bit to merge into more_bits (it can't be merged in
    at the time it's computed, because more_bits mustn't include this bit
    in the case of after-rounding tininess detection checking if the
    result is still subnormal when rounded to normal precision, so merging
    this bit into more_bits needs to take place after that check).
    
    Tested for x86_64.
    
    (cherry picked from commit 457622c2fa8f9f7435822d5287a437bc8be8090d)
    (cherry picked from commit d0c1792ad269566f877208ffda91c21dcd1a72e6)

 stdlib/strtod_l.c              |   2 +
 stdlib/tst-strtod-round-data   |  12 ++
 stdlib/tst-strtod-round-data.h | 372 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 386 insertions(+)

commit 56e69c9838b62567b781656776b125c0fd02f14f
Author:     Joseph Myers <josmyers@redhat.com>
AuthorDate: Tue Aug 27 12:38:01 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue Oct 1 17:38:51 2024 +0200

    More thoroughly test underflow / errno in tst-strtod-round
    
    Add tests of underflow in tst-strtod-round, and thus also test for
    errno being unchanged when there is neither overflow nor underflow.
    The errno setting before the function call to test for being unchanged
    is adjusted to set errno to 12345 instead of 0, so that any bugs where
    strtod sets errno to 0 would be detected.
    
    This doesn't add any new test inputs for tst-strtod-round, and in
    particular doesn't cover the edge cases of underflow the way
    tst-strtod-underflow does (none of the existing test inputs for
    tst-strtod-round actually exercise cases that have underflow with
    before-rounding tininess detection but not with after-rounding
    tininess detection), but at least it provides some coverage (as per
    the recent discussions) that ordinary non-overflowing non-underflowing
    inputs to these functions do not set errno.
    
    Tested for x86_64.
    
    (cherry picked from commit d73ed2601b7c3c93c3529149a3d7f7b6177900a8)
    (cherry picked from commit e06153665fa931e4c7d2a3ecc14e5197e96143a7)

 stdlib/gen-tst-strtod-round.c      |    43 +-
 stdlib/tst-strtod-round-data.h     | 15486 +++++++++++++++++------------------
 stdlib/tst-strtod-round-skeleton.c |    89 +-
 3 files changed, 7857 insertions(+), 7761 deletions(-)

commit c30590f4f7d30e88810ff62e3861768493db8a01
Author:     Joseph Myers <josmyers@redhat.com>
AuthorDate: Wed Aug 14 17:15:46 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue Oct 1 17:38:31 2024 +0200

    Test errno setting on strtod overflow in tst-strtod-round
    
    We have no tests that errno is set to ERANGE on overflow of
    strtod-family functions (we do have some tests for underflow, in
    tst-strtod-underflow).  Add such tests to tst-strtod-round.
    
    Tested for x86_64.
    
    (cherry picked from commit 207d64feb26279e152c50744e3c37e68491aca99)
    (cherry picked from commit 9bc76c7ca4d6022fd588c274d139813f99e04f35)

 stdlib/tst-strtod-round-skeleton.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

commit 87339c42f1e0c6feba58ad1138685e102474bdce
Author:     Joseph Myers <josmyers@redhat.com>
AuthorDate: Tue Sep 24 14:06:22 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue Oct 1 17:38:09 2024 +0200

    Add tests of fread
    
    There seem to be no glibc tests specifically for the fread function.
    Add basic tests of that function.
    
    Tested for x86_64.
    
    (cherry picked from commit d14c977c65aac7db35bb59380ef99d6582c4f930)
    (cherry picked from commit 61b6464f8d72aef520ee769a2ae317b4f68d5e1d)

 stdio-common/Makefile    |   1 +
 stdio-common/tst-fread.c | 134 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 135 insertions(+)

commit 40c85aaef47a82189eaab64b778ccfac748cbbdb
Author:     Sergey Kolosov <skolosov@redhat.com>
AuthorDate: Wed Sep 25 15:51:23 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue Oct 1 17:37:52 2024 +0200

    stdio-common: Add new test for fdopen
    
    This commit adds fdopen test with all modes.
    Reviewed-by: DJ Delorie <dj@redhat.com>
    
    (cherry picked from commit 1d72fa3cfa046f7293421a7e58f2a272474ea901)
    (cherry picked from commit 77018fd9f99f86a354387219fdf099915857a527)

 stdio-common/Makefile      |   1 +
 stdio-common/tst-fdopen2.c | 246 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 247 insertions(+)

commit 48794598ee3292822fc92e2b00b7cde2c8c8fc3f (tag: gentoo/glibc-2.40-3)
Author:     Siddhesh Poyarekar <siddhesh@sourceware.org>
AuthorDate: Tue Sep 3 14:58:33 2024 -0400
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Sep 12 00:00:35 2024 +0200

    libio: Attempt wide backup free only for non-legacy code
    
    _wide_data and _mode are not available in legacy code, so do not attempt
    to free the wide backup buffer in legacy code.
    
    Resolves: BZ #32137 and BZ #27821
    
    Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    Reviewed-by: Florian Weimer <fweimer@redhat.com>
    (cherry picked from commit ae4d44b1d501421ad9a3af95279b8f4d1546f1ce)
    (cherry picked from commit 7073164add3b874cf0c19ca0fb84236f6bb0985d)

 NEWS           | 2 ++
 libio/genops.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

commit ecc5e6b022003147abe21f41ef3ecc2da5d411d5
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Tue Sep 10 12:40:27 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Sep 12 00:00:16 2024 +0200

    debug: Fix read error handling in pcprofiledump
    
    The reading loops did not check for read failures.  Addresses
    a static analysis report.
    
    Manually tested by compiling a program with the GCC's
    -finstrument-functions option, running it with
    “LD_PRELOAD=debug/libpcprofile.so PCPROFILE_OUTPUT=output-file”,
    and reviewing the output of “debug/pcprofiledump output-file”.
    
    (cherry picked from commit 89b088bf70c651c231bf27e644270d093b8f144a)
    (cherry picked from commit adfb14e71f240a6bc2a4cbd6e6c50cc3fa1bcc3b)

 debug/pcprofiledump.c | 83 +++++++++++++++++++++++++++++----------------------
 1 file changed, 47 insertions(+), 36 deletions(-)

commit f6e7c79227b6257d4b58be24f8313181f8283eae
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Mon Sep 9 21:10:23 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Thu Sep 12 00:00:00 2024 +0200

    elf: Fix tst-dlopen-tlsreinit1.out test dependency
    
    Fixes commit 5097cd344fd243fb8deb6dec96e8073753f962f9
    ("elf: Avoid re-initializing already allocated TLS in dlopen
    (bug 31717)").
    
    Reported-by: Patsy Griffin <patsy@redhat.com>
    Reviewed-by: Patsy Griffin <patsy@redhat.com>
    (cherry picked from commit e82a7cb1622bff08d8e3a144d7c5516a088f1cbc)
    (cherry picked from commit f4a9b6e97bf05cf5a41907e55901f7e9afaafd4d)

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

commit d03a00033e4e2ee4a06e4f003ce5e8ec2e831e7f
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Thu Aug 1 23:31:30 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Sep 11 23:59:42 2024 +0200

    elf: Avoid re-initializing already allocated TLS in dlopen (bug 31717)
    
    The old code used l_init_called as an indicator for whether TLS
    initialization was complete.  However, it is possible that
    TLS for an object is initialized, written to, and then dlopen
    for this object is called again, and l_init_called is not true at
    this point.  Previously, this resulted in TLS being initialized
    twice, discarding any interim writes (technically introducing a
    use-after-free bug even).
    
    This commit introduces an explicit per-object flag, l_tls_in_slotinfo.
    It indicates whether _dl_add_to_slotinfo has been called for this
    object.  This flag is used to avoid double-initialization of TLS.
    In update_tls_slotinfo, the first_static_tls micro-optimization
    is removed because preserving the initalization flag for subsequent
    use by the second loop for static TLS is a bit complicated, and
    another per-object flag does not seem to be worth it.  Furthermore,
    the l_init_called flag is dropped from the second loop (for static
    TLS initialization) because l_need_tls_init on its own prevents
    double-initialization.
    
    The remaining l_init_called usage in resize_scopes and update_scopes
    is just an optimization due to the use of scope_has_map, so it is
    not changed in this commit.
    
    The isupper check ensures that libc.so.6 is TLS is not reverted.
    Such a revert happens if l_need_tls_init is not cleared in
    _dl_allocate_tls_init for the main_thread case, now that
    l_init_called is not checked anymore in update_tls_slotinfo
    in elf/dl-open.c.
    
    Reported-by: Jonathon Anderson <janderson@rice.edu>
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    (cherry picked from commit 5097cd344fd243fb8deb6dec96e8073753f962f9)
    (cherry picked from commit f496b750f135e57da921e975835c44bd199246dd)

 NEWS                           |   2 +-
 elf/Makefile                   |  30 ++++++++++++
 elf/dl-open.c                  |  35 ++------------
 elf/dl-tls.c                   |  44 +++++++++++++++---
 elf/tst-dlopen-tlsreinit1.c    |  40 ++++++++++++++++
 elf/tst-dlopen-tlsreinit2.c    |  39 ++++++++++++++++
 elf/tst-dlopen-tlsreinit3.c    |   2 +
 elf/tst-dlopen-tlsreinit4.c    |   2 +
 elf/tst-dlopen-tlsreinitmod1.c |  20 ++++++++
 elf/tst-dlopen-tlsreinitmod2.c |  30 ++++++++++++
 elf/tst-dlopen-tlsreinitmod3.c | 102 +++++++++++++++++++++++++++++++++++++++++
 include/link.h                 |   1 +
 sysdeps/generic/ldsodefs.h     |   8 +---
 13 files changed, 310 insertions(+), 45 deletions(-)

commit 27eccbe4b5098ae4bf78d834654ab358229cab33
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Thu Aug 1 23:31:23 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Sep 11 23:59:19 2024 +0200

    elf: Clarify and invert second argument of _dl_allocate_tls_init
    
    Also remove an outdated comment: _dl_allocate_tls_init is
    called as part of pthread_create.
    
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    (cherry picked from commit fe06fb313bddf7e4530056897d4a706606e49377)
    (cherry picked from commit b7edcfa0f41ccfaeb665a661d3a6a594c8d95848)

 elf/dl-tls.c               | 13 +++++++++----
 elf/rtld.c                 |  2 +-
 nptl/allocatestack.c       |  2 +-
 sysdeps/generic/ldsodefs.h |  4 +---
 4 files changed, 12 insertions(+), 9 deletions(-)

commit f61fca7a38fa769e367240a66e1d47ac410df662 (tag: gentoo/glibc-2.40-2)
Author:     Maciej W. Rozycki <macro@redhat.com>
AuthorDate: Fri Jul 26 13:21:34 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Sep 8 01:39:22 2024 +0200

    nptl: Use <support/check.h> facilities in tst-setuid3
    
    Remove local FAIL macro in favor to FAIL_EXIT1 from <support/check.h>,
    which provides equivalent reporting, with the name of the file and the
    line number within of the failure site additionally included.  Remove
    FAIL_ERR altogether and include ": %m" explicitly with the format string
    supplied to FAIL_EXIT1 as there seems little value to have a separate
    macro just for this.
    
    Reviewed-by: DJ Delorie <dj@redhat.com>
    (cherry picked from commit 8c98195af6e6f1ce21743fc26c723e0f7e45bcf2)
    (cherry picked from commit 3414b17e9db16c3bc0de5b49555c4f94f155ffc8)

 sysdeps/pthread/tst-setuid3.c | 37 ++++++++++++++++---------------------
 1 file changed, 16 insertions(+), 21 deletions(-)

commit 0f60d4d98924df93f46645810fc4d344e9967a2e
Author:     Maciej W. Rozycki <macro@redhat.com>
AuthorDate: Fri Jul 26 13:21:34 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Sep 8 01:39:04 2024 +0200

    posix: Use <support/check.h> facilities in tst-truncate and tst-truncate64
    
    Remove local FAIL macro in favor to FAIL_RET from <support/check.h>,
    which provides equivalent reporting, with the name of the file of the
    failure site additionally included, for the tst-truncate-common core
    shared between the tst-truncate and tst-truncate64 tests.
    
    Reviewed-by: DJ Delorie <dj@redhat.com>
    (cherry picked from commit fe47595504a55e7bb992f8928533df154b510383)
    (cherry picked from commit 3b3350d7baa8de70b71c02e964d5b8343749ebf8)

 posix/tst-truncate-common.c | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

commit 625f28f37c63ec272480b8733f83c4f72a4c13db
Author:     Siddhesh Poyarekar <siddhesh@sourceware.org>
AuthorDate: Tue Aug 13 21:08:49 2024 -0400
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Sep 8 01:38:47 2024 +0200

    ungetc: Fix backup buffer leak on program exit [BZ #27821]
    
    If a file descriptor is left unclosed and is cleaned up by _IO_cleanup
    on exit, its backup buffer remains unfreed, registering as a leak in
    valgrind.  This is not strictly an issue since (1) the program should
    ideally be closing the stream once it's not in use and (2) the program
    is about to exit anyway, so keeping the backup buffer around a wee bit
    longer isn't a real problem.  Free it anyway to keep valgrind happy
    when the streams in question are the standard ones, i.e. stdout, stdin
    or stderr.
    
    Also, the _IO_have_backup macro checks for _IO_save_base,
    which is a roundabout way to check for a backup buffer instead of
    directly looking for _IO_backup_base.  The roundabout check breaks when
    the main get area has not been used and user pushes a char into the
    backup buffer with ungetc.  Fix this to use the _IO_backup_base
    directly.
    
    Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    (cherry picked from commit 3e1d8d1d1dca24ae90df2ea826a8916896fc7e77)
    (cherry picked from commit e24902f409994f226dbc6fde2476009df452a18f)

 libio/genops.c                 |  6 ++++++
 libio/libioP.h                 |  4 ++--
 stdio-common/Makefile          |  7 +++++++
 stdio-common/tst-ungetc-leak.c | 32 ++++++++++++++++++++++++++++++++
 4 files changed, 47 insertions(+), 2 deletions(-)

commit 4348baff73d0524d16ad6562fa59ce21d6ed7027
Author:     Siddhesh Poyarekar <siddhesh@sourceware.org>
AuthorDate: Tue Aug 13 21:00:06 2024 -0400
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Sep 8 01:38:26 2024 +0200

    ungetc: Fix uninitialized read when putting into unused streams [BZ #27821]
    
    When ungetc is called on an unused stream, the backup buffer is
    allocated without the main get area being present.  This results in
    every subsequent ungetc (as the stream remains in the backup area)
    checking uninitialized memory in the backup buffer when trying to put a
    character back into the stream.
    
    Avoid comparing the input character with buffer contents when in backup
    to avoid this uninitialized read.  The uninitialized read is harmless in
    this context since the location is promptly overwritten with the input
    character, thus fulfilling ungetc functionality.
    
    Also adjust wording in the manual to drop the paragraph that says glibc
    cannot do multiple ungetc back to back since with this change, ungetc
    can actually do this.
    
    Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    (cherry picked from commit cdf0f88f97b0aaceb894cc02b21159d148d7065c)
    (cherry picked from commit dac7a0694b5e853f08be518cd5a133ac5804666d)

 libio/genops.c            | 2 +-
 manual/stdio.texi         | 8 +++-----
 stdio-common/tst-ungetc.c | 2 ++
 3 files changed, 6 insertions(+), 6 deletions(-)

commit 4f306811cce0905c0ac03cbe26357b631442eb2b
Author:     Siddhesh Poyarekar <siddhesh@sourceware.org>
AuthorDate: Wed Aug 14 19:20:04 2024 -0400
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Sep 8 01:38:05 2024 +0200

    Make tst-ungetc use libsupport
    
    Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    (cherry picked from commit 3f7df7e757f4efec38e45d4068e5492efcac4856)
    (cherry picked from commit 2f749d2b15cbc82268d7f8735f21ae1e3b68754f)

 stdio-common/tst-ungetc.c | 112 +++++++++++++++++++++++-----------------------
 1 file changed, 57 insertions(+), 55 deletions(-)

commit 2341a365a1cb78e54abdb185994f1ce92fcbbab2
Author:     Maciej W. Rozycki <macro@redhat.com>
AuthorDate: Fri Jul 26 13:21:34 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Sep 8 01:37:49 2024 +0200

    stdio-common: Add test for vfscanf with matches longer than INT_MAX [BZ #27650]
    
    Complement commit b03e4d7bd25b ("stdio: fix vfscanf with matches longer
    than INT_MAX (bug 27650)") and add a test case for the issue, inspired
    by the reproducer provided with the bug report.
    
    This has been verified to succeed as from the commit referred and fail
    beforehand.
    
    As the test requires 2GiB of data to be passed around its performance
    has been evaluated using a choice of systems and the execution time
    determined to be respectively in the range of 9s for POWER9@2.166GHz,
    24s for FU740@1.2GHz, and 40s for 74Kf@950MHz.  As this is on the verge
    of and beyond the default timeout it has been increased by the factor of
    8.  Regardless, following recent practice the test has been added to the
    standard rather than extended set.
    
    Reviewed-by: DJ Delorie <dj@redhat.com>
    (cherry picked from commit 89cddc8a7096f3d9225868304d2bc0a1aaf07d63)
    (cherry picked from commit 27fb563bfee521239316142fa4968282bffa86a6)

 stdio-common/Makefile            |   5 ++
 stdio-common/tst-scanf-bz27650.c | 108 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 113 insertions(+)

commit 9fe945b2c3ba0882b35632479b41e4d3161ee159
Author:     Maciej W. Rozycki <macro@redhat.com>
AuthorDate: Fri Jul 26 13:21:34 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Sep 8 01:37:31 2024 +0200

    support: Add FAIL test failure helper
    
    Add a FAIL test failure helper analogous to FAIL_RET, that does not
    cause the current function to return, providing a standardized way to
    report a test failure with a message supplied while permitting the
    caller to continue executing, for further reporting, cleaning up, etc.
    
    Update existing test cases that provide a conflicting definition of FAIL
    by removing the local FAIL definition and then as follows:
    
    - tst-fortify-syslog: provide a meaningful message in addition to the
      file name already added by <support/check.h>; 'support_record_failure'
      is already called by 'support_print_failure_impl' invoked by the new
      FAIL test failure helper.
    
    - tst-ctype: no update to FAIL calls required, with the name of the file
      and the line number within of the failure site additionally included
      by the new FAIL test failure helper, and error counting plus count
      reporting upon test program termination also already provided by
      'support_record_failure' and 'support_report_failure' respectively,
      called by 'support_print_failure_impl' and 'adjust_exit_status' also
      respectively.  However in a number of places 'printf' is called and
      the error count adjusted by hand, so update these places to make use
      of FAIL instead.  And last but not least adjust the final summary just
      to report completion, with any error count following as reported by
      the test driver.
    
    - test-tgmath2: no update to FAIL calls required, with the name of the
      file of the failure site additionally included by the new FAIL test
      failure helper.  Also there is no need to track the return status by
      hand as any call to FAIL will eventually cause the test case to return
      an unsuccesful exit status regardless of the return status from the
      test function, via a call to 'adjust_exit_status' made by the test
      driver.
    
    Reviewed-by: DJ Delorie <dj@redhat.com>
    (cherry picked from commit 1b97a9f23bf605ca608162089c94187573fb2a9e)
    (cherry picked from commit bc240ba7c86a74bc64d4234feadb49bb8e36e1c9)

 debug/tst-fortify-syslog.c |  8 +-------
 localedata/tst-ctype.c     | 40 +++++++++-------------------------------
 math/test-tgmath2.c        | 13 +++----------
 support/check.h            |  5 +++++
 4 files changed, 18 insertions(+), 48 deletions(-)

commit 5a2286d324dc0fbfa1a92aa38e676e04111602d1
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Mon Aug 19 15:48:03 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Sep 8 01:36:54 2024 +0200

    string: strerror, strsignal cannot use buffer after dlmopen (bug 32026)
    
    Secondary namespaces have a different malloc.  Allocating the
    buffer in one namespace and freeing it another results in
    heap corruption.  Fix this by using a static string (potentially
    translated) in secondary namespaces.  It would also be possible
    to use the malloc from the initial namespace to manage the
    buffer, but these functions would still not be safe to use in
    auditors etc. because a call to strerror could still free a
    buffer while it is used by the application.  Another approach
    could use proper initial-exec TLS, duplicated in secondary
    namespaces, but that would need a callback interface for freeing
    libc resources in namespaces on thread exit, which does not exist
    today.
    
    Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
    (cherry picked from commit 25a5eb4010df94b412c67db9e346029de316d06b)
    (cherry picked from commit 709319f9de6f976f9feceb623cb2c96769e9d78b)

 NEWS                |  1 +
 string/strerror_l.c | 35 ++++++++++++++++++++++++-----------
 string/strsignal.c  | 36 ++++++++++++++++++++++--------------
 3 files changed, 47 insertions(+), 25 deletions(-)

commit 085b07a2a2c73510aa183f459a2a4b1efe8256c4
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Fri Aug 9 16:17:14 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Sep 8 01:36:38 2024 +0200

    Define __libc_initial for the static libc
    
    Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
    (cherry picked from commit eb0e50e9a1cf80a2ba6f33f990a08ef37a3267fb)
    (cherry picked from commit 586e4cd8c67df95ebb0bfecea3d007bff618d6d9)

 include/libc-internal.h | 3 +++
 1 file changed, 3 insertions(+)

commit f18fdb2d5b6126a7fe36a3051feeed52c9201870
Author:     Noah Goldstein <goldstein.w.n@gmail.com>
AuthorDate: Tue Aug 13 23:29:14 2024 +0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Sep 8 01:36:18 2024 +0200

    x86: Fix bug in strchrnul-evex512 [BZ #32078]
    
    Issue was we were expecting not matches with CHAR before the start of
    the string in the page cross case.
    
    The check code in the page cross case:
    ```
        and    $0xffffffffffffffc0,%rax
        vmovdqa64 (%rax),%zmm17
        vpcmpneqb %zmm17,%zmm16,%k1
        vptestmb %zmm17,%zmm17,%k0{%k1}
        kmovq  %k0,%rax
        inc    %rax
        shr    %cl,%rax
        je     L(continue)
    ```
    
    expects that all characters that neither match null nor CHAR will be
    1s in `rax` prior to the `inc`. Then the `inc` will overflow all of
    the 1s where no relevant match was found.
    
    This is incorrect in the page-cross case, as the
    `vmovdqa64 (%rax),%zmm17` loads from before the start of the input
    string.
    
    If there are matches with CHAR before the start of the string, `rax`
    won't properly overflow.
    
    The fix is quite simple. Just replace:
    
    ```
        inc    %rax
        shr    %cl,%rax
    ```
    With:
    ```
        sar    %cl,%rax
        inc    %rax
    ```
    
    The arithmetic shift will clear any matches prior to the start of the
    string while maintaining the signbit so the 1s can properly overflow
    to zero in the case of no matches.
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
    
    (cherry picked from commit 7da08862471dfec6fdae731c2a5f351ad485c71f)
    (cherry picked from commit c0af0c2ba016030c778bc22c55f5f9498f96b8b9)

 string/test-strchr.c                        | 65 ++++++++++++++++++++++++++++-
 sysdeps/x86_64/multiarch/strchr-evex-base.S |  8 ++--
 2 files changed, 68 insertions(+), 5 deletions(-)

commit 1f0421b6f62473d7c162e747702681269a182025
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Mon Jul 22 17:47:22 2024 -0700
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Sep 8 01:35:56 2024 +0200

    x32/cet: Support shadow stack during startup for Linux 6.10
    
    Use RXX_LP in RTLD_START_ENABLE_X86_FEATURES.  Support shadow stack during
    startup for Linux 6.10:
    
    commit 2883f01ec37dd8668e7222dfdb5980c86fdfe277
    Author: H.J. Lu <hjl.tools@gmail.com>
    Date:   Fri Mar 15 07:04:33 2024 -0700
    
        x86/shstk: Enable shadow stacks for x32
    
        1. Add shadow stack support to x32 signal.
        2. Use the 64-bit map_shadow_stack syscall for x32.
        3. Set up shadow stack for x32.
    
    Add the map_shadow_stack system call to <fixup-asm-unistd.h> and regenerate
    arch-syscall.h.  Tested on Intel Tiger Lake with CET enabled x32.  There
    are no regressions with CET enabled x86-64.  There are no changes in CET
    enabled x86-64 _dl_start_user.
    
    Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
    Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
    (cherry picked from commit 8344c1f5514b1b5b1c8c6e48f4b802653bd23b71)
    (cherry picked from commit 898f25e0b1026be5701d05715600be646e9d0714)

 sysdeps/unix/sysv/linux/x86_64/dl-cet.h               | 6 +++---
 sysdeps/unix/sysv/linux/x86_64/x32/arch-syscall.h     | 1 +
 sysdeps/unix/sysv/linux/x86_64/x32/fixup-asm-unistd.h | 4 ++++
 3 files changed, 8 insertions(+), 3 deletions(-)

commit ee3da9240a1ab84bd4aaf08cca9d01d0346da073
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Mon Jul 22 17:47:21 2024 -0700
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Sep 8 01:35:34 2024 +0200

    x86-64: Remove sysdeps/x86_64/x32/dl-machine.h
    
    Remove sysdeps/x86_64/x32/dl-machine.h by folding x32 ARCH_LA_PLTENTER,
    ARCH_LA_PLTEXIT and RTLD_START into sysdeps/x86_64/dl-machine.h.  There
    are no regressions on x86-64 nor x32.  There are no changes in x86-64
    _dl_start_user.  On x32, _dl_start_user changes are
    
     <_dl_start_user>:
            mov    %eax,%r12d
    +       mov    %esp,%r13d
            mov    (%rsp),%edx
            mov    %edx,%esi
    -       mov    %esp,%r13d
            and    $0xfffffff0,%esp
            mov    0x0(%rip),%edi        # <_dl_start_user+0x14>
            lea    0x8(%r13,%rdx,4),%ecx
    
    Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
    Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
    (cherry picked from commit 652c6cf26927352fc0e37e4e60c6fc98ddf6d3b4)
    (cherry picked from commit e3556937c2402b8acf2e586bf53168e9f482ba91)

 sysdeps/x86_64/dl-machine.h     | 27 +++++++++------
 sysdeps/x86_64/x32/dl-machine.h | 76 -----------------------------------------
 2 files changed, 16 insertions(+), 87 deletions(-)

commit 8278116368933f7171a4b538ea14c2303459c7d7
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Fri Aug 9 17:01:17 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Aug 9 22:48:38 2024 +0200

    support: Add options list terminator to the test driver
    
    This avoids crashes if a test is passed unknown options.
    
    Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
    (cherry picked from commit c2a474f4617ede7a8bf56b7257acb37dc757b2d1)
    (cherry picked from commit 39ee60a719eb6ffde76ccc232d79273c473d7a93)

 support/test-driver.c | 1 +
 1 file changed, 1 insertion(+)

commit 517c7bde24af0bebd0a3d3ed171d000c41f42048
Author:     Arjun Shankar <arjun@redhat.com>
AuthorDate: Tue Jul 30 11:37:57 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Aug 9 22:48:20 2024 +0200

    manual/stdio: Further clarify putc, putwc, getc, and getwc
    
    This is a follow-up to 10de4a47ef3f481592e3c62eb07bcda23e9fde4d that
    reworded the manual entries for putc and putwc and removed any
    performance claims.
    
    This commit further clarifies these entries and brings getc and getwc in
    line with the descriptions of putc and putwc, removing any performance
    claims from them as well.
    Reviewed-by: Florian Weimer <fweimer@redhat.com>
    
    (cherry picked from commit 942670c81dc8071dd75d6213e771daa5d2084cb6)
    (cherry picked from commit 5641780762723156b0d20a0b9f7df1d76831bab0)

 manual/stdio.texi | 27 ++++++++++-----------------
 1 file changed, 10 insertions(+), 17 deletions(-)

commit e76110d4a535b0e2186f19b9b9385dd993ebea20
Author:     Andreas Schwab <schwab@suse.de>
AuthorDate: Mon Aug 5 10:55:51 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Aug 9 22:48:03 2024 +0200

    Fix name space violation in fortify wrappers (bug 32052)
    
    Rename the identifier sz to __sz everywhere.
    
    Fixes: a643f60c53 ("Make sure that the fortified function conditionals are constant")
    (cherry picked from commit 39ca997ab378990d5ac1aadbaa52aaf1db6d526f)
    (cherry picked from commit 6a97e2ba144a554809161d488f25e4bae07c9405)

 NEWS                  |  1 +
 libio/bits/stdio2.h   | 40 ++++++++++++++++++------------------
 socket/bits/socket2.h | 20 +++++++++---------
 stdlib/bits/stdlib.h  | 10 ++++-----
 wcsmbs/bits/wchar2.h  | 56 +++++++++++++++++++++++++--------------------------
 5 files changed, 64 insertions(+), 63 deletions(-)

commit 19439efc69293653a256b8df30c916b3122ed731
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Fri Aug 2 15:22:14 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Aug 9 22:47:46 2024 +0200

    x86: Tunables may incorrectly set Prefer_PMINUB_for_stringop (bug 32047)
    
    Fixes commit 5bcf6265f215326d14dfacdce8532792c2c7f8f8 ("x86:
    Disable non-temporal memset on Skylake Server").
    
    Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
    (cherry picked from commit 7a630f7d3392ca391a399486ce2846f9e4b4ee63)
    (cherry picked from commit aa533d58ff12e27771d9c960a727d74992a3f2a3)

 sysdeps/x86/cpu-tunables.c | 1 +
 1 file changed, 1 insertion(+)

commit fbc119618a742f0d5fb56074cc51e5fd55259638
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Thu Aug 1 10:46:10 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Aug 9 22:47:30 2024 +0200

    resolv: Fix tst-resolv-short-response for older GCC (bug 32042)
    
    Previous GCC versions do not support the C23 change that
    allows labels on declarations.
    
    Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
    (cherry picked from commit ec119972cb2598c04ec7d4219e20506006836f64)
    (cherry picked from commit 928769737c8f0cbb51dfa2a02de0594c2395d802)

 resolv/tst-resolv-short-response.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

commit c6405760abbdf849b0eac8f75b486a964f81a471
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Wed Jul 24 14:05:15 2024 -0700
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Aug 9 22:47:13 2024 +0200

    Add mremap tests
    
    Add tests for MREMAP_MAYMOVE and MREMAP_FIXED.  On Linux, also test
    MREMAP_DONTUNMAP.
    
    Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit ff0320bec2810192d453c579623482fab87bfa01)
    (cherry picked from commit ca53bc68ab92ab413a7d53e951227d380a85ebd8)

 misc/Makefile                               |  2 +
 misc/tst-mremap1.c                          | 46 +++++++++++++++++++++
 misc/tst-mremap2.c                          | 54 +++++++++++++++++++++++++
 sysdeps/generic/mremap-failure.h            | 25 ++++++++++++
 sysdeps/unix/sysv/linux/Makefile            |  1 +
 sysdeps/unix/sysv/linux/mremap-failure.h    | 30 ++++++++++++++
 sysdeps/unix/sysv/linux/tst-linux-mremap1.c | 63 +++++++++++++++++++++++++++++
 7 files changed, 221 insertions(+)

commit 838cc2d07813f0de1ee016eef0c5d4dd15151747
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Wed Jul 24 14:05:14 2024 -0700
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Aug 9 22:46:58 2024 +0200

    mremap: Update manual entry
    
    Update mremap manual entry:
    
    1. Change mremap to variadic.
    2. Document MREMAP_FIXED and MREMAP_DONTUNMAP.
    
    Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit cb2dee4eccf46642eef588bee64f9c875c408f1c)
    (cherry picked from commit 2eb2d78ca75d7432bd1d11d227f4c899554ea02e)

 NEWS             |  1 +
 manual/llio.texi | 42 +++++++++++++++++++++++++++++++++++-------
 2 files changed, 36 insertions(+), 7 deletions(-)

commit b8a78f7355b0f4702c1044cf3b9eae01fc509a5e
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Wed Jul 24 14:05:13 2024 -0700
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Aug 9 22:46:41 2024 +0200

    linux: Update the mremap C implementation [BZ #31968]
    
    Update the mremap C implementation to support the optional argument for
    MREMAP_DONTUNMAP added in Linux 5.7 since it may not always be correct
    to implement a variadic function as a non-variadic function on all Linux
    targets.  Return MAP_FAILED and set errno to EINVAL for unknown flag bits.
    This fixes BZ #31968.
    
    Note: A test must be added when a new flag bit is introduced.
    
    Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit 6c40cb0e9f893d49dc7caee580a055de53562206)
    (cherry picked from commit 3433a358428bcec2d203fa408b85f442c9a465ca)

 NEWS                             |  1 +
 sysdeps/unix/sysv/linux/mremap.c | 14 +++++++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)

commit b2e3445d1af4e8fc69c31dc9e76ac8027d1bc37e
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Thu Jun 27 16:26:56 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Aug 9 22:46:21 2024 +0200

    Enhanced test coverage for strncmp, wcsncmp
    
    Add string/test-strncmp-nonarray and
    wcsmbs/test-wcsncmp-nonarray.
    
    This is the test that uncovered bug 31934.  Test run time
    is more than one minute on a fairly current system, so turn
    these into xtests that do not run automatically.
    
    Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
    (cherry picked from commit 54252394c25ddf0062e288d4a6ab7a885f8ae009)
    (cherry picked from commit 46f19b234244f4654b9e3898ac1c27de86068222)

 string/Makefile                |   5 +-
 string/test-Xncmp-nonarray.c   | 183 +++++++++++++++++++++++++++++++++++++++++
 string/test-strncmp-nonarray.c |   4 +
 wcsmbs/Makefile                |   4 +
 wcsmbs/test-wcsncmp-nonarray.c |   5 ++
 5 files changed, 200 insertions(+), 1 deletion(-)

commit c05d9a0887370637405293914fe791f987ad332e
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Wed Jun 26 11:27:54 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Aug 9 22:46:01 2024 +0200

    Enhance test coverage for strnlen, wcsnlen
    
    This commit adds string/test-strnlen-nonarray and
    wcsmbs/test-wcsnlen-nonarray.
    
    Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
    (cherry picked from commit 783d4c0b81889c39a9ddf13b60d0fde4040fb1c0)
    (cherry picked from commit 509166c9a53ad81217a28cc67ba2a688f02fc477)

 string/Makefile                |   1 +
 string/test-Xnlen-nonarray.c   | 133 +++++++++++++++++++++++++++++++++++++++++
 string/test-strnlen-nonarray.c |   4 ++
 wcsmbs/Makefile                |   1 +
 wcsmbs/test-wcsnlen-nonarray.c |   5 ++
 5 files changed, 144 insertions(+)

commit 5a493d15d3be97c43fdad0d2e1ffc49c9ed41686
Author:     Lukas Bulwahn <lukas.bulwahn@redhat.com>
AuthorDate: Mon Jul 29 11:08:17 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Aug 9 22:45:44 2024 +0200

    manual: make setrlimit() description less ambiguous
    
    The existing description for setrlimit() has some ambiguity. It could be
    understood to have the semantics of getrlimit(), i.e., the limits from the
    process are stored in the provided rlp pointer.
    
    Make the description more explicit that rlp are the input values, and that
    the limits of the process is changed with this function.
    
    Reviewed-by: Florian Weimer <fweimer@redhat.com>
    (cherry picked from commit aedbf08891069fc029ed021e4dba933eb877b394)
    (cherry picked from commit 132a72f93cb4ad9f16b8469dc061de5f75f6a44e)

 manual/resource.texi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

commit c8e7cf32afd095f8ed27f426419fb8caa137f33d
Author:     Arjun Shankar <arjun@redhat.com>
AuthorDate: Mon Jul 29 14:30:59 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Aug 9 22:45:26 2024 +0200

    manual/stdio: Clarify putc and putwc
    
    The manual entry for `putc' described what "most systems" do instead of
    describing the glibc implementation and its guarantees.  This commit
    fixes that by warning that putc may be implemented as a macro that
    double-evaluates `stream', and removing the performance claim.
    
    Even though the current `putc' implementation does not double-evaluate
    `stream', offering this obscure guarantee as an extension to what
    POSIX allows does not seem very useful.
    
    The entry for `putwc' is also edited to bring it in line with `putc'.
    Reviewed-by: Florian Weimer <fweimer@redhat.com>
    
    (cherry picked from commit 10de4a47ef3f481592e3c62eb07bcda23e9fde4d)
    (cherry picked from commit 65fbcfe58991194301a7e4fb9c53ab936573e711)

 manual/stdio.texi | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

commit 930bc483ea43a1ea848c35c8f24860c0a9d09de0
Author:     Miguel Martín <mmartinv@redhat.com>
AuthorDate: Tue Jul 16 17:14:57 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Aug 9 22:45:08 2024 +0200

    malloc: add multi-threaded tests for aligned_alloc/calloc/malloc
    
    Improve aligned_alloc/calloc/malloc test coverage by adding
    multi-threaded tests with random memory allocations and with/without
    cross-thread memory deallocations.
    
    Perform a number of memory allocation calls with random sizes limited
    to 0xffff.
    
    Use the existing DSO ('malloc/tst-aligned_alloc-lib.c') to randomize
    allocator selection.
    
    The multi-threaded allocation/deallocation is staged as described below:
    
    - Stage 1: Half of the threads will be allocating memory and the
      other half will be waiting for them to finish the allocation.
    - Stage 2: Half of the threads will be allocating memory and the
      other half will be deallocating memory.
    - Stage 3: Half of the threads will be deallocating memory and the
      second half waiting on them to finish.
    
    Add 'malloc/tst-aligned-alloc-random-thread.c' where each thread will
    deallocate only the memory that was previously allocated by itself.
    
    Add 'malloc/tst-aligned-alloc-random-thread-cross.c' where each thread
    will deallocate memory that was previously allocated by another thread.
    
    The intention is to be able to utilize existing malloc testing to ensure
    that similar allocation APIs are also exposed to the same rigors.
    Reviewed-by: Arjun Shankar <arjun@redhat.com>
    
    (cherry picked from commit b0fbcb7d0051a68baf26b2aed51a8a31c34d68e5)
    (cherry picked from commit 5d2a931a8167a288374c3a38dc10fe0492ab5ffe)

 malloc/Makefile                                |   8 ++
 malloc/tst-aligned-alloc-random-thread-cross.c |  19 ++++
 malloc/tst-aligned-alloc-random-thread.c       | 145 +++++++++++++++++++++++++
 3 files changed, 172 insertions(+)

commit 15cd29218748036f1f200790c0114b41ae270260
Author:     Miguel Martín <mmartinv@redhat.com>
AuthorDate: Tue Jul 16 17:14:56 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Aug 9 22:44:47 2024 +0200

    malloc: avoid global locks in tst-aligned_alloc-lib.c
    
    Make sure the DSO used by aligned_alloc/calloc/malloc tests does not get
    a global lock on multithreaded tests.
    Reviewed-by: Arjun Shankar <arjun@redhat.com>
    
    (cherry picked from commit 9a27b566b2048f599048f2f4afe1cce06c4ef43d)
    (cherry picked from commit 2aebac5e158277d852b87b0cbd4af2b2d10ac387)

 malloc/tst-aligned_alloc-lib.c | 39 ++++++++++++++++++++-------------------
 1 file changed, 20 insertions(+), 19 deletions(-)

commit e9eb3e67aa899cc312a46c3a38342fe74212d94b
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Wed Jul 24 13:42:16 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Aug 9 22:44:28 2024 +0200

    Fix version number in NEWS file
    
    (cherry picked from commit 145b5886379c8de4f0a1bca3556a4c3d7b6c24b2)

 NEWS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 9b32dfa728fbdbc107941cb802d134f58aeb85b2
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Wed Jul 24 12:50:17 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Aug 9 22:44:15 2024 +0200

    manual: Do not mention STATIC_TLS in dynamic linker hardening recommendations
    
    The current toolchain does not consistently generate it, and
    glibc does not use it.
    
    Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
    (cherry picked from commit 90842d3980064ef410b998b22170ad409b76b9fd)
    (cherry picked from commit b6aeba2de157ba0cdc8fb0aed67b632b3490f383)

 manual/dynlink.texi | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

commit ee6621db673ce46d8776f764fd96a4ca1c58a9fb
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Wed Jul 24 12:06:47 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Aug 9 22:43:58 2024 +0200

    resolv: Do not wait for non-existing second DNS response after error (bug 30081)
    
    In single-request mode, there is no second response after an error
    because the second query has not been sent yet.  Waiting for it
    introduces an unnecessary timeout.
    
    Reviewed-by: DJ Delorie <dj@redhat.com>
    (cherry picked from commit af625987d619388a100b153520d3ee308bda9889)
    (cherry picked from commit ef141426630da0946f0af8732eddce9b9a52b2d3)

 NEWS                               |   1 +
 resolv/Makefile                    |   3 +
 resolv/res_send.c                  |   2 +-
 resolv/tst-resolv-semi-failure.c   | 133 +++++++++++++++++++++++++++++++++++++
 resolv/tst-resolv-short-response.c |  12 ++++
 5 files changed, 150 insertions(+), 1 deletion(-)

commit 5e27afbeefe710a0d11324e679d3fee64cbcc765
Author:     Florian Weimer <fweimer@redhat.com>
AuthorDate: Wed Jul 24 12:06:47 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Aug 9 22:43:39 2024 +0200

    resolv: Allow short error responses to match any query (bug 31890)
    
    Reviewed-by: DJ Delorie <dj@redhat.com>
    (cherry picked from commit 691a3b2e9bfaba842e46a5ccb7f5e6ea144c3ade)
    (cherry picked from commit 8bbb8d7b16cae777eed06bc9d2e059fc00be24e9)

 NEWS                               |   6 ++
 resolv/Makefile                    |   3 +
 resolv/res_send.c                  |  29 ++++++----
 resolv/tst-resolv-short-response.c | 112 +++++++++++++++++++++++++++++++++++++
 4 files changed, 140 insertions(+), 10 deletions(-)

commit b73506c911e72dc5dfb6c831ea2c29b06569681a (tag: gentoo/glibc-2.40-1)
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: Sun Jul 21 20:19:44 2024 +0200

    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>
    (cherry picked from commit fa441cd6be9a34d81306d41defeefaa2ac31d0b8)

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

commit 586a74c6f0ff9eea54250dc344006a23d99fa01b
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: Sun Jul 21 20:19:41 2024 +0200

    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 6ef027d237555b34bd9288a6c3c133fee566bf08
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: Sun Jul 21 20:19:38 2024 +0200

    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 858761d0fecb87f651455663cb9346a43fed9e03
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: Sun Jul 21 20:19:35 2024 +0200

    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 8f14a7f94d70973ad87d99ffe2d3ae580bae8958
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: Sun Jul 21 20:19:32 2024 +0200

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

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

commit fdd9e0d055843f95d70dbf31933af17de48afcae
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: Sun Jul 21 20:19:29 2024 +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 02570bccc14b516f83eb2ec10e28d42405646929
Author:     Mike Frysinger <vapier@gentoo.org>
AuthorDate: Tue Aug 3 00:34:59 2021 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Jul 21 20:19:26 2024 +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 6daa77104520ca992a9369bd01cccd4d98c82984
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: Sun Jul 21 19:02:10 2024 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Jul 21 19:02:10 2024 +0200

    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/GLIBC-SA-2024-0004 | 28 ----------------
 advisories/GLIBC-SA-2024-0005 | 22 -------------
 advisories/GLIBC-SA-2024-0006 | 32 ------------------
 advisories/GLIBC-SA-2024-0007 | 28 ----------------
 advisories/GLIBC-SA-2024-0008 | 26 ---------------
 advisories/README             | 77 -------------------------------------------
 15 files changed, 2 insertions(+), 334 deletions(-)
