x86-64: switch order of user code and data segments for syscall instruction

This commit is contained in:
Matheus
2023-05-07 17:46:26 -03:00
parent 42b28716a4
commit 9c1e92831d
4 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -9,7 +9,7 @@ isr_%+ i:
; check if swapgs is needed
cmp qword [rsp+16], 0x18
cmp qword [rsp+16], 0x23
jne .notneeded1
swapgs
.notneeded1:
@@ -73,7 +73,7 @@ isr_%+ i:
add rsp,8 ; remove error code
; check if swapgs is needed
cmp qword [rsp+8], 0x18
cmp qword [rsp+8], 0x23
jne .notneeded2
swapgs
.notneeded2: