Commit Graph

42415 Commits

Author SHA1 Message Date
Wilco Dijkstra aa18367c11 AArch64: Improve enabling of SVE for libmvec
When using a -mcpu option in CFLAGS, GCC can report errors when building libmvec.
Fix this by overriding both -mcpu and -march with a generic variant with SVE added.
Also use a tune for a modern SVE core.

Reviewed-by: Yury Khrustalev <yury.khrustalev@arm.com>
2025-05-29 16:58:49 +00:00
Luna Lamb da196e6134 AArch64: Improve codegen in SVE log1p
Improves memory access, reformat evaluation scheme to pack coefficients.
5% improvement in throughput microbenchmark on Neoverse V1.

Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
2025-05-29 15:25:35 +00:00
Joseph Myers 3473526758 Use Linux 6.15 in build-many-glibcs.py
Tested with build-many-glibcs.py (host-libraries, compilers and glibcs
builds).

Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-05-28 14:15:51 +00:00
Yury Khrustalev ea30c67030 manual: mention PKEY_UNRESTRICTED macro in the manual
Also use this macro in one of the examples.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-05-28 11:00:02 +01:00
Yury Khrustalev 22419a2b60 linux: use PKEY_UNRESTRICTED macro in tst-pkey
Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-05-28 10:59:26 +01:00
Yury Khrustalev 01bb997ef5 misc: add PKEY_UNRESTRICTED macro
A corresponding macro has been added to Linux UAPI headers in 6.15.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-05-28 10:58:40 +01:00
Florian Weimer 27cc947dce generic: Add missing parameter name to __getrandom_early_init
This is required after commit 03da41d47d
("Turn on -Wmissing-parameter-name by default if available").

Reviewed-by: Sam James <sam@gentoo.org>
2025-05-28 10:00:41 +02:00
Florian Weimer fe31d246f5 hurd: Avoid -Wfree-labels warning in _hurd_intr_rpc_mach_msg
This is required after commit 4f4c4fcde7
("Turn on -Wfree-labels by default if available").

Reviewed-by: Sam James <sam@gentoo.org>
2025-05-28 09:59:24 +02:00
Andreas Schwab 345432e47b Update RISC-V relocations
Update the list of RISC-V relocations from the ELF psABI as of June 2024.
It removes binutils-internal only relocations that were never part of
actual object files.  The GNU_VTINHERIT and GNU_VTENTRY relocations were
never used because the corresponding GCC option -fvtable-gc was never
supported on RISC-V.
2025-05-28 09:40:33 +02:00
Joseph Myers 08d7243a61 Use -std=gnu17 in build-many-glibcs.py when configuring GMP
This works around incompatibility of GMP 6.3.0 with GCC 15 (defaulting
to C23) following an approach suggested by Florian.

Tested with build-many-glibcs.py (host-libraries build only).

Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-05-27 15:56:56 +00:00
Wilco Dijkstra 919bf1489a malloc: Fix malloc init order
__ptmalloc_init was called too early in __libc_early_init: it uses
__libc_initial which is not set yet.  Fix this by moving initialization
to the end of __libc_early_init.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-05-27 15:25:30 +00:00
Florian Weimer a289cf711e Move C warning flags from +gccwarn to +gccwarn-c
This avoids warnings about these options during the C++ header
inclusion tests.

Reviewed-by: Sam James <sam@gentoo.org>
2025-05-27 16:09:39 +02:00
Jonathan Wakely a484b76cd7 doc: Add missing space in documentation of __TIMESIZE 2025-05-27 11:42:50 +01:00
Jonathan Wakely b4784d61b3 doc: Fix typos in documentation of _TIME_BITS 2025-05-27 11:42:49 +01:00
Jonathan Wakely a2d2c62072 Fix comment typo in libc-symbols.h
Reviewed-by: Sam James <sam@gentoo.org>
2025-05-27 11:34:14 +01:00
Florian Weimer 03da41d47d Turn on -Wmissing-parameter-name by default if available
This flags another hazard for backporting changes to earlier branches.

Reviewed-by: Sam James <sam@gentoo.org>
2025-05-27 07:15:06 +02:00
Tomas Volf 99c70ae6e9 manual: Document getopt_long_only with single letter options (bug 32980)
Signed-off-by: Tomas Volf <~@wolfsden.cz>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-05-26 15:53:54 +02:00
Florian Weimer 4f4c4fcde7 Turn on -Wfree-labels by default if available
This flags a hazard for backporting changes to earlier branches.

Reviewed-by: Sam James <sam@gentoo.org>
2025-05-26 08:49:22 +02:00
Stefan Liebler 319f94dea2 S390: Use cfi_val_offset instead of cfi_escape. 31bit part
Due to raising the minimum binutils version to version >=2.28,
the used cfi_escape for cfi_val_offset can now be ommitted.

