@@ -909,7 +909,7 @@ static inline int is_new_memtype_allowed(u64 paddr, unsigned long size,
909909pmd_t * populate_extra_pmd (unsigned long vaddr );
910910pte_t * populate_extra_pte (unsigned long vaddr );
911911
912- #ifdef CONFIG_PAGE_TABLE_ISOLATION
912+ #ifdef CONFIG_MITIGATION_PAGE_TABLE_ISOLATION
913913pgd_t __pti_set_user_pgtbl (pgd_t * pgdp , pgd_t pgd );
914914
915915/*
@@ -923,12 +923,12 @@ static inline pgd_t pti_set_user_pgtbl(pgd_t *pgdp, pgd_t pgd)
923923 return pgd ;
924924 return __pti_set_user_pgtbl (pgdp , pgd );
925925}
926- #else /* CONFIG_PAGE_TABLE_ISOLATION */
926+ #else /* CONFIG_MITIGATION_PAGE_TABLE_ISOLATION */
927927static inline pgd_t pti_set_user_pgtbl (pgd_t * pgdp , pgd_t pgd )
928928{
929929 return pgd ;
930930}
931- #endif /* CONFIG_PAGE_TABLE_ISOLATION */
931+ #endif /* CONFIG_MITIGATION_PAGE_TABLE_ISOLATION */
932932
933933#endif /* __ASSEMBLY__ */
934934
@@ -1131,7 +1131,7 @@ static inline int p4d_bad(p4d_t p4d)
11311131{
11321132 unsigned long ignore_flags = _KERNPG_TABLE | _PAGE_USER ;
11331133
1134- if (IS_ENABLED (CONFIG_PAGE_TABLE_ISOLATION ))
1134+ if (IS_ENABLED (CONFIG_MITIGATION_PAGE_TABLE_ISOLATION ))
11351135 ignore_flags |= _PAGE_NX ;
11361136
11371137 return (p4d_flags (p4d ) & ~ignore_flags ) != 0 ;
@@ -1177,7 +1177,7 @@ static inline int pgd_bad(pgd_t pgd)
11771177 if (!pgtable_l5_enabled ())
11781178 return 0 ;
11791179
1180- if (IS_ENABLED (CONFIG_PAGE_TABLE_ISOLATION ))
1180+ if (IS_ENABLED (CONFIG_MITIGATION_PAGE_TABLE_ISOLATION ))
11811181 ignore_flags |= _PAGE_NX ;
11821182
11831183 return (pgd_flags (pgd ) & ~ignore_flags ) != _KERNPG_TABLE ;
@@ -1422,9 +1422,9 @@ static inline bool pgdp_maps_userspace(void *__ptr)
14221422#define pgd_leaf pgd_large
14231423static inline int pgd_large (pgd_t pgd ) { return 0 ; }
14241424
1425- #ifdef CONFIG_PAGE_TABLE_ISOLATION
1425+ #ifdef CONFIG_MITIGATION_PAGE_TABLE_ISOLATION
14261426/*
1427- * All top-level PAGE_TABLE_ISOLATION page tables are order-1 pages
1427+ * All top-level MITIGATION_PAGE_TABLE_ISOLATION page tables are order-1 pages
14281428 * (8k-aligned and 8k in size). The kernel one is at the beginning 4k and
14291429 * the user one is in the last 4k. To switch between them, you
14301430 * just need to flip the 12th bit in their addresses.
@@ -1469,7 +1469,7 @@ static inline p4d_t *user_to_kernel_p4dp(p4d_t *p4dp)
14691469{
14701470 return ptr_clear_bit (p4dp , PTI_PGTABLE_SWITCH_BIT );
14711471}
1472- #endif /* CONFIG_PAGE_TABLE_ISOLATION */
1472+ #endif /* CONFIG_MITIGATION_PAGE_TABLE_ISOLATION */
14731473
14741474/*
14751475 * clone_pgd_range(pgd_t *dst, pgd_t *src, int count);
@@ -1484,7 +1484,7 @@ static inline p4d_t *user_to_kernel_p4dp(p4d_t *p4dp)
14841484static inline void clone_pgd_range (pgd_t * dst , pgd_t * src , int count )
14851485{
14861486 memcpy (dst , src , count * sizeof (pgd_t ));
1487- #ifdef CONFIG_PAGE_TABLE_ISOLATION
1487+ #ifdef CONFIG_MITIGATION_PAGE_TABLE_ISOLATION
14881488 if (!static_cpu_has (X86_FEATURE_PTI ))
14891489 return ;
14901490 /* Clone the user space pgd as well */
0 commit comments