mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
[NTOS:KE/x64] On syscalls clear nested task flag
When this flag is not cleared and the system returns with an IRET, this causes a #GP. Randomly hit by the umkm:SystemCall test.
This commit is contained in:
parent
701b0a3f24
commit
b8e50f787d
1 changed files with 1 additions and 1 deletions
|
@ -218,7 +218,7 @@ KiInitializeCpu(PKIPCR Pcr)
|
||||||
((ULONG64)(KGDT64_R3_CMCODE|RPL_MASK) << 48));
|
((ULONG64)(KGDT64_R3_CMCODE|RPL_MASK) << 48));
|
||||||
|
|
||||||
/* Set the flags to be cleared when doing a syscall */
|
/* Set the flags to be cleared when doing a syscall */
|
||||||
__writemsr(MSR_SYSCALL_MASK, EFLAGS_IF_MASK | EFLAGS_TF | EFLAGS_DF);
|
__writemsr(MSR_SYSCALL_MASK, EFLAGS_IF_MASK | EFLAGS_TF | EFLAGS_DF | EFLAGS_NESTED_TASK);
|
||||||
|
|
||||||
/* Enable syscall instruction and no-execute support */
|
/* Enable syscall instruction and no-execute support */
|
||||||
__writemsr(MSR_EFER, __readmsr(MSR_EFER) | MSR_SCE | MSR_NXE);
|
__writemsr(MSR_EFER, __readmsr(MSR_EFER) | MSR_SCE | MSR_NXE);
|
||||||
|
|
Loading…
Reference in a new issue