glibc/sysdeps
Sergey Bugaev 60b21327b1 hurd: Remove the ecx kludge
"We don't need it any more"

The INTR_MSG_TRAP macro in intr-msg.h used to play little trick with
the stack pointer: it would temporarily save the "real" stack pointer
into ecx, while setting esp to point to just before the message buffer,
and then invoke the mach_msg trap. This way, INTR_MSG_TRAP reused the
on-stack arguments laid out for the containing call of
_hurd_intr_rpc_mach_msg (), passing them to the mach_msg trap directly.

This, however, required special support in hurdsig.c and trampoline.c,
since they now had to recognize when a thread is inside the piece of
code where esp doesn't point to the real tip of the stack, and handle
this situation specially.

Commit 1d20f33ff4 has removed the actual
temporary change of esp by actually re-pushing mach_msg arguments onto
the stack, and popping them back at end. It did not, however, deal with
the rest of "the ecx kludge" code in other files, resulting in potential
crashes if a signal arrives in the middle of pushing arguments onto the
stack.

Fix that by removing "the ecx kludge". Instead, when we want a thread
to skip the RPC, but cannot make just make it jump to after the trap
since it's not done adjusting the stack yet, set the SYSRETURN register
to MACH_SEND_INTERRUPTED (as we do anyway), and rely on the thread
itself for detecting this case and skipping the RPC.

This simplifies things somewhat and paves the way for a future x86_64
port of this code.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
Message-Id: <20230301162355.426887-1-bugaevc@gmail.com>
2023-03-02 00:32:55 +01:00
..
aarch64 aarch64: update libm test ulps 2023-02-24 10:55:38 +00:00
alpha alpha: Add string-fza, string-fzb.h, string-fzi.h, and string-shift.h 2023-02-06 16:19:35 -03:00
arc ARC:fpu: add extra capability check before use of sqrt and fma builtins 2023-02-17 16:17:58 -03:00
arm arm: Support gcc older than 10 for find_zero_all 2023-02-20 16:43:42 -03:00
csky C-SKY: Strip hard float abi from hard float feature. 2023-02-07 16:34:24 +08:00
generic elf: Restore ldconfig libc6 implicit soname logic [BZ #30125] 2023-02-20 09:32:46 -03:00
gnu Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
hppa hppa: Add string-fza.h, string-fzc.h, and string-fzi.h 2023-02-06 16:19:35 -03:00
htl htl: Remove ./sysdeps/htl/bits/types/struct___pthread_mutex.h 2023-02-12 17:28:32 +01:00
hurd Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
i386 htl: Generalize i386 pt-machdep.h to x86 2023-02-12 16:33:39 +01:00
ia64 ia64: Regenerate ulps 2023-01-24 11:21:38 -05:00
ieee754 math: Suppress -O0 warnings for soft-fp fsqrt [BZ #19444] 2023-01-11 17:50:51 -03:00
loongarch LoongArch: Add math-barriers.h 2023-02-27 08:18:49 -03:00
m68k string: Remove string_private.h 2023-02-17 15:56:54 -03:00
mach hurd: Remove the ecx kludge 2023-03-02 00:32:55 +01:00
microblaze Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
mips Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
nios2 Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
nptl Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
or1k Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
posix Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
powerpc powerpc:Regenerate ulps for hypot 2023-02-23 22:06:03 -06:00
pthread Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
riscv riscv: Add string-fza.h and string-fzi.h 2023-02-06 16:19:35 -03:00
s390 S390: Fix _FPU_SETCW/GETCW when compiling with Clang [BZ #30130] 2023-02-28 14:01:28 +01:00
sh sh: Add string-fzb.h 2023-02-06 16:19:35 -03:00
sparc sparc (64bit): Regenerate ulps 2023-01-24 11:21:50 -05:00
unix Add AArch64 HWCAP2 values from Linux 6.2 to bits/hwcap.h 2023-02-28 15:57:40 +00:00
wordsize-32 Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
wordsize-64 C2x strtol binary constant handling 2023-02-16 23:02:40 +00:00
x86 x86-64: Add glibc.cpu.prefer_map_32bit_exec [BZ #28656] 2023-02-22 18:28:37 -08:00
x86_64 htl: Add pthreadtypes-arch.h for x86_64 2023-02-27 23:30:15 +01:00