diff --git a/src/arch/x86_64/isr.asm b/src/arch/x86_64/isr.asm index 4b9ab85b..0d56457e 100644 --- a/src/arch/x86_64/isr.asm +++ b/src/arch/x86_64/isr.asm @@ -77,6 +77,14 @@ section .text pop r15 pop rdi pop rsi + + ; check and patch ss if it is invalid because of the syscall instruction + cmp qword [rsp+48], 0x33 + jne .nofix + mov qword [rsp+48], 0x43 + .nofix: + + pop rbp add rsp,8 ; remove error code