From 4f0173cdb0129384fed892328259ae8a9671d7c2 Mon Sep 17 00:00:00 2001 From: Puck Meerburg Date: Wed, 27 Sep 2023 23:31:55 +0000 Subject: [PATCH] kernel/x86_64: align the stack before calling the function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit in arch_debug_call_with_fault_handler Change-Id: Iddefb7e93d561f3a6ccf1ee06328e473b28fca2a Reviewed-on: https://review.haiku-os.org/c/haiku/+/6918 Reviewed-by: Jérôme Duval Tested-by: Commit checker robot --- src/system/kernel/arch/x86/64/arch.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/system/kernel/arch/x86/64/arch.S b/src/system/kernel/arch/x86/64/arch.S index 4c4aaa66cc..78b3ac28f2 100644 --- a/src/system/kernel/arch/x86/64/arch.S +++ b/src/system/kernel/arch/x86/64/arch.S @@ -87,6 +87,8 @@ FUNCTION(arch_debug_call_with_fault_handler): // Preserve the jump buffer address for the fault return. push %rsi + // Align the stack before calling the function. + subq $8, %rsp // Set fault handler address, and fault handler stack pointer address. We // don't need to save the previous values, since that's done by the caller.