Commit ba602791 authored by Alexander Kartashov's avatar Alexander Kartashov Committed by Pavel Emelyanov

restorer: wrapped the assembly code executed on a rt_sigreturn failure into the…

restorer: wrapped the assembly code executed on a rt_sigreturn failure into the macro ARCH_FAIL_CORE_RESTORE.
Signed-off-by: 's avatarAlexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent e37c1562
......@@ -120,6 +120,15 @@ struct rt_sigframe {
"g"(&thread_args[i]) \
: "rax", "rdi", "rsi", "rdx", "r10", "memory")
#define ARCH_FAIL_CORE_RESTORE \
asm volatile( \
"movq %0, %%rsp \n" \
"movq 0, %%rax \n" \
"jmp *%%rax \n" \
: \
: "r"(ret) \
: "memory")
int restore_gpregs(struct rt_sigframe *f, UserX86RegsEntry *r);
......
......@@ -715,12 +715,7 @@ core_restore_end:
return -1;
core_restore_failed:
asm volatile(
"movq %0, %%rsp \n"
"movq 0, %%rax \n"
"jmp *%%rax \n"
:
: "r"(ret)
: "memory");
ARCH_FAIL_CORE_RESTORE;
return ret;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment