Skip to content

Commit

Permalink
aarch64: use 0x516 as magic signal return address
Browse files Browse the repository at this point in the history
  • Loading branch information
klange committed Jan 22, 2024
1 parent bad793c commit ba5c9d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion kernel/arch/aarch64/arch.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ void arch_enter_signal_handler(uintptr_t entrypoint, int signum, struct regs *r)
"r"(0));

register uint64_t x0 __asm__("x0") = signum;
register uint64_t x30 __asm__("x30") = 0x8DEADBEEF;
register uint64_t x30 __asm__("x30") = 0x516;
register uint64_t x4 __asm__("x4") = (uintptr_t)this_core->sp_el1;

asm volatile(
Expand Down
2 changes: 1 addition & 1 deletion kernel/arch/aarch64/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ void aarch64_sync_enter(struct regs * r) {
}

/* Magic signal return */
if (elr == 0x8DEADBEEF && far == 0x8DEADBEEF) {
if (elr == 0x516 && far == 0x516) {
return_from_signal_handler(r);
goto _resume_user;
}
Expand Down

0 comments on commit ba5c9d7

Please sign in to comment.