x86_64: Use 0x516 as magic signal return address

This commit is contained in:
K. Lange 2024-01-22 07:24:15 +09:00
parent d3926009b6
commit 231f708c62
2 changed files with 3 additions and 3 deletions

View File

@ -499,8 +499,8 @@ static void _page_fault(struct regs * r) {
uintptr_t faulting_address;
asm volatile("mov %%cr2, %0" : "=r"(faulting_address));
/* 8DEADBEEFh is the magic ret-from-sig address. */
if (faulting_address == 0x8DEADBEEF) {
/* magic ret-from-sig address */
if (faulting_address == 0x516) {
return_from_signal_handler(r);
return;
}

View File

@ -138,7 +138,7 @@ void arch_enter_signal_handler(uintptr_t entrypoint, int signum, struct regs *r)
PUSH(ret.rsp, uint64_t, this_core->current_process->thread.fp_regs[i]);
}
PUSH(ret.rsp, uintptr_t, 0x00000008DEADBEEF);
PUSH(ret.rsp, uintptr_t, 0x516);
update_process_times_on_exit();