The commit 0fc76d8762
has already adjusted it for the 64bit part of mcount.
This patch also adjusts it for the 31bit part of mcount.

Checked with "objdump -WF" / "objdump -Wf" that the previous
cfi_escape and the new cfi_val_offset are equal.
2025-05-23 15:05:56 +02:00
Wilco Dijkstra 7ad95d5506 libmvec: Add inputs for asinpi(f), acospi(f), atanpi(f) and atan2pi(f)
Add initial inputs for asinpi(f), acospi(f), atanpi(f) and atan2pi(f) based
on existing asin/acos/atan inputs.

Benchtests now works on the new libmvec function.

Reviewed-by: Yury Khrustalev <yury.khrustalev@arm.com>
2025-05-23 11:27:44 +00:00
Mark Wielaard 7b9881c2c8 INSTALL: Regenerate with texinfo 7.2
This fixes make dist on systems with the latest texinfo installed.
GNU texinfo 7.2 changes @xrefs in proper plain text sentences instead
of pseudo info references.

Tested-By: Collin Funk <collin.funk1@gmail.com>
Reviewed-by: Andreas K. Huettel <dilfridge@gentoo.org>
2025-05-22 17:08:59 +02:00
Florian Weimer 3a3fb2ed83 Fix error reporting (false negatives) in SGID tests
And simplify the interface of support_capture_subprogram_self_sgid.

Use the existing framework for temporary directories (now with
mode 0700) and directory/file deletion.  Handle all execution
errors within support_capture_subprogram_self_sgid.  In particular,
this includes test failures because the invoked program did not
exit with exit status zero.  Existing tests that expect exit
status 42 are adjusted to use zero instead.

In addition, fix callers not to call exit (0) with test failures
pending (which may mask them, especially when running with --direct).

Fixes commit 35fc356fa3
("elf: Fix subprocess status handling for tst-dlopen-sgid (bug 32987)").

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2025-05-22 14:36:37 +02:00
Carlos O'Donell 4052d99ead manual: Use more inclusive language in comments.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-05-21 12:48:25 -04:00
Carlos O'Donell 7f9e894fb8 Makerules: Use 'original' instead of 'master' in source.
Use more inclusive language in makefile source.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-05-21 12:48:04 -04:00
Carlos O'Donell 801d566dde gen-libm-test: Use 'original source' instead of 'master' in code.
Use more inclusive language in generated sources.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-05-21 12:48:00 -04:00
Carlos O'Donell 37a32c243f nss_test1: Use 'parametrized template' instead of 'master' in comment.
Use more inclusive language in code comments.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-05-21 12:47:54 -04:00
Carlos O'Donell 6a9df2a403 linknamespace: Use 'ALLOWLIST' instead of 'WHITELIST' in code.
Use more inclusive language in code.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-05-21 12:47:49 -04:00
Carlos O'Donell 1b71a73500 posix: Use more inclusive language in test data.
Remove Changelog entries that use 'blacklist' or 'master' in the
test data. The test data still contains enough accented characters
to serve the purposes of the posix/tst-regex.c test.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-05-21 12:47:44 -04:00
Carlos O'Donell 078c18d358 pylintrc: Remove obsolete ignore section and comments.
Remove the obsolete ignore=CVS since we use git now.

We make the code more inclusive by removing obsolete comments.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-05-21 12:47:40 -04:00
Florian Weimer 2f769cec44 support: Pick group in support_capture_subprogram_self_sgid if UID == 0
When running as root, it is likely that we can run under any group.
Pick a harmless group from /etc/group in this case.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2025-05-21 16:47:34 +02:00
Andreas Schwab d3e0f63fb9 ldbl-128: also disable lgammaf128_r builtin when building lgammal_r 2025-05-21 14:11:50 +02:00
Florian Weimer 35fc356fa3 elf: Fix subprocess status handling for tst-dlopen-sgid (bug 32987)
This should really move into support_capture_subprogram_self_sgid.

Reviewed-by: Sam James <sam@gentoo.org>
2025-05-21 08:43:32 +02:00
Sunil K Pandey f2aeb6ff94 x86_64: Fix typo in ifunc-impl-list.c.
Fix wcsncpy and wcpncpy typo in ifunc-impl-list.c.

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2025-05-20 16:31:52 -07:00
Florian Weimer d8f7a79335 elf: Test case for bug 32976 (CVE-2025-4802)
Check that LD_LIBRARY_PATH is ignored for AT_SECURE statically
linked binaries, using support_capture_subprogram_self_sgid.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2025-05-20 19:36:02 +02:00
Florian Weimer f0c09fe616 support: Use const char * argument in support_capture_subprogram_self_sgid
The function does not modify the passed-in string, so make this clear
via the prototype.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2025-05-20 19:36:02 +02:00
Wilco Dijkstra 2071666d03 AArch64: Fix typo in math-vector.h
Fix typo atanpi2->atan2pi in math-vector.h.
2025-05-20 13:44:16 +00:00
Andreas Schwab b1f33b2eeb Fix typos in ldbl-opt makefile
The -fno-builtin options need to disable the long double builtins.
2025-05-20 12:42:54 +02:00
Wilco Dijkstra b990b0aee2 AArch64: Cleanup SVE config and defines
Now we finally support modern GCC and binutils, it's time for a cleanup.
Remove HAVE_AARCH64_SVE_ASM define and conditional compilation.  Remove SVE
configure checks for SVE, ACLE and variant-PCS support.

