Commit Graph

41864 Commits

Author SHA1 Message Date
Paul Eggert
b1da163a21 Pass glibc pre-commit checks
This is needed for the next patch which updates copyright dates.
* assert/test-assert-2.c: Remove trailing white space.
* elf/tst-startup-errno.c: Remove trailing empty lines.
2025-01-01 11:20:43 -08:00
Xi Ruoyao
013106ae67
mlock, mlock2, munlock: Tell the compiler we don't dereference the pointer
Since https://gcc.gnu.org/r11-959, the compiler emits
-Wmaybe-uninitialized if a const pointer to an uninitialized buffer is
passed.  Tell the compiler we don't dereference the pointer to remove
the false alarm.

Link: https://gcc.gnu.org/PR118194
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Reviewed-by: Sam James <sam@gentoo.org>
2025-01-01 16:08:36 +01:00
Adhemerval Zanella
58272284b6 elf: Add glibc.rtld.execstack
The new tunable can be used to control whether executable stacks are
allowed from either the main program or dependencies.  The default is
to allow executable stacks.

The executable stacks default permission is checked agains the one
provided by the PT_GNU_STACK from program headers (if present).  The
tunable also disables the stack permission change if any dependency
requires an executable stack at loading time.

Checked on x86_64-linux-gnu, i686-linux-gnu, and aarch64-linux-gnu.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
2024-12-31 09:04:20 -03:00
Adhemerval Zanella
c9540704ac elf: Add tst-execstack-prog-static
Similar to tst-execstack-prog, check if executable stacks works for
statically linked programs.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
2024-12-31 09:04:20 -03:00
Adhemerval Zanella
0ca8785a28 elf: Do not change stack permission on dlopen/dlmopen
If some shared library loaded with dlopen/dlmopen requires an executable
stack, either implicitly because of a missing GNU_STACK ELF header
(where the ABI default flags implies in the executable bit) or explicitly
because of the executable bit from GNU_STACK; the loader will try to set
the both the main thread and all thread stacks (from the pthread cache)
as executable.

Besides the issue where any __nptl_change_stack_perm failure does not
undo the previous executable transition (meaning that if the library
fails to load, there can be thread stacks with executable stacks), this
behavior was used on a CVE [1] as a vector for RCE.

This patch changes that if a shared library requires an executable
stack, and the current stack is not executable, dlopen fails.  The
change is done only for dynamically loaded modules, if the program
or any dependency requires an executable stack, the loader will still
change the main thread before program execution and any thread created
with default stack configuration.

[1] https://www.qualys.com/2023/07/19/cve-2023-38408/rce-openssh-forwarded-ssh-agent.txt

Checked on x86_64-linux-gnu and i686-linux-gnu.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
2024-12-31 09:04:20 -03:00
Adhemerval Zanella
ca96ea06b3 elf: Cleanup and improve tst-execstack
Reviewed-by: Florian Weimer <fweimer@redhat.com>
2024-12-31 09:04:20 -03:00
H.J. Lu
7962fa38e2 Use GCC 14 branch in build-many-glibcs.py
Tested with build-many-glibcs.py with

--exclude m68k-linux-gnu-coldfire-soft

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
2024-12-31 16:08:57 +08:00
Andreas K. Hüttel
0feb6da94c
INSTALL, NEWS: Document requirement of gawk with MPFR support
Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
2024-12-30 17:03:36 +01:00
Adhemerval Zanella
29531b122c Mention CORE-MATH optimize routines on NEWS
Reviewed-by: Andreas K. Huettel <dilfridge@gentoo.org>
2024-12-30 09:39:05 -03:00
Florian Weimer
0ee6e13f7f x86-64: Reorder dynamic linker list in ldd script (bug 32508)
Move the x86-64 loader first, before the i386 and x32 loaders.  In
most cases, it's the loader the script needs.  This avoids an error
message if the i386 loader does not work.

The effect of this change to the generated ldd script looks like this:

-RTLDLIST="/lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2 /libx32/ld-linux-x32.so.2"
+RTLDLIST="/lib64/ld-linux-x86-64.so.2 /lib/ld-linux.so.2 /libx32/ld-linux-x32.so.2"

