From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751887AbdLSSKA (ORCPT ); Tue, 19 Dec 2017 13:10:00 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:49559 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750846AbdLSSJ7 (ORCPT ); Tue, 19 Dec 2017 13:09:59 -0500 Date: Tue, 19 Dec 2017 19:09:56 +0100 (CET) From: Thomas Gleixner To: Peter Zijlstra cc: LKML , x86@kernel.org, Linus Torvalds , Andy Lutomirsky , Dave Hansen , Borislav Petkov , Greg KH , keescook@google.com, hughd@google.com, Brian Gerst , Josh Poimboeuf , Denys Vlasenko , Rik van Riel , Boris Ostrovsky , Juergen Gross , David Laight , Eduardo Valentin , aliguori@amazon.com, Will Deacon , daniel.gruss@iaik.tugraz.at, Kees Cook , Borislav Petkov , "Kirill A. Shutemov" Subject: Re: [patch V163 38/51] x86/mm/64: Make a full PGD-entry size hole in the memory map In-Reply-To: <20171218132727.43umqlu4hirgwhlf@hirez.programming.kicks-ass.net> Message-ID: References: <20171218114215.239543034@linutronix.de> <20171218115256.731524766@linutronix.de> <20171218132727.43umqlu4hirgwhlf@hirez.programming.kicks-ass.net> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 18 Dec 2017, Peter Zijlstra wrote: > On Mon, Dec 18, 2017 at 12:42:53PM +0100, Thomas Gleixner wrote: > > From: Andy Lutomirski > > > > Shrink vmalloc space from 16384TiB to 12800TiB to enlarge the hole starting > > at 0xff90000000000000 to be a full PGD entry. > > > > A subsequent patch will use this hole for the pagetable isolation LDT > > alias. > > The below patch only changes 5L things, what about 4L ? I fear I've lost a hunk somewhere on the road .... > > --- > > Documentation/x86/x86_64/mm.txt | 4 ++-- > > arch/x86/include/asm/pgtable_64_types.h | 4 ++-- > > 2 files changed, 4 insertions(+), 4 deletions(-) > > > > --- a/Documentation/x86/x86_64/mm.txt > > +++ b/Documentation/x86/x86_64/mm.txt > > @@ -28,8 +28,8 @@ ffffffffffe00000 - ffffffffffffffff (=2 > > hole caused by [56:63] sign extension > > ff00000000000000 - ff0fffffffffffff (=52 bits) guard hole, reserved for hypervisor > > ff10000000000000 - ff8fffffffffffff (=55 bits) direct mapping of all phys. memory > > -ff90000000000000 - ff91ffffffffffff (=49 bits) hole > > -ff92000000000000 - ffd1ffffffffffff (=54 bits) vmalloc/ioremap space > > +ff90000000000000 - ff9fffffffffffff (=52 bits) hole > > +ffa0000000000000 - ffd1ffffffffffff (=54 bits) vmalloc/ioremap space (12800 TB) > > ffd2000000000000 - ffd3ffffffffffff (=49 bits) hole > > ffd4000000000000 - ffd5ffffffffffff (=49 bits) virtual memory map (512TB) > > ... unused hole ... > > --- a/arch/x86/include/asm/pgtable_64_types.h > > +++ b/arch/x86/include/asm/pgtable_64_types.h > > @@ -78,8 +78,8 @@ typedef struct { pteval_t pte; } pte_t; > > /* See Documentation/x86/x86_64/mm.txt for a description of the memory map. */ > > #define MAXMEM _AC(__AC(1, UL) << MAX_PHYSMEM_BITS, UL) > > #ifdef CONFIG_X86_5LEVEL > > -#define VMALLOC_SIZE_TB _AC(16384, UL) > > -#define __VMALLOC_BASE _AC(0xff92000000000000, UL) > > +#define VMALLOC_SIZE_TB _AC(12800, UL) > > +#define __VMALLOC_BASE _AC(0xffa0000000000000, UL) > > #define __VMEMMAP_BASE _AC(0xffd4000000000000, UL) > > #else > > #define VMALLOC_SIZE_TB _AC(32, UL) > > > > >