Commit Graph

41395 Commits

Author SHA1 Message Date
Julian Zhu
32328a5a14 MIPS: Regenerate ulps
From new tests added by 4dc22baa84.

Signed-off-by: Julian Zhu <jz531210@gmail.com>
2024-07-27 16:55:38 +02:00
Florian Weimer
a57cbbd853 malloc: Link threading tests with $(shared-thread-library)
Fixes build failures on Hurd.
2024-07-27 16:46:49 +02:00
Noah Goldstein
f6f9047459 assert: Mark __assert_fail as cold
This helps compilers split the codegen for setting up the arguments
(`__expression`, `__filename`, etc...) from the potentially hot cold
where the `assert` is to a presumably cold region on the assertion
failure path.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
Reviewed-by: Sam James <sam@gentoo.org>
2024-07-26 20:41:00 +08:00
Maciej W. Rozycki
89cddc8a70 stdio-common: Add test for vfscanf with matches longer than INT_MAX [BZ #27650]
Complement commit b03e4d7bd2 ("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>
2024-07-26 13:21:34 +01:00
Maciej W. Rozycki
1b97a9f23b 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>
2024-07-26 13:21:34 +01:00
Maciej W. Rozycki
fe47595504 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>
2024-07-26 13:21:34 +01:00
Maciej W. Rozycki
8c98195af6 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>
2024-07-26 13:21:34 +01:00
Adhemerval Zanella
fe94080875 sparc: Regenerate ULPs
From new tests added by 4dc22baa84.
2024-07-25 11:06:53 -03:00
Adhemerval Zanella
65e267dcdd i386: Regenerate ULPs
From new tests added by 4dc22baa84.
2024-07-25 10:49:06 -03:00
Adhemerval Zanella
cc84f11282 arm: Regenerate ULPs
From new tests added by 4dc22baa84.
2024-07-25 10:41:34 -03:00
Adhemerval Zanella
cfc9b07346 aarch64: Regenerate ULPs
From new tests added by 4dc22baa84.
2024-07-25 10:41:30 -03:00
Adhemerval Zanella
fa00661082 powerpc: Regenerate ULPs for soft-fp
From new tests added by 4dc22baa84.
2024-07-25 10:33:40 -03:00
jeevitha
4e40c8104f powerpc: Update ulps for fpu
Adjust the ULPs for the log2p1 implementation.
2024-07-25 10:28:47 -03:00
Khem Raj
ff03b5efe6 riscv: Update ulps
Generated with make regen-ulps using gcc14 on a visionfive2 SBC.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-07-25 10:28:44 -03:00
Stefan Liebler
22958014ab s390x: Regenerate ULPs.
Needed due to:
"This patch adds larger ulp errors for the log2p1 function."
commit 4dc22baa84
2024-07-25 14:14:22 +02:00
H.J. Lu
8344c1f551 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>
2024-07-25 00:17:21 -07:00
H.J. Lu
652c6cf269 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>
2024-07-25 00:17:21 -07:00
John David Anglin
431c1be28e hppa: Update libm-test-ulps 2024-07-24 16:43:01 -04:00
Florian Weimer
90842d3980 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>
2024-07-24 12:50:17 +02:00
Florian Weimer
765325951a resolv: Implement strict-error stub resolver option (bug 27929)
For now, do not enable this mode by default due to the potential
impact on compatibility with existing deployments.

Reviewed-by: DJ Delorie <dj@redhat.com>
2024-07-24 12:10:37 +02:00
Florian Weimer
95f61610f3 resolv: Support clearing option flags with a “-” prefix (bug 14799)
I think using a “-” prefix is less confusing than introducing
double-negation construct (“no-no-tld-query”).

Reviewed-by: DJ Delorie <dj@redhat.com>
2024-07-24 12:07:45 +02:00
Florian Weimer
af625987d6 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>
2024-07-24 12:07:24 +02:00
Florian Weimer
691a3b2e9b resolv: Allow short error responses to match any query (bug 31890)
Reviewed-by: DJ Delorie <dj@redhat.com>
2024-07-24 12:07:04 +02:00
Miguel Martín
b0fbcb7d00 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>
2024-07-22 11:54:46 +02:00
Miguel Martín
9a27b566b2 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>
2024-07-22 11:54:46 +02:00
Paul Zimmermann
4dc22baa84 This patch adds larger ulp errors for the log2p1 function.
Changes in v2:
- added larger error for long double on AMD reported by Adhemerval
  (https://sourceware.org/pipermail/libc-alpha/2024-June/157755.html)

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2024-07-22 08:54:23 +02:00
Andreas K. Hüttel
b64d0f0ec3
NEWS: Add new section
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
2024-07-21 18:50:57 +02:00
Andreas K. Hüttel
51706101e7
Increase version number to 2.40.9000
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
2024-07-21 18:49:35 +02:00
Andreas K. Hüttel
3d1aed8749
Add ChangeLog file
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
2024-07-21 18:33:37 +02:00
Andreas K. Hüttel
89d3d815ef
Increase version number to 2.40
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
2024-07-21 18:23:25 +02:00
Andreas K. Hüttel
6f14eb1b17
po/*: regenerate (only line number changes)
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
2024-07-21 17:50:35 +02:00
Andreas K. Hüttel
668e14a304
contrib.texi: Fix format of MIPS and RISC-V
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
2024-07-21 14:12:54 +02:00
Andreas K. Hüttel
256574679f
libc.pot: regenerate (only line number changes)
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
2024-07-21 00:33:43 +02:00
Andreas K. Hüttel
92eb4a10ae
install.texi: bump "latest verified" versions
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
2024-07-21 00:27:35 +02:00
Andreas K. Hüttel
d36b481476
NEWS: drop 2.40 section "Changes to build and runtime requirements"
Can't find anything that should go here.

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
2024-07-20 23:42:05 +02:00
Andreas K. Hüttel
5dc1408bb5
contrib.texi: update
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
2024-07-20 19:47:52 +02:00
Andreas K. Hüttel
391d9041f0
NEWS: add fixed security advisories list
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
2024-07-20 18:55:07 +02:00
Andreas K. Hüttel
ad6e85aad5
NEWS: add resolved bugs list
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
2024-07-20 18:52:15 +02:00
Andreas K. Hüttel
fa455c3b5d
NEWS: add more major improvements for 2.40
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
2024-07-20 16:22:54 +02:00
Andreas K. Hüttel
ab5748118f
linux: Trivial test output fix in tst-pkey
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
2024-07-19 22:57:23 +02:00
Adhemerval Zanella
4f047d9ede
elf: Fix localplt.awk for DT_RELR-enabled builds (BZ 31978)
For each input readelf output, localplt.awk parses each 'Relocation
section' entry, checks its offset against the dynamic section entry, and
saves each DT_JMPREL, DT_RELA, and DT_REL offset value it finds. After
all lines are read, the script checks if any segment offset differed
from 0, meaning at least one 'Relocation section' was matched.

However, if the shared object was built with RELR support and the static
linker could place all the relocation on DT_RELR, there would be no
DT_JMPREL, DT_RELA, and DT_REL entries; only a DT_RELR.

For the current three ABIs that support (aarch64, x86, and powerpc64),
the powerpc64 ld.so shows the behavior above. Both x86_64 and aarch64
show extra relocations on '.rela.dyn', which makes the script check to
succeed.

This patch fixes by handling DT_RELR, where the offset is checked
against the dynamic section entries and if the shared object contains an
entry it means that there are no extra PLT entries (since all
relocations are relative).

It fixes the elf/check-localplt failure on powerpc.

Checked with a build/check for aarch64-linux-gnu, x86_64-linux-gnu,
i686-linux-gnu, arm-linux-gnueabihf, s390x-linux-gnu, powerpc-linux-gnu,
powerpc64-linux-gnu, and powerpc64le-linux-gnu.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2024-07-19 22:50:26 +02:00
Adhemerval Zanella
6b7e2e1d61
linux: Also check pkey_get for ENOSYS on tst-pkey (BZ 31996)
The powerpc pkey_get/pkey_set support was only added for 64-bit [1],
and tst-pkey only checks if the support was present with pkey_alloc
(which does not fail on powerpc32, at least running a 64-bit kernel).

Checked on powerpc-linux-gnu.

[1] https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a803367bab167f5ec4fde1f0d0ec447707c29520
Reviewed-By: Andreas K. Huettel <dilfridge@gentoo.org>
2024-07-19 22:39:44 +02:00
Adhemerval Zanella
e0f7da7235
powerpc: Update soft-fp ulps
Results based on regen-ulps using gcc 11.2.1 on a POWER8 machine.
2024-07-19 19:29:35 +02:00
John David Anglin
8cfa4ecff2 Fix usage of _STACK_GROWS_DOWN and _STACK_GROWS_UP defines [BZ 31989]
Signed-off-by: John David Anglin <dave.anglin@bell.net>
Reviewed-By: Andreas K. Hüttel <dilfridge@gentoo.org>
2024-07-19 10:10:17 -04:00
Florian Weimer
91eb62d638 Adjust check-local-headers test for libaudit 4.0
The new version introduces /usr/include/audit_logging.h and
/usr/include/audit-records.h.
2024-07-19 15:57:46 +02:00
Adhemerval Zanella
3c354d62f5 elf: Parse the auxv values as unsigned on tst-tunables-enable_secure-env.c (BZ 31890)
AT_HWCAP on some architecture can indeed use all bits.

Checked on x86_64-linux-gnu and powerpc-linux-gnu.
Reviewed-By: Andreas K. Hüttel <dilfridge@gentoo.org>
2024-07-19 08:50:38 -03:00
H.J. Lu
66f2cd6e1a
x32: xfail elf/tst-platform-1 [BZ #22363]
Xfail elf/tst-platform-1 on x32 since kernel passes i686 in AT_PLATFORM.
See https://sourceware.org/bugzilla/show_bug.cgi?id=22363

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
2024-07-19 10:34:38 +02:00
Xi Ruoyao
d905183f0b elf/tst-rtld-does-not-exist: Pass --inhibit-cache to rtld
This avoids a test failure when the system has no /etc/ld.so.cache.

Tested on x86_64-linux-gnu.

Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2024-07-19 01:15:53 -07:00
Andreas K. Hüttel
910aae6e5a
Revert "LoongArch: Add cfi instructions for _dl_tlsdesc_dynamic"
We're in freeze for the 2.40 release.

This reverts commit 43224b1379.

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
2024-07-17 15:24:51 +02:00
Samuel Thibault
6ed76f4efc htl: Fix __pthread_init_thread declaration and definition
0e75c4a463 ("hurd: Fix pthread_self() without libpthread") added a
declaration for ___pthread_init_thread instead of __pthread_init_thread,
and missed defining the external hidden symbol.
2024-07-17 15:04:25 +02:00