]>
Commit | Line | Data |
---|---|---|
59d5af67 | 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
321d628a FG |
2 | From: Andy Lutomirski <luto@kernel.org> |
3 | Date: Tue, 12 Dec 2017 07:56:44 -0800 | |
59d5af67 | 4 | Subject: [PATCH] x86/mm/64: Make a full PGD-entry size hole in the memory map |
321d628a FG |
5 | MIME-Version: 1.0 |
6 | Content-Type: text/plain; charset=UTF-8 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ||
9 | CVE-2017-5754 | |
10 | ||
11 | Shrink vmalloc space from 16384TiB to 12800TiB to enlarge the hole starting | |
12 | at 0xff90000000000000 to be a full PGD entry. | |
13 | ||
14 | A subsequent patch will use this hole for the pagetable isolation LDT | |
15 | alias. | |
16 | ||
17 | Signed-off-by: Andy Lutomirski <luto@kernel.org> | |
18 | Signed-off-by: Thomas Gleixner <tglx@linutronix.de> | |
19 | Cc: Borislav Petkov <bp@alien8.de> | |
20 | Cc: Brian Gerst <brgerst@gmail.com> | |
21 | Cc: Dave Hansen <dave.hansen@intel.com> | |
22 | Cc: Dave Hansen <dave.hansen@linux.intel.com> | |
23 | Cc: David Laight <David.Laight@aculab.com> | |
24 | Cc: H. Peter Anvin <hpa@zytor.com> | |
25 | Cc: Josh Poimboeuf <jpoimboe@redhat.com> | |
26 | Cc: Juergen Gross <jgross@suse.com> | |
27 | Cc: Kees Cook <keescook@chromium.org> | |
28 | Cc: Kirill A. Shutemov <kirill@shutemov.name> | |
29 | Cc: Linus Torvalds <torvalds@linux-foundation.org> | |
30 | Cc: Peter Zijlstra <peterz@infradead.org> | |
31 | Signed-off-by: Ingo Molnar <mingo@kernel.org> | |
32 | (cherry picked from commit 9f449772a3106bcdd4eb8fdeb281147b0e99fb30) | |
33 | Signed-off-by: Andy Whitcroft <apw@canonical.com> | |
34 | Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com> | |
35 | (cherry picked from commit 29b1c137d449dfc8fdcb476158f236625691fd28) | |
36 | Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> | |
37 | --- | |
38 | Documentation/x86/x86_64/mm.txt | 4 ++-- | |
39 | arch/x86/include/asm/pgtable_64_types.h | 4 ++-- | |
40 | 2 files changed, 4 insertions(+), 4 deletions(-) | |
41 | ||
42 | diff --git a/Documentation/x86/x86_64/mm.txt b/Documentation/x86/x86_64/mm.txt | |
43 | index 51101708a03a..496a1dbf139d 100644 | |
44 | --- a/Documentation/x86/x86_64/mm.txt | |
45 | +++ b/Documentation/x86/x86_64/mm.txt | |
46 | @@ -29,8 +29,8 @@ Virtual memory map with 5 level page tables: | |
47 | hole caused by [56:63] sign extension | |
48 | ff00000000000000 - ff0fffffffffffff (=52 bits) guard hole, reserved for hypervisor | |
49 | ff10000000000000 - ff8fffffffffffff (=55 bits) direct mapping of all phys. memory | |
50 | -ff90000000000000 - ff91ffffffffffff (=49 bits) hole | |
51 | -ff92000000000000 - ffd1ffffffffffff (=54 bits) vmalloc/ioremap space | |
52 | +ff90000000000000 - ff9fffffffffffff (=52 bits) hole | |
53 | +ffa0000000000000 - ffd1ffffffffffff (=54 bits) vmalloc/ioremap space (12800 TB) | |
54 | ffd2000000000000 - ffd3ffffffffffff (=49 bits) hole | |
55 | ffd4000000000000 - ffd5ffffffffffff (=49 bits) virtual memory map (512TB) | |
56 | ... unused hole ... | |
57 | diff --git a/arch/x86/include/asm/pgtable_64_types.h b/arch/x86/include/asm/pgtable_64_types.h | |
58 | index 42e2750da525..5932dead34ee 100644 | |
59 | --- a/arch/x86/include/asm/pgtable_64_types.h | |
60 | +++ b/arch/x86/include/asm/pgtable_64_types.h | |
61 | @@ -78,8 +78,8 @@ typedef struct { pteval_t pte; } pte_t; | |
62 | #define MAXMEM _AC(__AC(1, UL) << MAX_PHYSMEM_BITS, UL) | |
63 | ||
64 | #ifdef CONFIG_X86_5LEVEL | |
65 | -# define VMALLOC_SIZE_TB _AC(16384, UL) | |
66 | -# define __VMALLOC_BASE _AC(0xff92000000000000, UL) | |
67 | +# define VMALLOC_SIZE_TB _AC(12800, UL) | |
68 | +# define __VMALLOC_BASE _AC(0xffa0000000000000, UL) | |
69 | # define __VMEMMAP_BASE _AC(0xffd4000000000000, UL) | |
70 | #else | |
71 | # define VMALLOC_SIZE_TB _AC(32, UL) | |
72 | -- | |
73 | 2.14.2 | |
74 |