We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c74d5b commit 6b51311Copy full SHA for 6b51311
arch/x86/include/asm/segment.h
@@ -39,6 +39,8 @@
39
/* ... GDT has it cleared */
40
#define SEGMENT_GDT 0x0
41
42
+#define GDT_ENTRY_INVALID_SEG 0
43
+
44
#ifdef CONFIG_X86_32
45
/*
46
* The layout of the per-CPU GDT under Linux:
arch/x86/kernel/cpu/common.c
@@ -1184,7 +1184,7 @@ void syscall_init(void)
1184
wrmsrl_safe(MSR_IA32_SYSENTER_EIP, (u64)ia32_sysenter_target);
1185
#else
1186
wrmsrl(MSR_CSTAR, ignore_sysret);
1187
- wrmsrl_safe(MSR_IA32_SYSENTER_CS, 0ULL);
+ wrmsrl_safe(MSR_IA32_SYSENTER_CS, (u64)GDT_ENTRY_INVALID_SEG);
1188
wrmsrl_safe(MSR_IA32_SYSENTER_ESP, 0ULL);
1189
wrmsrl_safe(MSR_IA32_SYSENTER_EIP, 0ULL);
1190
#endif
0 commit comments