Reviewed-by: Yury Khrustalev <yury.khrustalev@arm.com>
2025-05-20 10:33:55 +00:00
Wilco Dijkstra 2c421fc430 AArch64: Cleanup PAC and BTI
Now we finally support modern GCC and binutils, it's time for a cleanup.
Use PAC and BTI instructions unconditionally and use proper assembler syntax.
Remove the PR target/94791 strip_pac workarounds for buggy GCCs.  Remove the
PAC/BTI configure checks - always emit GNU property notes on assembly files.
Change cfi_window_save to the correct cfi_negate_ra_state unwind directive.

Reviewed-by: Matthieu Longo <matthieu.longo@arm.com>
2025-05-19 15:35:32 +00:00
Dylan Fleming 96abd59bf2 AArch64: Implement AdvSIMD and SVE atan2pi/f
Implement double and single precision variants of the C23 routine atan2pi
for both AdvSIMD and SVE.

Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
2025-05-19 15:35:25 +00:00
Dylan Fleming edf6202815 AArch64: Implement AdvSIMD and SVE atanpi/f
Implement double and single precision variants of the C23 routine atanpi
for both AdvSIMD and SVE.

Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
2025-05-19 15:34:40 +00:00
Dylan Fleming 0ef2cf44e7 AArch64: Implement AdvSIMD and SVE asinpi/f
Implement double and single precision variants of the C23 routine asinpi
for both AdvSIMD and SVE.

Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
2025-05-19 15:33:50 +00:00
Dylan Fleming 993997ca1b AArch64: Implement AdvSIMD and SVE acospi/f
Implement double and single precision variants of the C23 routine acospi
for both AdvSIMD and SVE.

Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
2025-05-19 15:31:59 +00:00
Dylan Fleming 1e84509e00 AArch64: Optimize inverse trig functions
Improve performance of Inverse trig functions by altering how coefficients are
loaded.

Performance improvement on Neoverse V1:
SVE     acos   14%
AdvSIMD acos   6%

AdvSIMD asin   6%
SVE     asin   5%
AdvSIMD asinf  2%

AdvSIMD atanf  22%
SVE     atanf  20%
SVE     atan   11%
AdvSIMD atan   5%

SVE     atan2  7%
SVE     atan2f 4%
AdvSIMD atan2f 3%
AdvSIMD atan2  2%

Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
2025-05-19 14:54:32 +00:00
Carlos O'Donell 1e18586c58 Document CVE-2025-4802.
This commit adds advisory data for the above CVE(s).
2025-05-16 15:17:30 -04:00
Florian Weimer 2745db8dd3 ctype: Fallback initialization of TLS using relocations (bug 19341, bug 32483)
This ensures that the ctype data pointers in TLS are valid
in secondary namespaces even without initialization via
__ctype_init.

Reviewed-by: Frédéric Bérat <fberat@redhat.com>
2025-05-16 19:53:09 +02:00
Florian Weimer e0c0f856f5 Use proper extern declaration for _nl_C_LC_CTYPE_{class,toupper,tolower}
The existing initializers already contain explicit casts.  Keep them
due to int/uint32_t mismatch.

Reviewed-by: Frédéric Bérat <fberat@redhat.com>
2025-05-16 19:53:09 +02:00
Florian Weimer a894f04d87 Optimize __libc_tsd_* thread variable access
These variables are not exported, and libc.so TLS is initial-exec
anyway.  Declare these variables as hidden and use the initial-exec
TLS model.

Reviewed-by: Frédéric Bérat <fberat@redhat.com>
2025-05-16 19:53:09 +02:00
Florian Weimer 10a66a8e42 Remove <libc-tsd.h>
Use __thread variables directly instead.  The macros do not save any
typing.  It seems unlikely that a future port will lack __thread
variable support.

Some of the __libc_tsd_* variables are referenced from assembler
files, so keep their names.  Previously, <libc-tls.h> included
<tls.h>, which in turn included <errno.h>, so a few direct includes
of <errno.h> are now required.

Reviewed-by: Frédéric Bérat <fberat@redhat.com>
2025-05-16 19:53:09 +02:00
DJ Delorie 579f866881 manual: add sched_getcpu()
Reviewed-by: Collin Funk <collin.funk1@gmail.com>
2025-05-16 13:16:08 -04:00