Commit Graph

33339 Commits

Author SHA1 Message Date
Siva Chandra Reddy
0337af1396 Un-nest an include in dl-reloc-static-pie.c.
A corresponding adjustment in sysdeps/x86_64/dl-machine.h has also been
made.
2021-08-27 17:26:01 -07:00
Stan Shebs
43afb70033 Disable -mfloat128 for clang, lets power9 insns into power8 executables 2021-08-27 17:26:00 -07:00
Stan Shebs
895947a3ca Also work around clang bctrl issue in get_clockfreq.c 2021-08-27 17:26:00 -07:00
Zack Weinberg
b930ad424b [BZ #19239] Don't include sys/sysmacros.h from sys/types.h.
This completes the deprecation and removal of this inclusion, which
was begun in the 2.25 release.

	* posix/sys/types.h: Don't include sys/sysmacros.h.
	* misc/sys/sysmacros.h: Remove the conditional deprecation
	warnings for the macros defined by this header.
2021-08-27 17:26:00 -07:00
Stan Shebs
c4c787ff1b Remove .llvm_addrsig sections from crt.o files 2021-08-27 17:26:00 -07:00
Brooks Moses
b1ecb7cf85 Forward-port cl/42676407 to disable link-time warning about mktemp, tempnam and tmpnam. 2021-08-27 17:23:15 -07:00
Raman Tenneti
9e8081d123 Changes to compile glibc-2.27 on PPC (Power8) with clang.
+ Use DOT_MACHINE macro instead of ".machine" instruction.
+ Use __isinf and __isinff instead of builtin versions.
+ In s_logb, s_logbf and s_logbl functions, used float versions to
  calculate "ret = x & 0x7f800000;" expression.
2021-08-27 17:23:15 -07:00
Stan Shebs
91da896a3e Add a note about passwd.borg.base organization 2021-08-27 17:23:15 -07:00
Stan Shebs
c51bab1714 Fix mistaken order of arguments to open_path 2021-08-27 17:23:15 -07:00
Stan Shebs
b2d0b20ae6 Update build notes 2021-08-27 17:23:15 -07:00
Raman Tenneti
bb9e16c6ea Undid the dl_enable_fastload environment variable changes. 2021-08-27 17:23:15 -07:00
Paul Pluzhnikov
590786950c Add "fastload" support. 2021-08-27 17:23:15 -07:00
Stan Shebs
3372bfe221 Work around lack of mfppr in clang 2021-08-27 17:23:14 -07:00
Stan Shebs
960ba7975c Work around mtfsb0 syntax limitation with clang 2021-08-27 17:23:14 -07:00
Stan Shebs
e04e10b431 Avoid passing gcc-specific options to clang 2021-08-27 17:23:14 -07:00
Stan Shebs
452fe68a53 Make asm-based constraints be gcc-only 2021-08-27 17:23:14 -07:00
Stan Shebs
4b86f820b8 Make xxland syntax gcc-only 2021-08-27 17:23:14 -07:00
Stan Shebs
5e4f72b895 Add a first approximation of float definitions for ppc clang 2021-08-27 17:23:14 -07:00
Stan Shebs
e21102f77e Make powerpc .machine directives be gcc-only 2021-08-27 17:23:14 -07:00
Stan Shebs
bb112e11de Make mutex hints gcc-only, improve a type in __arch_compare_and_exchange_bool_32_acq 2021-08-27 17:23:14 -07:00
Stan Shebs
7724302310 Make power6 directives be gcc-only 2021-08-27 17:23:13 -07:00
Stan Shebs
1e88b203b3 Add power9 flag to go with -mfloat128 2021-08-27 17:23:13 -07:00
Stan Shebs
6fd7bec86f Disable more attempts to pass -mlong-double-128 to clang 2021-08-27 17:23:13 -07:00
Stan Shebs
d21dfbccdc Disable attempts to pass -mlong-double-128 to clang 2021-08-27 17:23:13 -07:00
Stan Shebs
acf11f4420 Add workaround for clang link failure in elf/tst-unique4 2021-08-27 17:23:13 -07:00
Stan Shebs
b2d69ea7ac Add workaround for infinite looping in ppc vsyscalls 2021-08-27 17:23:13 -07:00
Stan Shebs
6ea6782b69 Work around clang crash by skipping apparently-unneeded asm 2021-08-27 17:23:13 -07:00
Stan Shebs
b35774068a Work around clang problem with ifuncs and vdso 2021-08-27 17:23:12 -07:00
Stan Shebs
96509a9dce Work around a ppc clang inlining bug 2021-08-27 17:23:12 -07:00
Stan Shebs
9b6c937b00 Add workaround for segfaults in __longjmp when compiled with ppc clang 2021-08-27 17:23:12 -07:00
Stan Shebs
f9bd60b7c0 Add clang version of find_cxx_header 2021-08-27 17:23:12 -07:00
Stan Shebs
0f93e3333f Change de-nesting fix to use added argument instead of globals 2021-08-27 17:23:12 -07:00
Stan Shebs
21991760c7 Fix regressions in async-safe TLS, add run-time control for debugging, add more comments 2021-08-27 17:23:12 -07:00
Stan Shebs
c0ab16f8cc Fix TLS problems not handled by cherrypick 2021-08-27 17:23:12 -07:00
Brooks Moses
3e9a530aae Revert upstream removal of async-safe TLS patches. 2021-08-27 17:23:11 -07:00
Stan Shebs
74f10c8aad Make pointer in tst-realloc volatile also 2021-08-27 17:23:11 -07:00
Stan Shebs
5884367eb9 Add a GRTE-specific readme. 2021-08-27 17:23:07 -07:00
Stan Shebs
4d4222dd27 Work around a make 3.81 segfault with clang 2021-08-27 16:22:14 -07:00
Florian Weimer
121dc10a6d NEWS: Move security-lated changes before bug list
This matches the practice for previous releases.
2021-08-27 16:22:13 -07:00
Florian Weimer
537386b1c9 Add references to CVE-2018-11236, CVE-2017-18269 2021-08-27 16:22:13 -07:00
H.J. Lu
3eb848f535 Add a test case for [BZ #23196]
[BZ #23196]
	* string/test-memcpy.c (do_test1): New function.
	(test_main): Call it.

(cherry picked from commit ed983107bb)
2021-08-27 16:22:13 -07:00
Andreas Schwab
c4fde9669a Don't write beyond destination in __mempcpy_avx512_no_vzeroupper (bug 23196)
When compiled as mempcpy, the return value is the end of the destination
buffer, thus it cannot be used to refer to the start of it.

(cherry picked from commit 9aaaab7c6e)
2021-08-27 16:22:13 -07:00
Florian Weimer
da768de04f sunrpc: Remove stray exports without --enable-obsolete-rpc [BZ #23166]
This is needed to avoid a warning when linking against libtirpc:

/lib64/libc.so.6: warning: common of `rpc_createerr@@TIRPC_0.3.0' overridden by definition
/usr/lib64/libtirpc.so: warning: defined here

This ld warning is not enabled by default; -Wl,--warn-common enables it.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

(cherry picked from commit 89aacb513e)
2021-08-27 16:22:13 -07:00
Rafal Luzynski
0c65d0085d gd_GB: Fix typo in abbreviated "May" (bug 23152).
[BZ #23152]
	* localedata/locales/gd_GB (abmon): Fix typo in May:
	"Mhàrt" -> "Cèit".  Adjust the comment according to the change.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
(cherry picked from commit bb066cb806)
2021-08-27 16:22:12 -07:00
Dmitry V. Levin
dd5ed1e875 NEWS: add entries for bugs 17343, 20419, 22644, 22786, 22884, 22947, 23005, 23037, 23069, 23137 2021-08-27 16:22:12 -07:00
Paul Pluzhnikov
1073cbb0ba Fix path length overflow in realpath [BZ #22786]
Integer addition overflow may cause stack buffer overflow
when realpath() input length is close to SSIZE_MAX.

2018-05-09  Paul Pluzhnikov  <ppluzhnikov@google.com>

	[BZ #22786]
	* stdlib/canonicalize.c (__realpath): Fix overflow in path length
	computation.
	* stdlib/Makefile (test-bz22786): New test.
	* stdlib/test-bz22786.c: New test.

(cherry picked from commit 5460617d15)
2021-08-27 16:22:12 -07:00
Paul Pluzhnikov
c13e59843a Fix stack overflow with huge PT_NOTE segment [BZ #20419]
A PT_NOTE in a binary could be arbitratily large, so using alloca
for it may cause stack overflow.  If the note is larger than
__MAX_ALLOCA_CUTOFF, use dynamically allocated memory to read it in.

2018-05-05  Paul Pluzhnikov  <ppluzhnikov@google.com>

	[BZ #20419]
	* elf/dl-load.c (open_verify): Fix stack overflow.
	* elf/Makefile (tst-big-note): New test.
	* elf/tst-big-note-lib.S: New.
	* elf/tst-big-note.c: New.

(cherry picked from commit 0065aaaaae)
2021-08-27 16:22:12 -07:00
Stefan Liebler
b3356fb4a1 Fix blocking pthread_join. [BZ #23137]
On s390 (31bit) if glibc is build with -Os, pthread_join sometimes
blocks indefinitely. This is e.g. observable with
testcase intl/tst-gettext6.

pthread_join is calling lll_wait_tid(tid), which performs the futex-wait
syscall in a loop as long as tid != 0 (thread is alive).

On s390 (and build with -Os), tid is loaded from memory before
comparing against zero and then the tid is loaded a second time
in order to pass it to the futex-wait-syscall.
If the thread exits in between, then the futex-wait-syscall is
called with the value zero and it waits until a futex-wake occurs.
As the thread is already exited, there won't be a futex-wake.

In lll_wait_tid, the tid is stored to the local variable __tid,
which is then used as argument for the futex-wait-syscall.
But unfortunately the compiler is allowed to reload the value
from memory.

With this patch, the tid is loaded with atomic_load_acquire.
Then the compiler is not allowed to reload the value for __tid from memory.

ChangeLog:

	[BZ #23137]
	* sysdeps/nptl/lowlevellock.h (lll_wait_tid):
	Use atomic_load_acquire to load __tid.

(cherry picked from commit 1660901840)
2021-08-27 16:22:12 -07:00
Joseph Myers
1ab675ca63 Add PTRACE_SECCOMP_GET_METADATA from Linux 4.16 to sys/ptrace.h.
This patch adds the PTRACE_SECCOMP_GET_METADATA constant from Linux
4.16 to all relevant sys/ptrace.h files.  A type struct
__ptrace_seccomp_metadata, analogous to other such types, is also
added.

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

	* sysdeps/unix/sysv/linux/sys/ptrace.h
	(PTRACE_SECCOMP_GET_METADATA): New enum value and macro.
	* sysdeps/unix/sysv/linux/bits/ptrace-shared.h
	(struct __ptrace_seccomp_metadata): New type.
	* sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h
	(PTRACE_SECCOMP_GET_METADATA): Likewise.
	* sysdeps/unix/sysv/linux/arm/sys/ptrace.h
	(PTRACE_SECCOMP_GET_METADATA): Likewise.
	* sysdeps/unix/sysv/linux/ia64/sys/ptrace.h
	(PTRACE_SECCOMP_GET_METADATA): Likewise.
	* sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h
	(PTRACE_SECCOMP_GET_METADATA): Likewise.
	* sysdeps/unix/sysv/linux/s390/sys/ptrace.h
	(PTRACE_SECCOMP_GET_METADATA): Likewise.
	* sysdeps/unix/sysv/linux/sparc/sys/ptrace.h
	(PTRACE_SECCOMP_GET_METADATA): Likewise.
	* sysdeps/unix/sysv/linux/tile/sys/ptrace.h
	(PTRACE_SECCOMP_GET_METADATA): Likewise.
	* sysdeps/unix/sysv/linux/x86/sys/ptrace.h
	(PTRACE_SECCOMP_GET_METADATA): Likewise.

(cherry picked from commit 9320ca88a1)
2021-08-27 16:22:11 -07:00
Florian Weimer
43092e2ec2 resolv: Fully initialize struct mmsghdr in send_dg [BZ #23037]
(cherry picked from commit 583a27d525)
2021-08-27 16:22:11 -07:00