Reviewed-by: Sam James <sam@gentoo.org>
2024-12-30 13:24:36 +01:00
Michael Jeanson
0852c4aab7 nptl: hppa: replace __get_cr27 with __thread_pointer
The addition of the new thread_pointer.h header on HPPA resulted in
duplicated inline asm to get the current thread pointer from the cr27
register.

Include thread_pointer.h in tls.h and replace __get/set_cr27() with
__set_/thread_pointer() with the appropriate casts.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
2024-12-27 17:41:02 +01:00
Michael Jeanson
6fdb6abeb2 nptl: Add <thread_pointer.h> for hppa
This will be required by the rseq extensible ABI implementation on all
Linux architectures exposing the '__rseq_size' and '__rseq_offset'
symbols to set the initial value of the 'cpu_id' field which can be used
by applications to test if rseq is available and registered. As long as
the symbols are exposed it is valid for an application to perform this
test even if rseq is not yet implemented in libc for this architecture.

Compile tested with build-many-glibcs.py but I don't have access to any
hardware to run the tests.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
2024-12-27 17:41:02 +01:00
Florian Weimer
cb4692ce1e libio: asprintf should write NULL upon failure
This was suggested most recently by Solar Designer, noting
that code replacing vsprintf with vasprintf in a security fix
was subtly wrong:

  Re: GStreamer Security Advisory 2024-0003: Orc compiler
  stack-based buffer overflow
  <https://www.openwall.com/lists/oss-security/2024/07/26/2>

Previous libc-alpha discussions:

  I: [PATCH] asprintf error handling fix
  <https://inbox.sourceware.org/libc-alpha/20011205185828.GA8376@ldv.office.alt-linux.org/>

  asprintf() issue
  <https://inbox.sourceware.org/libc-alpha/CANSoFxt-cdc-+C4u-rTENMtY4X9RpRSuv+axDswSPxbDgag8_Q@mail.gmail.com/>

I don't think we need a compatibility symbol for this.  As the
GStreamer example shows, this change is much more likely to fix bugs
than cause compatibility issues.

Suggested-by: Dmitry V. Levin <ldv@altlinux.org>
Suggested-by: Archie Cobbs <archie.cobbs@gmail.com>
Suggested-by: Solar Designer <solar@openwall.com>
Reviewed-by: Sam James <sam@gentoo.org>
2024-12-27 09:18:21 +01:00
Florian Weimer
7c22dcda27 nptl: More useful padding in struct pthread
The previous use of padding within a union made it impossible to
re-use the padding for GLIBC_PRIVATE ABI preservation because
tcbhead_t could use up all of the padding (as was historically the
case on x86-64).  Allocating padding unconditionally addresses this
issue.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2024-12-27 07:29:56 +01:00
Florian Weimer
5e249192ca elf: Remove the GET_ADDR_ARGS and related macros from the TLS code
This was used to manage an IA-64 ABI divergence is no longere needed
after the IA-64 removal.

(It should be possible to encode all the required information in
one machine word, so the pointer indirection is really unnecessary.
Technically, none of this is part of the ABI, so perhaps it's
possible to do this retroactively.  See bug 27404.)

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2024-12-27 07:29:56 +01:00
Samuel Thibault
7fa9e786b6 hurd: Avoid asm statements which return
They are not supposed to change flow control.

This fixes miscompilation with gcc 14.2.0 which then drops code, see
https://lists.gnu.org/archive/html/bug-hurd/2024-11/msg00145.html
2024-12-27 01:10:58 +01:00
H.J. Lu
757ac24f8f build-many-glibcs.py: Add --exclude option
m68k-linux-gnu-coldfire-soft GCC and glibc often won't build due to

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103370

