diff options
-rw-r--r-- | arch/x86/include/asm/segment.h | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/include/asm/segment.h b/arch/x86/include/asm/segment.h index d394899e055c..5a9856eb12ba 100644 --- a/arch/x86/include/asm/segment.h +++ b/arch/x86/include/asm/segment.h | |||
@@ -39,6 +39,8 @@ | |||
39 | /* ... GDT has it cleared */ | 39 | /* ... GDT has it cleared */ |
40 | #define SEGMENT_GDT 0x0 | 40 | #define SEGMENT_GDT 0x0 |
41 | 41 | ||
42 | #define GDT_ENTRY_INVALID_SEG 0 | ||
43 | |||
42 | #ifdef CONFIG_X86_32 | 44 | #ifdef CONFIG_X86_32 |
43 | /* | 45 | /* |
44 | * The layout of the per-CPU GDT under Linux: | 46 | * The layout of the per-CPU GDT under Linux: |
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index d56d30714d43..3f70538012e2 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/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); | 1184 | wrmsrl_safe(MSR_IA32_SYSENTER_EIP, (u64)ia32_sysenter_target); |
1185 | #else | 1185 | #else |
1186 | wrmsrl(MSR_CSTAR, ignore_sysret); | 1186 | wrmsrl(MSR_CSTAR, ignore_sysret); |
1187 | wrmsrl_safe(MSR_IA32_SYSENTER_CS, 0ULL); | 1187 | wrmsrl_safe(MSR_IA32_SYSENTER_CS, (u64)GDT_ENTRY_INVALID_SEG); |
1188 | wrmsrl_safe(MSR_IA32_SYSENTER_ESP, 0ULL); | 1188 | wrmsrl_safe(MSR_IA32_SYSENTER_ESP, 0ULL); |
1189 | wrmsrl_safe(MSR_IA32_SYSENTER_EIP, 0ULL); | 1189 | wrmsrl_safe(MSR_IA32_SYSENTER_EIP, 0ULL); |
1190 | #endif | 1190 | #endif |