projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6dc72c3
)
x86/mm/pti: Map ESPFIX into user space
author
Andy Lutomirski
<
[email protected]
>
Fri, 15 Dec 2017 21:08:18 +0000
(22:08 +0100)
committer
Ingo Molnar
<
[email protected]
>
Sat, 23 Dec 2017 20:13:00 +0000
(21:13 +0100)
Map the ESPFIX pages into user space when PTI is enabled.
Signed-off-by: Andy Lutomirski <
[email protected]
>
Signed-off-by: Thomas Gleixner <
[email protected]
>
Cc: Borislav Petkov <
[email protected]
>
Cc: Brian Gerst <
[email protected]
>
Cc: Dave Hansen <
[email protected]
>
Cc: David Laight <
[email protected]
>
Cc: H. Peter Anvin <
[email protected]
>
Cc: Josh Poimboeuf <
[email protected]
>
Cc: Juergen Gross <
[email protected]
>
Cc: Kees Cook <
[email protected]
>
Cc: Linus Torvalds <
[email protected]
>
Cc: Peter Zijlstra <
[email protected]
>
Signed-off-by: Ingo Molnar <
[email protected]
>
arch/x86/mm/pti.c
patch
|
blob
|
history
diff --git
a/arch/x86/mm/pti.c
b/arch/x86/mm/pti.c
index 0e78797650a7e49cfd2edc2ee695b003cd89f63f..b1c38ef9fbbb7830eb01f109b80799d01ef90afc 100644
(file)
--- a/
arch/x86/mm/pti.c
+++ b/
arch/x86/mm/pti.c
@@
-287,6
+287,16
@@
static void __init pti_clone_user_shared(void)
pti_clone_p4d(CPU_ENTRY_AREA_BASE);
}
+/*
+ * Clone the ESPFIX P4D into the user space visinble page table
+ */
+static void __init pti_setup_espfix64(void)
+{
+#ifdef CONFIG_X86_ESPFIX64
+ pti_clone_p4d(ESPFIX_BASE_ADDR);
+#endif
+}
+
/*
* Clone the populated PMDs of the entry and irqentry text and force it RO.
*/
@@
-308,4
+318,5
@@
void __init pti_init(void)
pti_clone_user_shared();
pti_clone_entry_text();
+ pti_setup_espfix64();
}