x86, smap: Add STAC and CLAC instructions to control user space access
[cascardo/linux.git] / arch / x86 / kernel / cpu / common.c
index a5fbc3c..cd43e52 100644 (file)
@@ -1113,7 +1113,8 @@ void syscall_init(void)
 
        /* Flags to clear on syscall */
        wrmsrl(MSR_SYSCALL_MASK,
-              X86_EFLAGS_TF|X86_EFLAGS_DF|X86_EFLAGS_IF|X86_EFLAGS_IOPL);
+              X86_EFLAGS_TF|X86_EFLAGS_DF|X86_EFLAGS_IF|
+              X86_EFLAGS_IOPL|X86_EFLAGS_AC);
 }
 
 unsigned long kernel_eflags;