From 3f18b6e392f47c48ba96039d637a4724f09218a1 Mon Sep 17 00:00:00 2001 From: Matheus Date: Mon, 19 Sep 2022 18:35:14 -0300 Subject: [PATCH] isr: add the same ss fix as in the push --- src/arch/x86_64/isr.asm | 8 ++++++++ 1 file changed, 8 insertions(+) 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