From ba5c9d78477ca46da7dd87af999e85a4cbadcef9 Mon Sep 17 00:00:00 2001 From: "K. Lange" Date: Mon, 22 Jan 2024 21:08:21 +0900 Subject: [PATCH] aarch64: use 0x516 as magic signal return address --- kernel/arch/aarch64/arch.c | 2 +- kernel/arch/aarch64/main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/arch/aarch64/arch.c b/kernel/arch/aarch64/arch.c index e60b9b28..05f58097 100644 --- a/kernel/arch/aarch64/arch.c +++ b/kernel/arch/aarch64/arch.c @@ -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( diff --git a/kernel/arch/aarch64/main.c b/kernel/arch/aarch64/main.c index ff999a71..e5608942 100644 --- a/kernel/arch/aarch64/main.c +++ b/kernel/arch/aarch64/main.c @@ -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; }