summaryrefslogtreecommitdiff
path: root/Kernel/Syscalls
diff options
context:
space:
mode:
authorTimon Kruiper <timonkruiper@gmail.com>2023-04-02 16:25:52 +0200
committerIdan Horowitz <idan.horowitz@gmail.com>2023-04-06 21:19:58 +0300
commit00df1fc0601e9710df05e306e20402baed3b341a (patch)
tree9bc22efdce98b60db6ea6d634f68ce5581741757 /Kernel/Syscalls
parent4e00c63897b8c1956d53cb38249a047d5386aadf (diff)
downloadserenity-00df1fc0601e9710df05e306e20402baed3b341a.zip
Kernel: Store FPU state when dispatching signal on aarch64
And make sure to also restore it in sys$sigreturn.
Diffstat (limited to 'Kernel/Syscalls')
-rw-r--r--Kernel/Syscalls/sigaction.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/Kernel/Syscalls/sigaction.cpp b/Kernel/Syscalls/sigaction.cpp
index 7071b92978..cd17407109 100644
--- a/Kernel/Syscalls/sigaction.cpp
+++ b/Kernel/Syscalls/sigaction.cpp
@@ -87,14 +87,12 @@ ErrorOr<FlatPtr> Process::sys$sigreturn(RegisterState& registers)
// Stack state (created by the signal trampoline):
// saved_ax, ucontext, signal_info, fpu_state?.
-#if ARCH(X86_64)
// The FPU state is at the top here, pop it off and restore it.
// FIXME: The stack alignment is off by 8 bytes here, figure this out and remove this excessively aligned object.
alignas(alignof(FPUState) * 2) FPUState data {};
TRY(copy_from_user(&data, bit_cast<FPUState const*>(stack_ptr)));
Thread::current()->fpu_state() = data;
stack_ptr += sizeof(FPUState);
-#endif
stack_ptr += sizeof(siginfo); // We don't need this here.