]> git.proxmox.com Git - pve-kernel.git/blame - patches/kernel/0160-x86-paravirt-Dont-patch-flush_tlb_single.patch
KPTI: add follow-up fixes
[pve-kernel.git] / patches / kernel / 0160-x86-paravirt-Dont-patch-flush_tlb_single.patch
CommitLineData
321d628a
FG
1From 0f8a85764c86b5ce79e22969f87b2da087b05729 Mon Sep 17 00:00:00 2001
2From: Thomas Gleixner <tglx@linutronix.de>
3Date: Mon, 4 Dec 2017 15:07:30 +0100
e4cdf2a5 4Subject: [PATCH 160/241] x86/paravirt: Dont patch flush_tlb_single
321d628a
FG
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9CVE-2017-5754
10
11native_flush_tlb_single() will be changed with the upcoming
12PAGE_TABLE_ISOLATION feature. This requires to have more code in
13there than INVLPG.
14
15Remove the paravirt patching for it.
16
17Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
18Reviewed-by: Josh Poimboeuf <jpoimboe@redhat.com>
19Reviewed-by: Juergen Gross <jgross@suse.com>
20Acked-by: Peter Zijlstra <peterz@infradead.org>
21Cc: Andy Lutomirski <luto@kernel.org>
22Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
23Cc: Borislav Petkov <bp@alien8.de>
24Cc: Borislav Petkov <bpetkov@suse.de>
25Cc: Brian Gerst <brgerst@gmail.com>
26Cc: Dave Hansen <dave.hansen@intel.com>
27Cc: Dave Hansen <dave.hansen@linux.intel.com>
28Cc: David Laight <David.Laight@aculab.com>
29Cc: Denys Vlasenko <dvlasenk@redhat.com>
30Cc: Eduardo Valentin <eduval@amazon.com>
31Cc: Greg KH <gregkh@linuxfoundation.org>
32Cc: H. Peter Anvin <hpa@zytor.com>
33Cc: Linus Torvalds <torvalds@linux-foundation.org>
34Cc: Rik van Riel <riel@redhat.com>
35Cc: Will Deacon <will.deacon@arm.com>
36Cc: aliguori@amazon.com
37Cc: daniel.gruss@iaik.tugraz.at
38Cc: hughd@google.com
39Cc: keescook@google.com
40Cc: linux-mm@kvack.org
41Cc: michael.schwarz@iaik.tugraz.at
42Cc: moritz.lipp@iaik.tugraz.at
43Cc: richard.fellner@student.tugraz.at
44Link: https://lkml.kernel.org/r/20171204150606.828111617@linutronix.de
45Signed-off-by: Ingo Molnar <mingo@kernel.org>
46(cherry picked from commit a035795499ca1c2bd1928808d1a156eda1420383)
47Signed-off-by: Andy Whitcroft <apw@canonical.com>
48Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
49(cherry picked from commit 435d79a109b8c04d76a6cdb32b9b49a262f75e61)
50Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
51---
52 arch/x86/kernel/paravirt_patch_64.c | 2 --
53 1 file changed, 2 deletions(-)
54
55diff --git a/arch/x86/kernel/paravirt_patch_64.c b/arch/x86/kernel/paravirt_patch_64.c
56index 11aaf1eaa0e4..c354833342bd 100644
57--- a/arch/x86/kernel/paravirt_patch_64.c
58+++ b/arch/x86/kernel/paravirt_patch_64.c
59@@ -9,7 +9,6 @@ DEF_NATIVE(pv_irq_ops, save_fl, "pushfq; popq %rax");
60 DEF_NATIVE(pv_mmu_ops, read_cr2, "movq %cr2, %rax");
61 DEF_NATIVE(pv_mmu_ops, read_cr3, "movq %cr3, %rax");
62 DEF_NATIVE(pv_mmu_ops, write_cr3, "movq %rdi, %cr3");
63-DEF_NATIVE(pv_mmu_ops, flush_tlb_single, "invlpg (%rdi)");
64 DEF_NATIVE(pv_cpu_ops, wbinvd, "wbinvd");
65
66 DEF_NATIVE(pv_cpu_ops, usergs_sysret64, "swapgs; sysretq");
67@@ -59,7 +58,6 @@ unsigned native_patch(u8 type, u16 clobbers, void *ibuf,
68 PATCH_SITE(pv_mmu_ops, read_cr2);
69 PATCH_SITE(pv_mmu_ops, read_cr3);
70 PATCH_SITE(pv_mmu_ops, write_cr3);
71- PATCH_SITE(pv_mmu_ops, flush_tlb_single);
72 PATCH_SITE(pv_cpu_ops, wbinvd);
73 #if defined(CONFIG_PARAVIRT_SPINLOCKS)
74 case PARAVIRT_PATCH(pv_lock_ops.queued_spin_unlock):
75--
762.14.2
77