0109-x86-mm-Define-_PAGE_TABLE-using-_KERNPG_TABLE.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. From 19a0f9475a62580729769eb430d5dd38026f0f02 Mon Sep 17 00:00:00 2001
  2. From: Borislav Petkov <[email protected]>
  3. Date: Fri, 3 Nov 2017 11:20:28 +0100
  4. Subject: [PATCH 109/242] x86/mm: Define _PAGE_TABLE using _KERNPG_TABLE
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. CVE-2017-5754
  9. ... so that the difference is obvious.
  10. No functionality change.
  11. Signed-off-by: Borislav Petkov <[email protected]>
  12. Cc: Linus Torvalds <[email protected]>
  13. Cc: Peter Zijlstra <[email protected]>
  14. Cc: Thomas Gleixner <[email protected]>
  15. Link: http://lkml.kernel.org/r/[email protected]
  16. Signed-off-by: Ingo Molnar <[email protected]>
  17. (backported from commit c7da092a1f243bfd1bfb4124f538e69e941882da)
  18. Signed-off-by: Andy Whitcroft <[email protected]>
  19. Signed-off-by: Kleber Sacilotto de Souza <[email protected]>
  20. (cherry picked from commit 8c69b0c03cd24576ac69c36ede00afae76bab464)
  21. Signed-off-by: Fabian Grünbichler <[email protected]>
  22. ---
  23. arch/x86/include/asm/pgtable_types.h | 3 +--
  24. 1 file changed, 1 insertion(+), 2 deletions(-)
  25. diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h
  26. index bf9638e1ee42..01f6dc938ccb 100644
  27. --- a/arch/x86/include/asm/pgtable_types.h
  28. +++ b/arch/x86/include/asm/pgtable_types.h
  29. @@ -121,10 +121,9 @@
  30. #define _PAGE_PROTNONE (_AT(pteval_t, 1) << _PAGE_BIT_PROTNONE)
  31. -#define _PAGE_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | \
  32. - _PAGE_ACCESSED | _PAGE_DIRTY)
  33. #define _KERNPG_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | \
  34. _PAGE_DIRTY)
  35. +#define _PAGE_TABLE (_KERNPG_TABLE | _PAGE_USER)
  36. /*
  37. * Set of bits not changed in pte_modify. The pte's
  38. --
  39. 2.14.2