]> sourceware.org Git - glibc.git/log
glibc.git
14 months agohtl: move pthread_attr_setinheritsched into libc
Guy-Fleury Iteriteka [Sun, 16 Jul 2023 08:44:10 +0000 (10:44 +0200)]
htl: move pthread_attr_setinheritsched into libc

Signed-off-by: Guy-Fleury Iteriteka <gfleury@disroot.org>
Message-Id: <20230716084414.107245-7-gfleury@disroot.org>

14 months agohtl: move pthread_attr_getinheritsched into libc
Guy-Fleury Iteriteka [Sun, 16 Jul 2023 08:44:09 +0000 (10:44 +0200)]
htl: move pthread_attr_getinheritsched into libc

Signed-off-by: Guy-Fleury Iteriteka <gfleury@disroot.org>
Message-Id: <20230716084414.107245-6-gfleury@disroot.org>

14 months agohtl: move pthread_attr_getschedparam into libc
Guy-Fleury Iteriteka [Sun, 16 Jul 2023 08:44:08 +0000 (10:44 +0200)]
htl: move pthread_attr_getschedparam into libc

Signed-off-by: Guy-Fleury Iteriteka <gfleury@disroot.org>
Message-Id: <20230716084414.107245-5-gfleury@disroot.org>

14 months agohtl: move pthread_setschedparam into libc
Guy-Fleury Iteriteka [Sun, 16 Jul 2023 08:44:07 +0000 (10:44 +0200)]
htl: move pthread_setschedparam into libc

Signed-off-by: Guy-Fleury Iteriteka <gfleury@disroot.org>
Message-Id: <20230716084414.107245-4-gfleury@disroot.org>

14 months agohtl: move pthread_getschedparam into libc
Guy-Fleury Iteriteka [Sun, 16 Jul 2023 08:44:06 +0000 (10:44 +0200)]
htl: move pthread_getschedparam into libc

Signed-off-by: Guy-Fleury Iteriteka <gfleury@disroot.org>
Message-Id: <20230716084414.107245-3-gfleury@disroot.org>

14 months agohtl: move pthread_equal into libc
Guy-Fleury Iteriteka [Sun, 16 Jul 2023 08:44:05 +0000 (10:44 +0200)]
htl: move pthread_equal into libc

Signed-off-by: Guy-Fleury Iteriteka <gfleury@disroot.org>
Message-Id: <20230716084414.107245-2-gfleury@disroot.org>

14 months agoLinux: Avoid conflicting types in ld.so --list-diagnostics
Florian Weimer [Fri, 4 Aug 2023 10:44:01 +0000 (12:44 +0200)]
Linux: Avoid conflicting types in ld.so --list-diagnostics

The path auxv[*].a_val could either be an integer or a string,
depending on the a_type value.  Use a separate field, a_val_string, to
simplify mechanical parsing of the --list-diagnostics output.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
14 months agoelf: Do not run constructors for proxy objects
Florian Weimer [Tue, 22 Aug 2023 11:56:25 +0000 (13:56 +0200)]
elf: Do not run constructors for proxy objects

Otherwise, the ld.so constructor runs for each audit namespace
and each dlmopen namespace.

14 months agox86_64: Add log1p with FMA
H.J. Lu [Thu, 17 Aug 2023 16:42:29 +0000 (09:42 -0700)]
x86_64: Add log1p with FMA

On Skylake, it changes log1p bench performance by:

        Before       After     Improvement
max     63.349       58.347       8%
min     4.448        5.651        -30%
mean    12.0674      10.336       14%

