diff --git a/src/arch/x86_64/syscall.asm b/src/arch/x86_64/syscall.asm index 602f2031..946043a5 100644 --- a/src/arch/x86_64/syscall.asm +++ b/src/arch/x86_64/syscall.asm @@ -46,6 +46,8 @@ asm_syscall_entry: push qword [gs:0] ; save old stack mov [gs:0], rsp ; return back the kernel stack add qword [gs:0], 8 ; fix it + + sti push rcx ; old rip push r11 ; old rflags @@ -90,6 +92,8 @@ asm_syscall_entry: mov es,r11 mov ds,r11 + cli + pop r11 pop rcx pop rsp