which results in build-many-glibcs.py failure.  Add an option, --exclude,
to exclude some targets.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
2024-12-25 08:00:06 +08:00
Sam James
a3db3fe42b
stdio-common: Tweak comment in Makefile
Followup to 5a96da210c.
2024-12-24 11:38:25 +00:00
Dmitry Chestnykh
5a96da210c
stdio-common: Use clang with bugfix for bug28
The issue that was the cause of hang was fixed in upstream.

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2024-12-24 11:33:33 +00:00
H.J. Lu
0c36c983ec NEWS: Mention testing glibc build with a different set of compilers
Also document C and C++ compilers used to test glibc should come from
the same set of compilers.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
2024-12-24 16:16:38 +08:00
Florian Weimer
d0b8aa6de4 support: Add support_record_failure_barrier
This can be used to stop execution after a TEST_COMPARE_BLOB
failure, for example.
2024-12-23 13:57:55 +01:00
Miao Wang
55618e1396 io: statx, fstatat: Drop nonnull attribute on the path argument
Since Linux 6.11 the kernel allows path to be NULL if flags &
AT_EMPTY_PATH.  Let's allow users to take the advantage if they don't
care running on old kernels.

Signed-off-by: Miao Wang <shankerwangmiao@gmail.com>
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
2024-12-23 10:30:43 +01:00
H.J. Lu
15ab68bf1a configure: Improve configure output for C++ Compiler
Change configure output for C++ Compiler from

...
checking -finput-charset=ascii in testing... -finput-charset=ascii
checking -finput-charset=ascii in testing... -finput-charset=ascii
...

to

...
checking -finput-charset=ascii in testing... -finput-charset=ascii
checking g++ -finput-charset=ascii in testing... -finput-charset=ascii
...

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
2024-12-23 14:58:53 +08:00
H.J. Lu
33aeb88c5b getaddrinfo.c: Avoid uninitialized pointer access [BZ #32465]
Add valid_decimal_value to check valid decimal value in a string to
avoid uninitialized endp in add_prefixlist and gaiconf_init as reported
by Clang 19:

./getaddrinfo.c:1884:11: error: variable 'endp' is used uninitialized whenever '||' condition is true [-Werror,-Wsometimes-uninitialized]
 1884 |       && (cp == NULL
      |           ^~~~~~~~~~
./getaddrinfo.c:1887:11: note: uninitialized use occurs here
 1887 |       && *endp == '\0'
      |           ^~~~
./getaddrinfo.c:1884:11: note: remove the '||' if its condition is always false
 1884 |       && (cp == NULL
      |           ^~~~~~~~~~
 1885 |           || (bits = strtoul (cp, &endp, 10)) != ULONG_MAX
      |           ~~
./getaddrinfo.c:1875:13: note: initialize the variable 'endp' to silence this warning
 1875 |   char *endp;
      |             ^
      |              = NULL

This fixes BZ #32465.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
2024-12-23 07:48:29 +08:00
gfleury
f646be6ff6 htl: move pthread_cond_timedwait, pthread_cond_clockwait, pthread_cond_wait into libc.
Message-ID: <20241219203727.669825-9-gfleury@disroot.org>
2024-12-22 23:37:30 +01:00
gfleury
ba8522542f htl: move __pthread_mutex_checklocked into libc.
move out __getpid from pt-mutex.h
and in pt-mutex-* include <unistd.h> where
__getpid was called

Signed-off-by: gfleury <gfleury@disroot.org>
Message-ID: <20241219203727.669825-8-gfleury@disroot.org>
2024-12-22 23:34:28 +01:00
gfleury
a369d567d2 htl: move __pthread_timedblock, __pthread_timedblock_intr, __pthread_block, __pthread_block_intr into libc.
Signed-off-by: gfleury <gfleury@disroot.org>
Message-ID: <20241219203727.669825-7-gfleury@disroot.org>
2024-12-22 23:34:28 +01:00
gfleury
f57a277c16 htl: move pthread_cond_signal into libc.
Signed-off-by: gfleury <gfleury@disroot.org>
Message-ID: <20241219203727.669825-6-gfleury@disroot.org>
2024-12-22 23:34:28 +01:00
gfleury
3089d23517 htl: move pthread_cond_broadcast into libc.
Signed-off-by: gfleury <gfleury@disroot.org>
Message-ID: <20241219203727.669825-5-gfleury@disroot.org>
2024-12-22 23:34:27 +01:00
gfleury
917a131ab9 htl: move pthread_cond_destroy into libc.
Signed-off-by: gfleury <gfleury@disroot.org>
Message-ID: <20241219203727.669825-4-gfleury@disroot.org>
2024-12-22 23:34:27 +01:00
gfleury
4ab765c6ba htl: move __pthread_wakeup into libc.
Signed-off-by: gfleury <gfleury@disroot.org>
Message-ID: <20241219203727.669825-3-gfleury@disroot.org>
2024-12-22 23:34:27 +01:00
gfleury
8735ea79ab htl: move pthread_cond_init into libc.
Signed-off-by: gfleury <gfleury@disroot.org>
Message-ID: <20241219203727.669825-2-gfleury@disroot.org>
2024-12-22 23:34:27 +01:00
Samuel Thibault
fd30525ead assert/test-assert-2.c: Include <unistd.h>
For _exit declaration.
2024-12-22 23:34:27 +01:00
H.J. Lu
9306aef356 stdio-common: Suppress Clang warnings on scanf13.c
Suppress Clang warnings on stdio-common/scanf13.c:

1. Before this commit:

scanf13.c:43:17: error: invalid conversion specifier 'l' [-Werror,-Wformat-invalid-specifier]
   43 |               "A%mS%10mls%4ml[bcd]%4mCB", &lsp1, &lsp2, &lsp3, &lsp4) != 4)
      |                    ~~~~^
scanf13.c:43:22: error: invalid conversion specifier 'l' [-Werror,-Wformat-invalid-specifier]
   43 |               "A%mS%10mls%4ml[bcd]%4mCB", &lsp1, &lsp2, &lsp3, &lsp4) != 4)
      |                         ~~~~^