The minimum code path is

 if (hx < 0x3FDA827A)                          /* x < 0.41422  */
    {
      if (__glibc_unlikely (ax >= 0x3ff00000))           /* x <= -1.0 */
        {
   ...
        }
      if (__glibc_unlikely (ax < 0x3e200000))           /* |x| < 2**-29 */
        {
          math_force_eval (two54 + x);          /* raise inexact */
          if (ax < 0x3c900000)                  /* |x| < 2**-54 */
            {
      ...
            }
          else
            return x - x * x * 0.5;

FMA and non-FMA code sequences look similar.  Non-FMA version is slightly
faster.  Since log1p is called by asinh and atanh, it improves asinh
performance by:

        Before       After     Improvement
max     75.645       63.135       16%
min     10.074       10.071       0%
mean    15.9483      14.9089      6%

and improves atanh performance by:

        Before       After     Improvement
max     91.768       75.081       18%
min     15.548       13.883       10%
mean    18.3713      16.8011      8%

14 months agoRemove references to the defunct db2 subdir
Andreas Schwab [Fri, 18 Aug 2023 19:10:29 +0000 (21:10 +0200)]
Remove references to the defunct db2 subdir

The db2 subdir has been removed more than 20 years ago.

14 months agostring: Fix tester build with fortify enable with gcc < 12
Mahesh Bodapati [Fri, 11 Aug 2023 15:38:25 +0000 (10:38 -0500)]
string: Fix tester build with fortify enable with gcc < 12

When building with fortify enabled, GCC < 12 issues a warning on the
fortify strncat wrapper might overflow the destination buffer (the
failure is tied to -Werror).

Checked on ppc64 and x86_64.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
14 months agos390x: Fix static PIE condition for toolchain bootstrapping.
Stefan Liebler [Mon, 14 Aug 2023 12:22:24 +0000 (14:22 +0200)]
s390x: Fix static PIE condition for toolchain bootstrapping.

The static PIE configure check uses link tests.  When bootstrapping
a cross-toolchain, the link tests fail due to missing crt-files /
libc.so.  As we explicitely want to test an issue in binutils (ld),
we now also explicitely check for known linker versions.

See also commit 368b7c614b102122b86af3953daea2b30230d0a8
S390: Use compile-only instead of also link-tests in configure.

14 months agom68k: fix __mpn_lshift and __mpn_rshift for non-68020
Andreas Schwab [Thu, 17 Aug 2023 15:15:34 +0000 (17:15 +0200)]
m68k: fix __mpn_lshift and __mpn_rshift for non-68020

From revision 03f3d275d0d6 in the gmp repository.

14 months agosysdeps: tst-bz21269: fix -Wreturn-type
Sam James [Thu, 17 Aug 2023 08:30:29 +0000 (09:30 +0100)]
sysdeps: tst-bz21269: fix -Wreturn-type

Thanks to Andreas Schwab for reporting.

Fixes: 652b9fdb77d9fd056d4dd26dad2c14142768ab49
Signed-off-by: Sam James <sam@gentoo.org>
14 months agoLoongarch: Add ifunc support for memcpy{aligned, unaligned, lsx, lasx} and memmove...
dengjianbo [Tue, 15 Aug 2023 01:11:53 +0000 (09:11 +0800)]
Loongarch: Add ifunc support for memcpy{aligned, unaligned, lsx, lasx} and memmove{aligned, unaligned, lsx, lasx}

These implementations improve the time to copy data in the glibc
microbenchmark as below:
memcpy-lasx       reduces the runtime about 8%-76%
memcpy-lsx        reduces the runtime about 8%-72%
memcpy-unaligned  reduces the runtime of unaligned data copying up to 40%
memcpy-aligned    reduece the runtime of unaligned data copying up to 25%
memmove-lasx      reduces the runtime about 20%-73%
memmove-lsx       reduces the runtime about 50%
memmove-unaligned reduces the runtime of unaligned data moving up to 40%
memmove-aligned   reduces the runtime of unaligned data moving up to 25%

14 months agoLoongarch: Add ifunc support for strchr{aligned, lsx, lasx} and strchrnul{aligned...
dengjianbo [Tue, 15 Aug 2023 01:08:11 +0000 (09:08 +0800)]
Loongarch: Add ifunc support for strchr{aligned, lsx, lasx} and strchrnul{aligned, lsx, lasx}

These implementations improve the time to run strchr{nul}
microbenchmark in glibc as below:
strchr-lasx       reduces the runtime about 50%-83%
strchr-lsx        reduces the runtime about 30%-67%
strchr-aligned    reduces the runtime about 10%-20%
strchrnul-lasx    reduces the runtime about 50%-83%
strchrnul-lsx     reduces the runtime about 36%-65%
strchrnul-aligned reduces the runtime about 6%-10%

14 months agosysdeps: tst-bz21269: handle ENOSYS & skip appropriately
Sam James [Fri, 4 Aug 2023 23:04:33 +0000 (00:04 +0100)]
sysdeps: tst-bz21269: handle ENOSYS & skip appropriately

SYS_modify_ldt requires CONFIG_MODIFY_LDT_SYSCALL to be set in the kernel, which
some distributions may disable for hardening. Check if that's the case (unset)
and mark the test as UNSUPPORTED if so.

Reviewed-by: DJ Delorie <dj@redhat.com>
Signed-off-by: Sam James <sam@gentoo.org>
14 months agosysdeps: tst-bz21269: fix test parameter
Sam James [Fri, 4 Aug 2023 22:58:27 +0000 (23:58 +0100)]
sysdeps: tst-bz21269: fix test parameter

All callers pass 1 or 0x11 anyway (same meaning according to man page),
but still.

Reviewed-by: DJ Delorie <dj@redhat.com>
Signed-off-by: Sam James <sam@gentoo.org>
14 months agohurd: Fix strictness of <mach/thread_state.h>
Samuel Thibault [Tue, 15 Aug 2023 22:12:33 +0000 (00:12 +0200)]
hurd: Fix strictness of <mach/thread_state.h>

Fixes: db25bc52026f ("hurd: Add prototype for and thus fix _hurdsig_abort_rpcs call")
14 months agohurd: Add prototype for and thus fix _hurdsig_abort_rpcs call
Samuel Thibault [Tue, 15 Aug 2023 20:41:23 +0000 (22:41 +0200)]
hurd: Add prototype for and thus fix _hurdsig_abort_rpcs call

This was actually not a problem since NULL was getting passed.

14 months agoio/tst-statvfs: fix statfs().f_type comparison test on some arches
наб [Tue, 15 Aug 2023 13:07:59 +0000 (15:07 +0200)]
io/tst-statvfs: fix statfs().f_type comparison test on some arches

On i686 f_type is an i32 so the test fails when that has the top bit set.

Explicitly cast to u32.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
14 months agofxprintf: Get rid of alloca
Joe Simmons-Talbott [Tue, 15 Aug 2023 14:28:25 +0000 (14:28 +0000)]
fxprintf: Get rid of alloca

Use a scratch_buffer rather than alloca/malloc to avoid potential stack
overflow.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
14 months agoconfigure: Add -Wall again to the default CFLAGS
Florian Weimer [Mon, 14 Aug 2023 11:48:01 +0000 (13:48 +0200)]
configure: Add -Wall again to the default CFLAGS

Commit 78ceef25d64efeeb6067d1cb282a00466e637e2a ("configure: Remove
--enable-all-warnings option") removed it due to a missing +.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
14 months agomalloc: Remove bin scanning from memalign (bug 30723)
Florian Weimer [Thu, 10 Aug 2023 17:36:56 +0000 (19:36 +0200)]
malloc: Remove bin scanning from memalign (bug 30723)

On the test workload (mpv --cache=yes with VP9 video decoding), the
bin scanning has a very poor success rate (less than 2%).  The tcache
scanning has about 50% success rate, so keep that.

Update comments in malloc/tst-memalign-2 to indicate the purpose
of the tests.  Even with the scanning removed, the additional
merging opportunities since commit 542b1105852568c3ebc712225ae78b
("malloc: Enable merging of remainders in memalign (bug 30723)")
are sufficient to pass the existing large bins test.

Remove leftover variables from _int_free from refactoring in the
same commit.

Reviewed-by: DJ Delorie <dj@redhat.com>
14 months agoresolv/nss_dns/dns-host: Get rid of alloca.
Joe Simmons-Talbott [Mon, 14 Aug 2023 20:50:40 +0000 (20:50 +0000)]
resolv/nss_dns/dns-host: Get rid of alloca.

Since the alloca is a small constant size use an array instead.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
14 months agox86_64: Add expm1 with FMA
H.J. Lu [Fri, 11 Aug 2023 15:04:08 +0000 (08:04 -0700)]
x86_64: Add expm1 with FMA

On Skylake, it improves expm1 bench performance by:

        Before       After     Improvement
max     70.204       68.054       3%
min     20.709       16.2         22%
mean    22.1221      16.7367      24%

NB: Add

extern long double __expm1l (long double);
extern long double __expm1f128 (long double);

for __typeof (__expm1l) and __typeof (__expm1f128) when __expm1 is
defined since __expm1 may be expanded in their declarations which
causes the build failure.

14 months agoLoongArch: elf: Add new LoongArch reloc types 109 into elf.h
caiyinyu [Mon, 14 Aug 2023 07:34:08 +0000 (15:34 +0800)]
LoongArch: elf: Add new LoongArch reloc types 109 into elf.h

These reloc types are generated by GNU assembler >= 2.41 for relaxation
support.

14 months agoelf: Add new LoongArch reloc types (101 to 108) into elf.h
Xi Ruoyao [Wed, 9 Aug 2023 11:12:54 +0000 (19:12 +0800)]
elf: Add new LoongArch reloc types (101 to 108) into elf.h

These reloc types are generated by GNU assembler >= 2.41 for relaxation
support.

Link: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=57a930e3
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
14 months agoLoongarch: Add ifunc support and add different versions of strlen
dengjianbo [Tue, 8 Aug 2023 06:15:44 +0000 (14:15 +0800)]
Loongarch: Add ifunc support and add different versions of strlen

strlen-lasx is implemeted by LASX simd instructions(256bit)
strlen-lsx is implemeted by LSX simd instructions(128bit)
strlen-align is implemented by LA basic instructions and never use unaligned memory acess

14 months agoLoongArch: Add minuimum binutils required version
dengjianbo [Tue, 8 Aug 2023 06:15:43 +0000 (14:15 +0800)]
LoongArch: Add minuimum binutils required version

LoongArch glibc can add some LASX/LSX vector instructions codes,
change the required minimum binutils version to 2.41 which could
support vector instructions. HAVE_LOONGARCH_VEC_ASM is removed
accordingly.

14 months agoLoongArch: Redefine macro LEAF/ENTRY.
dengjianbo [Tue, 8 Aug 2023 06:15:42 +0000 (14:15 +0800)]
LoongArch: Redefine macro LEAF/ENTRY.

The following usage of macro LEAF/ENTRY are all feasible:
1. LEAF(fcn) -- the align value of fcn is .align 3(default value)
2. LEAF(fcn, 6) -- the align value of fcn is .align 6

14 months agox86: Fix incorrect scope of setting `shared_per_thread` [BZ# 30745]
Noah Goldstein [Fri, 11 Aug 2023 00:28:24 +0000 (19:28 -0500)]
x86: Fix incorrect scope of setting `shared_per_thread` [BZ# 30745]

The:

```
    if (shared_per_thread > 0 && threads > 0)
      shared_per_thread /= threads;
```

Code was accidentally moved to inside the else scope.  This doesn't
match how it was previously (before af992e7abd).

This patch fixes that by putting the division after the `else` block.

14 months agox86_64: Add log2 with FMA
H.J. Lu [Thu, 10 Aug 2023 18:24:30 +0000 (11:24 -0700)]
x86_64: Add log2 with FMA

On Skylake, it improves log2 bench performance by:

        Before       After     Improvement
max     208.779      63.827       69%
min     9.977        6.55         34%
mean    10.366       6.8191       34%

14 months agomalloc: Enable merging of remainders in memalign (bug 30723)
Florian Weimer [Fri, 11 Aug 2023 09:18:17 +0000 (11:18 +0200)]
malloc: Enable merging of remainders in memalign (bug 30723)

Previously, calling _int_free from _int_memalign could put remainders
into the tcache or into fastbins, where they are invisible to the
low-level allocator.  This results in missed merge opportunities
because once these freed chunks become available to the low-level
allocator, further memalign allocations (even of the same size are)
likely obstructing merges.

Furthermore, during forwards merging in _int_memalign, do not
completely give up when the remainder is too small to serve as a
chunk on its own.  We can still give it back if it can be merged
with the following unused chunk.  This makes it more likely that
memalign calls in a loop achieve a compact memory layout,
independently of initial heap layout.

Drop some useless (unsigned long) casts along the way, and tweak
the style to more closely match GNU on changed lines.

Reviewed-by: DJ Delorie <dj@redhat.com>
14 months agonscd: Do not rebuild getaddrinfo (bug 30709)
Florian Weimer [Fri, 11 Aug 2023 08:10:16 +0000 (10:10 +0200)]
nscd: Do not rebuild getaddrinfo (bug 30709)

The nscd daemon caches hosts data from NSS modules verbatim, without
filtering protocol families or sorting them (otherwise separate caches
would be needed for certain ai_flags combinations).  The cache
implementation is complete separate from the getaddrinfo code.  This
means that rebuilding getaddrinfo is not needed.  The only function
actually used is __bump_nl_timestamp from check_pf.c, and this change
moves it into nscd/connections.c.

Tested on x86_64-linux-gnu with -fexceptions, built with
build-many-glibcs.py.  I also backported this patch into a distribution
that still supports nscd and verified manually that caching still works.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
14 months agox86_64: Sort fpu/multiarch/Makefile
H.J. Lu [Wed, 9 Aug 2023 18:08:52 +0000 (11:08 -0700)]
x86_64: Sort fpu/multiarch/Makefile

Sort Makefile variables using scripts/sort-makefile-lines.py.

No code generation changes observed in libm.  No regressions on x86_64.

14 months agoi686: Fix build with --disable-multiarch
Adhemerval Zanella [Tue, 8 Aug 2023 12:27:55 +0000 (09:27 -0300)]
i686: Fix build with --disable-multiarch

Since i686 provides the fortified wrappers for memcpy, mempcpy,
memmove, and memset on the same string implementation, the static
build tries to optimized it by not tying the fortified wrappers
to string routine (to avoid pulling the fortify function if
they are not required).

Checked on i686-linux-gnu building with different option:
default and --disable-multi-arch plus default, --disable-default-pie,
--enable-fortify-source={2,3}, and --enable-fortify-source={2,3}
with --disable-default-pie.
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
14 months agox86_64: Fix build with --disable-multiarch (BZ 30721)
Adhemerval Zanella [Tue, 8 Aug 2023 12:27:54 +0000 (09:27 -0300)]
x86_64: Fix build with --disable-multiarch (BZ 30721)

With multiarch disabled, the default memmove implementation provides
the fortify routines for memcpy, mempcpy, and memmove.  However, it
does not provide the internal hidden definitions used when building
with fortify enabled.  The memset has a similar issue.

Checked on x86_64-linux-gnu building with different options:
default and --disable-multi-arch plus default, --disable-default-pie,
--enable-fortify-source={2,3}, and --enable-fortify-source={2,3}
with --disable-default-pie.
Tested-by: Andreas K. Huettel <dilfridge@gentoo.org>
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
15 months agoAdd PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG etc. from Linux 6.4 to sys/ptrace.h
Joseph Myers [Tue, 8 Aug 2023 14:38:22 +0000 (14:38 +0000)]
Add PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG etc. from Linux 6.4 to sys/ptrace.h

Linux 6.4 adds new constants PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG
and PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG.  Add those to all
relevant sys/ptrace.h headers, along with adding the associated
argument structure to bits/ptrace-shared.h (named struct
__ptrace_sud_config there following the usual convention for such
structures).

Tested for x86_64 and with build-many-glibcs.py.

15 months agoAdd PACKET_VNET_HDR_SZ from Linux 6.4 to netpacket/packet.h
Joseph Myers [Tue, 8 Aug 2023 14:37:45 +0000 (14:37 +0000)]
Add PACKET_VNET_HDR_SZ from Linux 6.4 to netpacket/packet.h

Linux 6.4 adds a new constant PACKET_VNET_HDR_SZ; add it to glibc's
netpacket/packet.h.

Tested for x86_64.

15 months agohurd: Make error_t an int in C++
Samuel Thibault [Tue, 8 Aug 2023 14:03:24 +0000 (16:03 +0200)]
hurd: Make error_t an int in C++

Making error_t defined to enum __error_t_codes conveniently makes the
debugger print symbolic values, but in C++ int is not interoperable with
enum __error_t_codes, leading to C++ application build issues, so let's
revert error_t to int in C++.

15 months agoUse binutils 2.41 branch in build-many-glibcs.py
Joseph Myers [Tue, 8 Aug 2023 12:53:50 +0000 (12:53 +0000)]
Use binutils 2.41 branch in build-many-glibcs.py

This patch makes build-many-glibcs.py use binutils 2.41 branch.

Tested with build-many-glibcs.py (host-libraries, compilers and glibcs
builds).

15 months agolinux: statvfs: allocate spare for f_type
наб [Sun, 6 Aug 2023 20:23:36 +0000 (22:23 +0200)]
linux: statvfs: allocate spare for f_type

This is the only missing part in struct statvfs.
The LSB calls [f]statfs() deprecated, and its weird types are definitely
off-putting. However, its use is required to get f_type.

Instead, allocate one of the six spares to f_type,
copied directly from struct statfs.
This then becomes a small glibc extension to the standard interface
on Linux and the Hurd, instead of two different interfaces, one of which
is quite odd due to being an ABI type, and there no longer is any reason
to use statfs().

The underlying kernel type is a mess, but all architectures agree on u32
(or more) for the ABI, and all filesystem magicks are 32-bit integers.
We don't lose any generality by using u32, and by doing so we both make
the API consistent with the Hurd, and allow C++
  switch(f_type) { case RAMFS_MAGIC: ...; }

Also fix tst-statvfs so that it actually fails;
as it stood, all it did was return 0 always.
Test statfs()' and statvfs()' f_types are the same.

Link: https://lore.kernel.org/linux-man/f54kudgblgk643u32tb6at4cd3kkzha6hslahv24szs4raroaz@ogivjbfdaqtb/t/#u
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
15 months agohurd: statvfs: __f_type -> f_type
наб [Sun, 6 Aug 2023 20:23:24 +0000 (22:23 +0200)]
hurd: statvfs: __f_type -> f_type

No further changes needed ([f]statvfs() just cast to struct statfs *
and call [f]statfs()).

Link: https://lore.kernel.org/linux-man/f54kudgblgk643u32tb6at4cd3kkzha6hslahv24szs4raroaz@ogivjbfdaqtb/t/#u
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
15 months agohtl: Initialize ___pthread_self early
Samuel Thibault [Tue, 8 Aug 2023 10:19:29 +0000 (12:19 +0200)]
htl: Initialize ___pthread_self early

When using jemalloc, malloc() needs to use TSD, while libpthread
initialization needs malloc(). Having ___pthread_self set early to some
static storage allows TSD to work early, thus allowing jemalloc and
libpthread to initialize together.

This incidentaly simplifies __pthread_enable/disable_asynccancel and
__pthread_self, now that ___pthread_self is always initialized.

15 months agohtl: Add support for static TSD data
Samuel Thibault [Tue, 8 Aug 2023 10:10:06 +0000 (12:10 +0200)]
htl: Add support for static TSD data

When using jemalloc, malloc() needs to use TSD, while libpthread
initialization needs malloc(). Supporting a static TSD area allows jemalloc
and libpthread to initialize together.

15 months agox86: Fix for cache computation on AMD legacy cpus.
Sajan Karumanchi [Tue, 1 Aug 2023 15:20:55 +0000 (15:20 +0000)]
x86: Fix for cache computation on AMD legacy cpus.

Some legacy AMD CPUs and hypervisors have the _cpuid_ '0x8000_001D'
set to Zero, thus resulting in zeroed-out computed cache values.
This patch reintroduces the old way of cache computation as a
fail-safe option to handle these exceptions.
Fixed 'level4_cache_size' value through handle_amd().

Reviewed-by: Premachandra Mallappa <premachandra.mallappa@amd.com>
Tested-by: Florian Weimer <fweimer@redhat.com>
15 months agohurd: Rework generating errno.h
Samuel Thibault [Sun, 6 Aug 2023 20:32:46 +0000 (20:32 +0000)]
hurd: Rework generating errno.h

We only need to give to gawk the headers that actually define error
numbers, so let's rather filter out the other included headers early.

15 months agopowerpc longjmp: Fix build after chk hidden builtin fix
Samuel Thibault [Fri, 4 Aug 2023 08:01:11 +0000 (10:01 +0200)]
powerpc longjmp: Fix build after chk hidden builtin fix

04bf7d2d8a79 ("chk: Add and fix hidden builtin definitions for *_chk")
added an #undef for longjmp and siglongjmp to compensate for the
definition in include/setjmp.h, but missed doing so for the powerpc
version too.

Fixes: 04bf7d2d8a79 ("chk: Add and fix hidden builtin definitions for
*_chk")

15 months agoLoongArch: Fix static PIE condition for toolchain bootstrapping.
Yang Yujie [Thu, 3 Aug 2023 08:35:24 +0000 (16:35 +0800)]
LoongArch: Fix static PIE condition for toolchain bootstrapping.

This patch allows the static PIE startfile rcrt1.o to be built
without requiring libgcc_s.so from GCC, which depends on libc
in the first place.

15 months agochk: Add and fix hidden builtin definitions for *_chk
Samuel Thibault [Thu, 3 Aug 2023 19:16:41 +0000 (21:16 +0200)]
chk: Add and fix hidden builtin definitions for *_chk

Otherwise on gnu-i686 there are unwanted PLT entries in libc.so when
fortification is enabled.

Tested for i686-gnu, x86_64-gnu, i686-linux-gnu and x86_64-linux-gnu

15 months agotst-realpath-toolong: return "unsupported" when PATH_MAX is undefined
Samuel Thibault [Thu, 3 Aug 2023 19:16:16 +0000 (21:16 +0200)]
tst-realpath-toolong: return "unsupported" when PATH_MAX is undefined

When PATH_MAX is undefined, realpath cannot ever ENAMETOOLONG, so
this test is unsupported.

15 months agoSubject: hurd: Make __realpath return EINVAL on NULL buf
Samuel Thibault [Thu, 3 Aug 2023 19:15:58 +0000 (21:15 +0200)]
Subject: hurd: Make __realpath return EINVAL on NULL buf

As Posix and stdlib/test-canon.c expects it, and rather than letting
pathconf crash.

15 months agotst-*glob*: Do not check d_name size
Samuel Thibault [Thu, 3 Aug 2023 19:15:39 +0000 (21:15 +0200)]
tst-*glob*: Do not check d_name size

Posix says that d_name is of unspecified size, and sizeof(d_name)
should not be used. It is indeed only 1-byte long in bits/dirent.h. We
can instead explictly provide the actual allocated size to
__strcpy_chk.

15 months agohurd: Do not include full <stdarg.h> in <hurd.h>
Florian Weimer [Mon, 31 Jul 2023 10:38:12 +0000 (12:38 +0200)]
hurd: Do not include full <stdarg.h> in <hurd.h>

This fixes a hurd/check-installed-headers-c failure with
-std=c89 #define _FORTIFY_SOURCE 1:

In file included from ../hurd/hurd.h:354,
                 from ../sysdeps/hurd/include/hurd.h:2,
                 from /tmp/cih_test_9IaUwa.c:10:
/home/bmg/install/compilers/i686-gnu/lib/gcc/i686-glibc-gnu/13.2.1/include/stdarg.h:54:34: error: "__STDC_VERSION__" is not defined, evaluates to 0 [-Werror=undef]
   54 | #if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L \
      |                                  ^~~~~~~~~~~~~~~~
/home/bmg/install/compilers/i686-gnu/lib/gcc/i686-glibc-gnu/13.2.1/include/stdarg.h:55:8: error: "__cplusplus" is not defined, evaluates to 0 [-Werror=undef]
   55 |     || __cplusplus + 0 >= 201103L
      |        ^~~~~~~~~~~
cc1: all warnings being treated as errors

Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
15 months agoiconv: restore verbosity with unrecognized encoding names (bug 30694)
Andreas Schwab [Tue, 1 Aug 2023 15:01:37 +0000 (17:01 +0200)]
iconv: restore verbosity with unrecognized encoding names (bug 30694)

Commit 91927b7c76 ("Rewrite iconv option parsing [BZ #19519]") changed the
iconv program to call __gconv_open directly instead of the iconv_open
wrapper, but the former does not set errno.  Update the caller to
interpret the return codes like iconv_open does.

15 months agoconfigure: Remove --enable-all-warnings option
Adhemerval Zanella Netto [Mon, 24 Jul 2023 17:22:27 +0000 (14:22 -0300)]
configure: Remove --enable-all-warnings option

The option is not activelly tested and has bitrotten, to fix it
would require a lot of work and multiple fixes.  A better option
would to evaluate each option and enable the warning if it makes
sense.
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
15 months agoAdd IP_PROTOCOL from Linux 6.4 to bits/in.h
Joseph Myers [Tue, 1 Aug 2023 17:22:12 +0000 (17:22 +0000)]
Add IP_PROTOCOL from Linux 6.4 to bits/in.h

Linux 6.4 adds a new constant IP_PROTOCOL; add it to glibc's
bits/in.h.

Tested for x86_64.

15 months agoUpdate kernel version to 6.4 in header constant tests
Joseph Myers [Tue, 1 Aug 2023 12:42:41 +0000 (12:42 +0000)]
Update kernel version to 6.4 in header constant tests

This patch updates the kernel version in the tests tst-mman-consts.py,
tst-mount-consts.py and tst-pidfd-consts.py to 6.4.  (There are no new
constants covered by these tests in 6.4 that need any other header
changes.)

Tested with build-many-glibcs.py.

15 months agoPowerPC: Influence cpu/arch hwcap features via GLIBC_TUNABLES
Mahesh Bodapati [Tue, 1 Aug 2023 12:41:17 +0000 (07:41 -0500)]
PowerPC: Influence cpu/arch hwcap features via GLIBC_TUNABLES

This patch enables the option to influence hwcaps used by PowerPC.
The environment variable, GLIBC_TUNABLES=glibc.cpu.hwcaps=-xxx,yyy,-zzz....,
can be used to enable CPU/ARCH feature yyy, disable CPU/ARCH feature xxx
and zzz, where the feature name is case-sensitive and has to match the ones
mentioned in the file{sysdeps/powerpc/dl-procinfo.c}.

Note that the hwcap tunables only used in the IFUNC selection.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
15 months agovfprintf-internal: Get rid of alloca.
Joe Simmons-Talbott [Mon, 31 Jul 2023 19:42:32 +0000 (19:42 +0000)]
vfprintf-internal: Get rid of alloca.

Avoid potential stack overflow from unbounded alloca.  Use the existing
scratch_buffer instead.

Add testcases to exercise the code as suggested by Adhemerval Zanella Netto.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
15 months agostdlib: Improve tst-realpath compatibility with source fortification
Florian Weimer [Tue, 1 Aug 2023 08:27:15 +0000 (10:27 +0200)]
stdlib: Improve tst-realpath compatibility with source fortification

On GCC before 11, IPA can make the fortified realpath aware that the
buffer size is not large enough (8 bytes instead of PATH_MAX bytes).
Fix this by using a buffer that is large enough.

15 months agoOpen master branch for glibc 2.39 development glibc-2.38.9000
Andreas K. Hüttel [Mon, 31 Jul 2023 18:07:55 +0000 (20:07 +0200)]
Open master branch for glibc 2.39 development

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
15 months agoNEWS: Fix typos glibc-2.38
Andreas K. Hüttel [Mon, 31 Jul 2023 17:54:16 +0000 (19:54 +0200)]
NEWS: Fix typos

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
15 months agoCreate ChangeLog.old/ChangeLog.27
Andreas K. Hüttel [Sun, 30 Jul 2023 19:45:27 +0000 (21:45 +0200)]
Create ChangeLog.old/ChangeLog.27

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
15 months agoIncrease version numbers
Andreas K. Hüttel [Sun, 30 Jul 2023 19:35:28 +0000 (21:35 +0200)]
Increase version numbers

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
15 months agoINSTALL: regenerate
Andreas K. Hüttel [Sun, 30 Jul 2023 19:16:02 +0000 (21:16 +0200)]
INSTALL: regenerate

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
15 months agoNEWS: minor wording fixes
Andreas K. Hüttel [Sun, 30 Jul 2023 17:43:50 +0000 (19:43 +0200)]
NEWS: minor wording fixes

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
15 months agoinstall.texi: Build was tested with binutils 2.41 (just released)
Andreas K. Hüttel [Sun, 30 Jul 2023 17:31:04 +0000 (19:31 +0200)]
install.texi: Build was tested with binutils 2.41 (just released)

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
15 months agoinstall.texi: Update versions of most recent build tools
Andreas K. Hüttel [Thu, 27 Jul 2023 21:00:59 +0000 (23:00 +0200)]
install.texi: Update versions of most recent build tools

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
15 months agocontrib.texi: Update for 2.38
Andreas K. Hüttel [Tue, 25 Jul 2023 23:51:03 +0000 (01:51 +0200)]
contrib.texi: Update for 2.38

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
15 months ago<sys/platform/x86.h>: Add APX support
H.J. Lu [Wed, 26 Jul 2023 15:20:16 +0000 (08:20 -0700)]
<sys/platform/x86.h>: Add APX support

Add support for Intel Advanced Performance Extensions:

https://www.intel.com/content/www/us/en/developer/articles/technical/advanced-performance-extensions-apx.html

to <sys/platform/x86.h>.

15 months agotranslations: update cs, nl, vi
Andreas K. Hüttel [Wed, 26 Jul 2023 22:21:13 +0000 (00:21 +0200)]
translations: update cs, nl, vi

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
15 months agostring: Fix tester build with fortify enable with gcc 6
Adhemerval Zanella Netto [Tue, 25 Jul 2023 15:16:41 +0000 (12:16 -0300)]
string: Fix tester build with fortify enable with gcc 6

When building with fortify enabled, GCC 6 issues an warning the fortify
wrapper might overflow the destination buffer.  However, GCC does not
provide a specific flag to disable the warning (the failure is tied to
-Werror).  So to avoid disable all errors, only enable the check for
GCC 7 or newer.

Checked on i686-linux-gnu.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
15 months agolinux: Fix i686 with gcc6
Adhemerval Zanella Netto [Tue, 25 Jul 2023 15:16:40 +0000 (12:16 -0300)]
linux: Fix i686 with gcc6

On __convert_scm_timestamps GCC 6 issues an warning that tvts[0]/tvts[1]
maybe be used uninitialized, however it would be used if type is set to a
value different than 0 (done by either COMPAT_SO_TIMESTAMP_OLD or
COMPAT_SO_TIMESTAMPNS_OLD) which will fallthrough to 'common' label.

It does not show with gcc 7 or more recent versions.

Checked on i686-linux-gnu.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
15 months agoi386: Remove memset_chk-nonshared.S
Adhemerval Zanella Netto [Tue, 25 Jul 2023 15:16:39 +0000 (12:16 -0300)]
i386: Remove memset_chk-nonshared.S

Similar to memcpy, mempcpy, and memmove there is no need for an
specific memset_chk-nonshared.S.  It can be provided by
memset-ia32.S itself for static library.

Checked on i686-linux-gnu.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
15 months agoi386: Fix build with --enable-fortify=3
Adhemerval Zanella Netto [Tue, 25 Jul 2023 15:16:38 +0000 (12:16 -0300)]
i386: Fix build with --enable-fortify=3

The i386 string routines provide multiple internal definitions
for memcpy, memmove, and mempcpy chk routines:

  $ objdump -t libc.a | grep __memcpy_chk
  00000000 g     F .text  0000000e __memcpy_chk
  00000000 g     F .text  00000013 __memcpy_chk
  $ objdump -t libc.a | grep __mempcpy_chk
  00000000 g     F .text  0000000e __mempcpy_chk
  00000000 g     F .text  00000013 __mempcpy_chk
  $ objdump -t libc.a | grep __memmove_chk
  00000000 g     F .text  0000000e __memmove_chk
  00000000 g     F .text  00000013 __memmove_chk

Although is not an issue for normal static builds, with fortify=3
glibc itself might use the fortify chk functions and thus static
build might fail with multiple definitions.  For instance:

x86_64-glibc-linux-gnu-gcc -m32 -march=i686 -o [...]math/test-signgam-uchar-static -nostdlib -nostartfiles -static -static-pie [...]
x86_64-glibc-linux-gnu/bin/ld: [...]/libc.a(mempcpy-ia32.o):
in function `__mempcpy_chk': [...]/glibc-git/string/../sysdeps/i386/i686/mempcpy.S:32: multiple definition of `__mempcpy_chk';
[...]/libc.a(mempcpy_chk-nonshared.o):[...]/debug/../sysdeps/i386/mempcpy_chk.S:28: first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [../Rules:298:

There is no need for mem*-nonshared.S, the __mem*_chk routines
are already provided by the assembly routines.

Checked on i686-linux-gnu with gcc 13 built with fortify=1,2,3 and
without fortify.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
15 months agoposix: Fix test-errno build with fortify enable
Adhemerval Zanella Netto [Mon, 24 Jul 2023 19:38:17 +0000 (16:38 -0300)]
posix: Fix test-errno build with fortify enable

With gcc 11.3.1, building with -D_FORTIFY_SOURCE=2 shows:

In function ‘getgroups’,
    inlined from ‘do_test’ at test-errno.c:129:12:
../misc/sys/cdefs.h:195:6: error: argument 1 value -1 is negative
[-Werror=stringop-overflow=]
  195 |    ? __ ## f ## _alias (__VA_ARGS__)
      \
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/bits/unistd.h:115:10: note: in expansion of macro
‘__glibc_fortify’
  115 |   return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
      |          ^~~~~~~~~~~~~~~
../posix/bits/unistd.h: In function ‘do_test’:
../posix/bits/unistd-decl.h:135:28: note: in a call to function
‘__getgroups_alias’ declared with attribute ‘access (write_only, 2, 1)’
  135 | extern int __REDIRECT_NTH (__getgroups_alias, (int __size,
      __gid_t __list[]),
      |                            ^~~~~~~~~~~~~~~~~
../misc/sys/cdefs.h:264:6: note: in definition of macro ‘__REDIRECT_NTH’
  264 |      name proto __asm__ (__ASMNAME (#alias)) __THROW

It builds fine with gcc 12 and gcc 13.

Checked on x86_64-linux-gnu.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
15 months agopowerpc: Fix powerpc64 strchrnul build with old gcc
Adhemerval Zanella Netto [Mon, 24 Jul 2023 17:15:24 +0000 (14:15 -0300)]
powerpc: Fix powerpc64 strchrnul build with old gcc

The compiler might not see that internal definition is an alias
due the libc_ifunc macro, which redefines __strchrnul.  With
gcc 6 it fails with:

In file included from <command-line>:0:0:
./../include/libc-symbols.h:472:33: error: ‘__EI___strchrnul’ aliased to
undefined symbol ‘__GI___strchrnul’
   extern thread __typeof (name) __EI_##name \
                                 ^
./../include/libc-symbols.h:468:3: note: in expansion of macro
‘__hidden_ver2’
   __hidden_ver2 (, local, internal, name)
   ^~~~~~~~~~~~~
./../include/libc-symbols.h:476:29: note: in expansion of macro
‘__hidden_ver1’
 #  define hidden_def(name)  __hidden_ver1(__GI_##name, name, name);
                             ^~~~~~~~~~~~~
./../include/libc-symbols.h:557:32: note: in expansion of macro
‘hidden_def’
 # define libc_hidden_def(name) hidden_def (name)
                                ^~~~~~~~~~
../sysdeps/powerpc/powerpc64/multiarch/strchrnul.c:38:1: note: in
expansion of macro ‘libc_hidden_def’
 libc_hidden_def (__strchrnul)
 ^~~~~~~~~~~~~~~

Use libc_ifunc_hidden as stpcpy.  Checked on powerpc64 with
gcc 6 and gcc 13.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
15 months agosunrpc: Fix netname build with older gcc
Adhemerval Zanella Netto [Mon, 24 Jul 2023 17:15:23 +0000 (14:15 -0300)]
sunrpc: Fix netname build with older gcc

The -Wformat-overflow was added by gcc 8.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
15 months agomalloc: Fix set-freeres.c with gcc 6
Adhemerval Zanella Netto [Mon, 24 Jul 2023 17:15:22 +0000 (14:15 -0300)]
malloc: Fix set-freeres.c with gcc 6

Old GCC might trigger the the comparison will always evaluate as ‘true’
warnig for static build:

set-freeres.c:87:14: error: the comparison will always evaluate as
‘true’ for the address of ‘__libc_getgrgid_freemem_ptr’ will never be
NULL [-Werror=address]
   if (&__ptr != NULL)      \

So add pragma weak for all affected usages.

Checked on x86_64 and i686 with gcc 6 and 13.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
15 months agoNEWS: Insert autogenerated list of fixed bugs
Andreas K. Hüttel [Tue, 25 Jul 2023 21:59:25 +0000 (23:59 +0200)]
NEWS: Insert autogenerated list of fixed bugs

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
15 months agoNEWS: Mention AArch64 libmvec under build requirements again
Andreas K. Hüttel [Tue, 25 Jul 2023 21:55:17 +0000 (23:55 +0200)]
NEWS: Mention AArch64 libmvec under build requirements again

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
15 months agoNEWS: Minor editorial changes
Andreas K. Hüttel [Tue, 25 Jul 2023 21:49:07 +0000 (23:49 +0200)]
NEWS: Minor editorial changes

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
15 months agoMIPS: Update mips32 and mip64 libm test ulps
Aurelien Jarno [Tue, 25 Jul 2023 20:20:51 +0000 (22:20 +0200)]
MIPS: Update mips32 and mip64 libm test ulps

Generated on a Cavium Octeon III 2 board running Linux version 4.19.249
and GCC 13.1.0.

Needed due to commit cf7ffdd8a5f6 ("added pair of inputs for hypotf in
binary32").

15 months agonscd: cleanup obsolete _FORTIFY_SOURCE setting
Sam James [Tue, 25 Jul 2023 20:04:31 +0000 (21:04 +0100)]
nscd: cleanup obsolete _FORTIFY_SOURCE setting

This was added in 233399bce2e79e5af3b344782e9943d5f1a9cdcb just for warn_if_unused
warnings rather than anything substantial.

Now that we have a proper configure argument for F_S (--enable-fortify-source),
just drop this entirely, to avoid conflicting with e.g. detected --enable-fortify-source
finding F_S=3, then nscd's Makefile setting F_S=2, resulting in a build-failure
because of the redefinition.

Signed-off-by: Sam James <sam@gentoo.org>
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
Reviewed-by: Andreas K. Hüttel <dilfridge@gentoo.org>
15 months agoInclude sys/rseq.h in tst-rseq-disable.c
Stefan Liebler [Tue, 25 Jul 2023 09:34:30 +0000 (11:34 +0200)]
Include sys/rseq.h in tst-rseq-disable.c

Starting with commit 2c6b4b272e6b4d07303af25709051c3e96288f2d
"nptl: Unconditionally use a 32-byte rseq area", the testcase
misc/tst-rseq-disable is UNSUPPORTED as RSEQ_SIG is not defined.

The mentioned commit removes inclusion of sys/rseq.h in nptl/descr.h.
Thus just include sys/rseq.h in the tst-rseq-disable.c as also done
in tst-rseq.c and tst-rseq-nptl.c.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
15 months agostring: Fix tester with fortify enabled
Adhemerval Zanella Netto [Fri, 21 Jul 2023 12:18:17 +0000 (09:18 -0300)]
string: Fix tester with fortify enabled

If fortify is enabled, the truncated output warning is issued by
the wrapper itself:

In function ‘strncpy’,
    inlined from ‘test_strncpy’ at tester.c:505:10:
../string/bits/string_fortified.h:95:10: error: ‘__builtin_strncpy’
destination unchanged after copying no bytes from a string of length 3
[-Werror=stringop-truncation]
   95 |   return __builtin___strncpy_chk (__dest, __src, __len,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   96 |                                   __glibc_objsize (__dest));
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../include/bits/string_fortified.h:1,
                 from ../string/string.h:548,
                 from ../include/string.h:60,
                 from tester.c:33,
                 from inl-tester.c:6:
In function ‘strncpy’,
    inlined from ‘test_strncpy’ at tester.c:505:10:

Checked on x86_64-linux-gnu.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
15 months agostring: Fix bug-strncat1 with fortify enabled
Adhemerval Zanella Netto [Fri, 21 Jul 2023 12:18:16 +0000 (09:18 -0300)]
string: Fix bug-strncat1 with fortify enabled

If fortify is enabled, the truncated output warning is issued by
the wrapper itself:

bug-strncat1.c: In function ‘main’:
bug-strncat1.c:14:3: error: ‘__builtin___strncat_chk’ output truncated
copying 1 byte from a string of length 2 [-Werror=stringop-truncation]
   14 |   strncat (d, "\5\6", 1);
      |   ^

Checked on x86_64-linux-gnu.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
15 months agonscd: Use errval, not errno to guide cache update (bug 30662)
Florian Weimer [Mon, 24 Jul 2023 13:12:26 +0000 (15:12 +0200)]
nscd: Use errval, not errno to guide cache update (bug 30662)

The errno variable is potentially clobbered by the preceding
send call.  It is not related to the to-be-cached information.
The parallel code in hstcache.c and servicescache.c already uses
errval.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
15 months agoRestore lookup of IPv4 mapped addresses in files database (bug 25457)
Andreas Schwab [Wed, 19 Jul 2023 07:55:31 +0000 (09:55 +0200)]
Restore lookup of IPv4 mapped addresses in files database (bug 25457)

This was broken by commit 9c02d0784d ("nss_files: Remove RES_USE_INET6
from hosts processing"), which removed too much.

15 months agoRevert "MIPS: Sync elf.h from binutils"
Andreas K. Hüttel [Sat, 22 Jul 2023 14:42:50 +0000 (16:42 +0200)]
Revert "MIPS: Sync elf.h from binutils"

Leads to build failures (preprocessor redefinitions), and there is not
enough time to address this properly. Deferred until after 2.38 release.

This reverts commit 59dc07637fa1a693bd7599a98b0735697544077b.

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
15 months agoriscv: Update rvd libm test ulps
Aurelien Jarno [Thu, 20 Jul 2023 16:58:42 +0000 (18:58 +0200)]
riscv: Update rvd libm test ulps

Generated on a VisionFive 2 board running Linux version 6.4.2 and
GCC 13.1.0.

Needed due to commit cf7ffdd8a5f6 ("added pair of inputs for hypotf in
binary32").

15 months agoMIPS: Sync elf.h from binutils
Ying Huang [Thu, 15 Jun 2023 07:50:21 +0000 (03:50 -0400)]
MIPS: Sync elf.h from binutils

Add new definitions for the MIPS target, specifically: relocation
types, machine flags, section type names, and object attribute tags
and values.  On MIPS64, up to three relocations may be specified
within r_info, by the r_type, r_type2, and r_type3 fields, so add new
macros to get the respective reloc types for MIPS64.

15 months agoMerge translations (bg, hr, pl, sv)
Andreas K. Hüttel [Fri, 21 Jul 2023 22:38:31 +0000 (00:38 +0200)]
Merge translations (bg, hr, pl, sv)

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
15 months agonptl: Unconditionally use a 32-byte rseq area
Florian Weimer [Fri, 21 Jul 2023 14:18:18 +0000 (16:18 +0200)]
nptl: Unconditionally use a 32-byte rseq area

If the kernel headers provide a larger struct rseq, we used that
size as the argument to the rseq system call.  As a result,
rseq registration would fail on older kernels which only accept
size 32.

15 months agohurd: Fix tst-openloc
Samuel Thibault [Thu, 20 Jul 2023 21:38:24 +0000 (23:38 +0200)]
hurd: Fix tst-openloc

On GNU/Hurd, O_RDWR actually is O_WRONLY|O_RDONLY, so checking through
bitness really is wrong. O_ACCMODE is there for this.

Fixes: 5324d258427f ("fileops: Don't process ,ccs= as individual mode flags (BZ#18906)")
15 months agoscripts: Fix fortify checks if compiler does not support _FORTIFY_SOURCE=3
Adhemerval Zanella [Thu, 20 Jul 2023 14:35:54 +0000 (11:35 -0300)]
scripts: Fix fortify checks if compiler does not support _FORTIFY_SOURCE=3

The 30379efad1 added _FORTIFY_SOURCE checks without check if compiler
does support all used fortify levels.  This patch fixes it by first
checking at configure time the maximum support fortify level and using
it instead of a pre-defined one.

Checked on x86_64 with gcc 11, 12, and 13.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Tested-by: Florian Weimer <fweimer@redhat.com>
15 months agoconfigure: Disable building libcrypt by default
Siddhesh Poyarekar [Mon, 17 Jul 2023 16:44:17 +0000 (12:44 -0400)]
configure: Disable building libcrypt by default

We mentioned eventual dropping of libcrypt in the 2.28 NEWS.  Actually
put that plan in motion by first disabling building libcrypt by default.
note in NEWS that the library will be dropped completely in a future
release.

Also add a couple of builds into build-many-glibcs.py.

Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Reviewed-by: Andreas K. Hüttel <dilfridge@gentoo.org>
15 months agonptl: Make tst-tls3mod.so explicitly lazy
Arsen Arsenović [Wed, 19 Jul 2023 19:24:37 +0000 (21:24 +0200)]
nptl: Make tst-tls3mod.so explicitly lazy

Fixes the following test-time errors, that lead to FAILs, on toolchains
that set -z now out o the box, such as the one used on Gentoo Hardened:

  .../build-x86-x86_64-pc-linux-gnu-nptl $ grep '' nptl/tst-tls3*.out
  nptl/tst-tls3.out:dlopen failed
  nptl/tst-tls3-malloc.out:dlopen failed

Reviewed-by: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
This page took 0.085744 seconds and 5 git commands to generate.