[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180222203658.80705136@viggo.jf.intel.com>
Date: Thu, 22 Feb 2018 12:36:58 -0800
From: Dave Hansen <dave.hansen@...ux.intel.com>
To: linux-kernel@...r.kernel.org
Cc: Dave Hansen <dave.hansen@...ux.intel.com>, aarcange@...hat.com,
luto@...nel.org, torvalds@...ux-foundation.org,
keescook@...gle.com, hughd@...gle.com, jgross@...e.com,
x86@...nel.org, namit@...are.com
Subject: [RFC][PATCH 04/10] x86/espfix: use kernel-default PTE mask
From: Dave Hansen <dave.hansen@...ux.intel.com>
In creating its page tables, the espfix code masks its PGTABLE_PROT
value with the supported mask: __supported_pte_mask. This ensures
that unsupported bits are not set in the final PTE. But, it also
sets _PAGE_GLOBAL which we do not want for PTE. Use
__default_kernel_pte_mask instead which clears _PAGE_GLOBAL for PTI.
Signed-off-by: Dave Hansen <dave.hansen@...ux.intel.com>
Cc: Andrea Arcangeli <aarcange@...hat.com>
Cc: Andy Lutomirski <luto@...nel.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Kees Cook <keescook@...gle.com>
Cc: Hugh Dickins <hughd@...gle.com>
Cc: Juergen Gross <jgross@...e.com>
Cc: x86@...nel.org
Cc: Nadav Amit <namit@...are.com>
---
b/arch/x86/kernel/espfix_64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN arch/x86/kernel/espfix_64.c~espfix-use-kern-defaults-not-supported arch/x86/kernel/espfix_64.c
--- a/arch/x86/kernel/espfix_64.c~espfix-use-kern-defaults-not-supported 2018-02-22 12:36:19.217036552 -0800
+++ b/arch/x86/kernel/espfix_64.c 2018-02-22 12:36:19.221036552 -0800
@@ -167,7 +167,7 @@ void init_espfix_ap(int cpu)
goto unlock_done;
node = cpu_to_node(cpu);
- ptemask = __supported_pte_mask;
+ ptemask = __default_kernel_pte_mask;
pud_p = &espfix_pud_page[pud_index(addr)];
pud = *pud_p;
_
Powered by blists - more mailing lists