0176-x86-mm-Use-__flush_tlb_one-for-kernel-memory.patch 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. From 23e04cdf533d255ec9b5bb58229b6785b17fd3f1 Mon Sep 17 00:00:00 2001
  2. From: Peter Zijlstra <[email protected]>
  3. Date: Tue, 5 Dec 2017 13:34:49 +0100
  4. Subject: [PATCH 176/242] x86/mm: Use __flush_tlb_one() for kernel memory
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. CVE-2017-5754
  9. __flush_tlb_single() is for user mappings, __flush_tlb_one() for
  10. kernel mappings.
  11. Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
  12. Signed-off-by: Thomas Gleixner <[email protected]>
  13. Cc: Andy Lutomirski <[email protected]>
  14. Cc: Boris Ostrovsky <[email protected]>
  15. Cc: Borislav Petkov <[email protected]>
  16. Cc: Brian Gerst <[email protected]>
  17. Cc: Dave Hansen <[email protected]>
  18. Cc: David Laight <[email protected]>
  19. Cc: Denys Vlasenko <[email protected]>
  20. Cc: Eduardo Valentin <[email protected]>
  21. Cc: Greg KH <[email protected]>
  22. Cc: H. Peter Anvin <[email protected]>
  23. Cc: Josh Poimboeuf <[email protected]>
  24. Cc: Juergen Gross <[email protected]>
  25. Cc: Linus Torvalds <[email protected]>
  26. Cc: Peter Zijlstra <[email protected]>
  27. Cc: Will Deacon <[email protected]>
  28. Cc: [email protected]
  29. Cc: [email protected]
  30. Cc: [email protected]
  31. Cc: [email protected]
  32. Cc: [email protected]
  33. Signed-off-by: Ingo Molnar <[email protected]>
  34. (cherry picked from commit a501686b2923ce6f2ff2b1d0d50682c6411baf72)
  35. Signed-off-by: Andy Whitcroft <[email protected]>
  36. Signed-off-by: Kleber Sacilotto de Souza <[email protected]>
  37. (cherry picked from commit 9d23f46143933cd29576b6aa2b1827f3f39b9cf8)
  38. Signed-off-by: Fabian Grünbichler <[email protected]>
  39. ---
  40. arch/x86/mm/tlb.c | 2 +-
  41. 1 file changed, 1 insertion(+), 1 deletion(-)
  42. diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
  43. index ed06f1593390..5b4342c5039c 100644
  44. --- a/arch/x86/mm/tlb.c
  45. +++ b/arch/x86/mm/tlb.c
  46. @@ -546,7 +546,7 @@ static void do_kernel_range_flush(void *info)
  47. /* flush range by one by one 'invlpg' */
  48. for (addr = f->start; addr < f->end; addr += PAGE_SIZE)
  49. - __flush_tlb_single(addr);
  50. + __flush_tlb_one(addr);
  51. }
  52. void flush_tlb_kernel_range(unsigned long start, unsigned long end)
  53. --
  54. 2.14.2