glibc/sysdeps
John David Anglin c6f9085ee4 hppa: Fix swapcontext
This change fixes the failure of stdlib/tst-setcontext2 and
stdlib/tst-setcontext7 on hppa.  The implementation of swapcontext
in C is broken.  C saves the return pointer (rp) and any non
call-clobbered registers (in this case r3, r4 and r5) on the
stack.  However, the setcontext call in swapcontext pops the
stack and subsequent calls clobber the saved registers.  When
the context in oucp is restored, both tests fault.

Here we rewrite swapcontext in assembly code to avoid using
the stack for register values that need to be used after
restoration.  The getcontext and setcontext routines are
revised to save and restore register ret1 for normal returns.
We copy the oucp pointer to ret1.  This allows access to
the old context after calling getcontext and setcontext.

(cherry picked from commit 71b108d7eb)
2022-03-06 16:00:52 +00:00
..
aarch64 AArch64: Check for SVE in ifuncs [BZ #28744] 2022-01-07 10:10:27 +01:00
alpha nptl: Move pthread_spin_trylock into libc 2021-04-23 17:06:48 +02:00
arc ARC: elf: make type safe 2021-07-21 13:13:45 -07:00
arm nptl: Remove remaining code from libpthread 2021-05-21 22:35:01 +02:00
csky Reduce the statically linked startup code [BZ #23323] 2021-02-25 12:13:02 +01:00
generic ld.so: Initialize bootstrap_map.l_ld_readonly [BZ #28340] 2021-11-03 07:53:12 +01:00
gnu hurd: Fix glob lstat compatibility 2021-07-22 20:31:52 +02:00
hppa Fix elf/tst-audit2 on hppa 2022-03-06 15:56:57 +00:00
htl htl: Do not expose pthread hidden proto outside libpthread 2021-07-18 20:25:33 +00:00
hurd Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
i386 i386: Regenerate ulps 2021-07-25 22:29:27 +02:00
ia64 nptl: Remove remaining code from libpthread 2021-05-21 22:35:01 +02:00
ieee754 Update math: redirect roundeven function 2021-06-27 07:56:57 -07:00
m68k m68: Fix build after 9acda61d94 2021-04-06 15:10:31 -03:00
mach hurd if_index: Explicitly use AF_INET for if index discovery 2022-02-03 16:22:04 +01:00
microblaze Reduce the statically linked startup code [BZ #23323] 2021-02-25 12:13:02 +01:00
mips ld.so: Initialize bootstrap_map.l_ld_readonly [BZ #28340] 2021-11-03 07:53:12 +01:00
nios2 Update Nios II libm-test-ulps. 2021-04-01 19:41:40 +00:00
nptl nptl: Fix type of pthread_mutexattr_getrobust_np, pthread_mutexattr_setrobust_np (bug 28036) 2021-09-21 07:15:25 +02:00
posix getcwd: Set errno to ERANGE for size == 1 (CVE-2021-3999) 2022-01-24 11:37:06 +05:30
powerpc powerpc: Fix unrecognized instruction errors with recent binutils 2022-01-18 23:05:42 +01:00
pthread pthread/tst-cancel28: Fix barrier re-init race condition 2021-12-14 10:07:27 +05:30
riscv riscv: align stack before calling _dl_init [BZ #28703] 2021-12-17 22:50:13 +01:00
s390 s390: Use long branches across object boundaries (jgh instead of jh) 2021-11-10 15:22:24 +01:00
sh nptl: Move pthread_spin_trylock into libc 2021-04-23 17:06:48 +02:00
sparc Update sparc libm-test-ulps 2021-12-18 23:45:53 +01:00
unix hppa: Fix swapcontext 2022-03-06 16:00:52 +00:00
wordsize-32 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
wordsize-64 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
x86 x86: Fix TEST_NAME to make it a string in tst-strncmp-rtm.c 2022-02-18 15:34:40 -08:00
x86_64 x86: Fallback {str|wcs}cmp RTM in the ncmp overflow case [BZ #28896] 2022-02-18 14:59:47 -08:00