hurd: Fix x86_64 sigreturn restoring bogus reply_port
authorSergey Bugaev <bugaevc@gmail.com>
Sun, 4 Jun 2023 17:05:51 +0000 (19:05 +0200)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 4 Jun 2023 17:05:51 +0000 (19:05 +0200)
commit67f704ab69e2305c2b9043d3451df33edbf99b05
tree87c552167f528d9915033e8204bf91054bbe8165
parent547de57e5a54d3a02733523b75f261e95fc71579
hurd: Fix x86_64 sigreturn restoring bogus reply_port

Since the area of the user's stack we use for the registers dump (and
otherwise as __sigreturn2's stack) can and does overlap the sigcontext,
we have to be very careful about the order of loads and stores that we
do. In particular we have to load sc_reply_port before we start
clobbering the sigcontext.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
sysdeps/mach/hurd/x86_64/sigreturn.c