fanghuilin / rpms / kernel

Forked from rpms/kernel 3 years ago
Clone
e293be
diff -up ./arch/x86/include/asm/sync_core.h.pti ./arch/x86/include/asm/sync_core.h
e293be
--- ./arch/x86/include/asm/sync_core.h.pti	2018-10-05 05:18:19.000000000 +0900
e293be
+++ ./arch/x86/include/asm/sync_core.h	2018-10-31 18:57:31.000000000 +0900
e293be
@@ -14,9 +14,11 @@
e293be
  */
e293be
 static inline void sync_core_before_usermode(void)
e293be
 {
e293be
+#ifdef CONFIG_PAGE_TABLE_ISOLATION
e293be
 	/* With PTI, we unconditionally serialize before running user code. */
e293be
 	if (kaiser_active())
e293be
 		return;
e293be
+#endif
e293be
 	/*
e293be
 	 * Return from interrupt and NMI is done through iret, which is core
e293be
 	 * serializing.