Kernel: Fix signal trampoline

32 bit did not even support it and 64 bit did not align stack
This commit is contained in:
2024-04-18 13:32:40 +03:00
parent a698f91db4
commit 061012a268
4 changed files with 18 additions and 6 deletions

View File

@@ -23,12 +23,18 @@ signal_trampoline:
pushq %r14
pushq %r15
// This is 16 byte aligned
movq 128(%rsp), %rdi
movq 120(%rsp), %rax
// align stack to 16 bytes
movq %rsp, %rbx
andq $0x0F, %rbx
subq %rbx, %rsp
call *%rax
// restore stack
addq %rbx, %rsp
popq %r15
popq %r14
popq %r13