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