cpu: dont access cpu local storage using rdmsr

This commit is contained in:
Matheus
2024-04-29 21:26:47 -03:00
parent 43b209666f
commit 27d24f3e20
2 changed files with 8 additions and 3 deletions
+2 -1
View File
@@ -130,7 +130,8 @@ arch_syscall_entry:
; because it's still using the user stack
mov cr2, rax
; rax can be used just fine now
mov rax, [gs:0x0] ; thread pointer
mov rax, [gs:0x0] ; cpu pointer
mov rax, [rax] ; thread pointer
mov rax, [rax] ; kernel stack top
xchg rsp, rax ; switch stack pointers