diff options
-rw-r--r-- | arch/x86/include/asm/pgtable-2level.h | 9 | ||||
-rw-r--r-- | security/Kconfig | 2 |
2 files changed, 1 insertions, 10 deletions
diff --git a/arch/x86/include/asm/pgtable-2level.h b/arch/x86/include/asm/pgtable-2level.h index 24c6cf5f16b7..60d0f9015317 100644 --- a/arch/x86/include/asm/pgtable-2level.h +++ b/arch/x86/include/asm/pgtable-2level.h | |||
@@ -19,9 +19,6 @@ static inline void native_set_pte(pte_t *ptep , pte_t pte) | |||
19 | 19 | ||
20 | static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd) | 20 | static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd) |
21 | { | 21 | { |
22 | #ifdef CONFIG_PAGE_TABLE_ISOLATION | ||
23 | pmd.pud.p4d.pgd = pti_set_user_pgtbl(&pmdp->pud.p4d.pgd, pmd.pud.p4d.pgd); | ||
24 | #endif | ||
25 | *pmdp = pmd; | 22 | *pmdp = pmd; |
26 | } | 23 | } |
27 | 24 | ||
@@ -61,9 +58,6 @@ static inline pte_t native_ptep_get_and_clear(pte_t *xp) | |||
61 | #ifdef CONFIG_SMP | 58 | #ifdef CONFIG_SMP |
62 | static inline pmd_t native_pmdp_get_and_clear(pmd_t *xp) | 59 | static inline pmd_t native_pmdp_get_and_clear(pmd_t *xp) |
63 | { | 60 | { |
64 | #ifdef CONFIG_PAGE_TABLE_ISOLATION | ||
65 | pti_set_user_pgtbl(&xp->pud.p4d.pgd, __pgd(0)); | ||
66 | #endif | ||
67 | return __pmd(xchg((pmdval_t *)xp, 0)); | 61 | return __pmd(xchg((pmdval_t *)xp, 0)); |
68 | } | 62 | } |
69 | #else | 63 | #else |
@@ -73,9 +67,6 @@ static inline pmd_t native_pmdp_get_and_clear(pmd_t *xp) | |||
73 | #ifdef CONFIG_SMP | 67 | #ifdef CONFIG_SMP |
74 | static inline pud_t native_pudp_get_and_clear(pud_t *xp) | 68 | static inline pud_t native_pudp_get_and_clear(pud_t *xp) |
75 | { | 69 | { |
76 | #ifdef CONFIG_PAGE_TABLE_ISOLATION | ||
77 | pti_set_user_pgtbl(&xp->p4d.pgd, __pgd(0)); | ||
78 | #endif | ||
79 | return __pud(xchg((pudval_t *)xp, 0)); | 70 | return __pud(xchg((pudval_t *)xp, 0)); |
80 | } | 71 | } |
81 | #else | 72 | #else |
diff --git a/security/Kconfig b/security/Kconfig index 27d8b2688f75..d9aa521b5206 100644 --- a/security/Kconfig +++ b/security/Kconfig | |||
@@ -57,7 +57,7 @@ config SECURITY_NETWORK | |||
57 | config PAGE_TABLE_ISOLATION | 57 | config PAGE_TABLE_ISOLATION |
58 | bool "Remove the kernel mapping in user mode" | 58 | bool "Remove the kernel mapping in user mode" |
59 | default y | 59 | default y |
60 | depends on X86 && !UML | 60 | depends on (X86_64 || X86_PAE) && !UML |
61 | help | 61 | help |
62 | This feature reduces the number of hardware side channels by | 62 | This feature reduces the number of hardware side channels by |
63 | ensuring that the majority of kernel addresses are not mapped | 63 | ensuring that the majority of kernel addresses are not mapped |