scanf13.c:43:50: error: data argument not used by format string [-Werror,-Wformat-extra-args]
   43 |               "A%mS%10mls%4ml[bcd]%4mCB", &lsp1, &lsp2, &lsp3, &lsp4) != 4)
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~                ^
scanf13.c:145:27: error: invalid conversion specifier 'l' [-Werror,-Wformat-invalid-specifier]
  145 |   if (sscanf (buf, "%2048mls%mlc", &lsp3, &lsp4) != 2)
      |                     ~~~~~~^
scanf13.c:145:31: error: invalid conversion specifier 'l' [-Werror,-Wformat-invalid-specifier]
  145 |   if (sscanf (buf, "%2048mls%mlc", &lsp3, &lsp4) != 2)
      |                            ~~~^
scanf13.c:145:43: error: data argument not used by format string [-Werror,-Wformat-extra-args]
  145 |   if (sscanf (buf, "%2048mls%mlc", &lsp3, &lsp4) != 2)
      |                    ~~~~~~~~~~~~~~         ^
scanf13.c:161:31: error: invalid conversion specifier 'l' [-Werror,-Wformat-invalid-specifier]
  161 |   if (sscanf (buf, "%4mC%1500ml[dr/]%548ml[abc/d]%3mlc",
      |                         ~~~~~~^
scanf13.c:161:42: error: invalid conversion specifier 'l' [-Werror,-Wformat-invalid-specifier]
  161 |   if (sscanf (buf, "%4mC%1500ml[dr/]%548ml[abc/d]%3mlc",
      |                                ~~~~~~~~~~^
scanf13.c:161:53: error: invalid conversion specifier 'l' [-Werror,-Wformat-invalid-specifier]
  161 |   if (sscanf (buf, "%4mC%1500ml[dr/]%548ml[abc/d]%3mlc",
      |                                           ~~~~~~~~~~^
scanf13.c:162:15: error: data argument not used by format string [-Werror,-Wformat-extra-args]
  161 |   if (sscanf (buf, "%4mC%1500ml[dr/]%548ml[abc/d]%3mlc",
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  162 |               &lsp1, &lsp2, &lsp3, &lsp4) != 4)
      |                      ^
10 errors generated.

2. With DIAG_IGNORE_NEEDS_COMMENT_CLANG changes in stdio-common/scanf13.c:

scanf13.c:28:40: error: 'sscanf' may overflow; destination buffer in argument 4 has size 8, but the corresponding specifier may require size 11 [-Werror,-Wfortify-source]
   28 |               "A%ms%10ms%4m[bcd]%4mcB", &sp1, &sp2, &sp3, &sp4) != 4)
      |                                               ^
scanf13.c:94:34: error: 'sscanf' may overflow; destination buffer in argument 3 has size 8, but the corresponding specifier may require size 2049 [-Werror,-Wfortify-source]
   94 |   if (sscanf (buf, "%2048ms%mc", &sp3, &sp4) != 2)
      |                                  ^
scanf13.c:110:61: error: 'sscanf' may overflow; destination buffer in argument 4 has size 8, but the corresponding specifier may require size 1501 [-Werror,-Wfortify-source]
  110 |   if (sscanf (buf, "%4mc%1500m[dr/]%548m[abc/d]%3mc", &sp1, &sp2, &sp3, &sp4)
      |                                                             ^
scanf13.c:110:67: error: 'sscanf' may overflow; destination buffer in argument 5 has size 8, but the corresponding specifier may require size 549 [-Werror,-Wfortify-source]
  110 |   if (sscanf (buf, "%4mc%1500m[dr/]%548m[abc/d]%3mc", &sp1, &sp2, &sp3, &sp4)
      |                                                                   ^
4 errors generated.

Co-Authored-By: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
2024-12-23 06:29:37 +08:00
H.J. Lu
31c47126f4 string: Suppress Clang warnings on tester.c
Add a configure check for -Wno-fortify-source to suppress Clang warnings
on string/tester.c, like:

tester.c:385:10: error: 'strncat' size argument is too large; destination buffer has size 50, but size argument is 99 [-Werror,-Wfortify-source]
  385 |   check (strncat (one, "lmn", 99) == one, 1);   /* Returned value. */

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
2024-12-23 06:28:55 +08:00
H.J. Lu
cb74bafbb5 Add a reference to Clang /usr/include/tgmath.h dependency
The fake Clang /usr/include/tgmath.h dependency bug is:

https://github.com/llvm/llvm-project/issues/120891

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
2024-12-23 06:28:55 +08:00
H.J. Lu
0813cb5847 Suppress Clang -Wimplicit-fallthrough warnings
Since Clang doesn't properly handle

/* FALLTHROUGH */

in elf/tst-align2.c nor

/* fall through */

in misc/tst-tsearch.c

tst-align2.c💯9: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
  100 |         case 'A':
      |         ^
tst-align2.c💯9: note: insert '__attribute__((fallthrough));' to silence this warning
  100 |         case 'A':
      |         ^
      |         __attribute__((fallthrough));
tst-align2.c💯9: note: insert 'break;' to avoid fall-through
  100 |         case 'A':
      |         ^
      |         break;

suppress them when compiled with Clang.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
2024-12-23 06:28:55 +08:00
Adhemerval Zanella
309225af54 stdio: Suppress -Wformat only for gcc in tst-sprintf-errno.c
Since Clang doesn't support

DIAG_IGNORE_NEEDS_COMMENT (11, "-Wformat=");

and for unknown reasons, it doesn't warn the %#m specifier, suppress
-Wformat only for gcc in tst-sprintf-errno.c.

Co-Authored-By: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
2024-12-23 06:28:55 +08:00
Adhemerval Zanella
a2b0ff98a0 include/sys/cdefs.h: Add __attribute_optimization_barrier__
Add __attribute_optimization_barrier__ to disable inlining and cloning on a
function.  For Clang, expand it to

__attribute__ ((optnone))

Otherwise, expand it to

__attribute__ ((noinline, clone))

Co-Authored-By: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
2024-12-23 06:28:55 +08:00
DJ Delorie
3fb895ac88 assert: Use __writev in assert.c [BZ #32492]
Replace writev with __writev in assert/assert.c.  This fixes [BZ #32492].

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2024-12-23 06:03:01 +08:00
H.J. Lu
b587e7d45c Fix build without stack protector [BZ #32494]
Without stack protector, inhibit_stack_protector is undefined during build:

In file included from <command-line>:
./../include/libc-symbols.h:665:3: error: expected ';' before '__typeof'
  665 |   __typeof (type_name) *name##_ifunc (__VA_ARGS__)
         \
      |   ^~~~~~~~
./../include/libc-symbols.h:676:3: note: in expansion of macro
'__ifunc_resolver'
  676 |   __ifunc_resolver (type_name, name, expr, init, static, __VA_ARGS__)
      |   ^~~~~~~~~~~~~~~~
./../include/libc-symbols.h:703:3: note: in expansion of macro '__ifunc_args'
  703 |   __ifunc_args (type_name, name, expr, init, arg)
      |   ^~~~~~~~~~~~
./../include/libc-symbols.h:790:3: note: in expansion of macro '__ifunc'
  790 |   __ifunc (redirected_name, name, expr, void, INIT_ARCH)
      |   ^~~~~~~
../sysdeps/x86_64/multiarch/memchr.c:29:1: note: in expansion of macro
'libc_ifunc_redirected'
   29 | libc_ifunc_redirected (__redirect_memchr, memchr, IFUNC_SELECTOR ());
      | ^~~~~~~~~~~~~~~~~~~~~

1. Fix a typo in include/libc-symbols.h to define inhibit_stack_protector
for build.
2. Don't include <config.h> in include/libc-symbols.h since it has been
included in include/libc-misc.h.
3. Change #include "libc-misc.h" to #include <libc-misc.h> in
string/test-string.h.

This fixes BZ #32494.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
2024-12-23 04:51:30 +08:00
Adhemerval Zanella
2271e0d2b6 Check if TEST_CC supports -Wno-restrict before using it
Check if TEST_CC supports -Wno-restrict before using it to avoid Clang
error:

error: unknown warning option '-Wno-restrict' [-Werror,-Wunknown-warning-option]

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
2024-12-23 04:32:51 +08:00
John David Anglin
325db5ab7f 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>
2024-12-22 09:58:02 -05:00
John David Anglin
9bdb1487c5 hppa: add cacheflush() syscall wrapper
The hppa Linux kernel supports the cacheflush() syscall
since version 6.5. This adds the glibc syscall wrapper.

Signed-off-by: Helge Deller <deller@gmx.de>

---
v2: This patch was too late in release cycle for GLIBC_2.40,
    so update now to GLIBC_2.41 instead.
2024-12-22 09:51:54 -05:00
John David Anglin
4b37fb71e0 hppa: Update libm-test-ulps
Signed-off-by: John David Anglin <dave.anglin@bell.net>
2024-12-22 09:45:34 -05:00
Samuel Thibault
faa0c883f6 hurd: make mprotect translate KERN_PROTECTION_FAILURE to EACCESS
Suggested-by: Sergey Bugaev <bugaevc@gmail.com>
2024-12-22 11:40:24 +01:00
H.J. Lu
39a3b5c8f6 Compile tst-deadline.c with -Wno-ignored-attributes for Clang
Since tst-deadline.c is an internal test, compile tst-deadline.c with
-Wno-ignored-attributes for Clang to silence -Werror,-Wunknown-attributes
errors.  Also suppress -Wmaybe-uninitialized only for GCC in net-internal.h.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
2024-12-22 17:49:22 +08:00
Adhemerval Zanella
5b9bc1a172 malloc: Only enable -Waggressive-loop-optimizations suppression for gcc
Reviewed-by: Sam James <sam@gentoo.org>
2024-12-22 17:47:52 +08:00
H.J. Lu
b5bdef46cc Suppress -Wmaybe-uninitialized only for GCC
Clang doesn't support -Wmaybe-uninitialized.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
2024-12-22 17:46:56 +08:00
H.J. Lu
daf47b66df Suppress Clang -Wgnu-folding-constant warnings
Suppress Clang -Wgnu-folding-constant warnings, like

tst-freopen.c:44:13: error: variable length array folded to constant array as an extension [-Werror,-Wgnu-folding-constant]
   44 |   char temp[strlen (test) + 1];
      |             ^~~~~~~~~~~~~~~~~

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
2024-12-22 17:45:56 +08:00