[NTOS:KE:X64] Zero out volatiles when returning from a system call

This commit is contained in:
Timo Kreuzer 2018-05-15 14:07:12 +02:00
parent a016ccd117
commit 1bfacf06f7

View file

@ -824,6 +824,16 @@ IntsEnabled:
/* Swap gs back to user */
swapgs
; Zero out volatiles
pxor xmm0, xmm0
pxor xmm1, xmm1
pxor xmm2, xmm2
pxor xmm3, xmm3
pxor xmm4, xmm4
pxor xmm5, xmm5
xor rdx, rdx
xor r10, r10
/* return to user mode */
.byte HEX(48) // REX prefix to return to long mode
sysret