From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f69.google.com (mail-pl0-f69.google.com [209.85.160.69]) by kanga.kvack.org (Postfix) with ESMTP id 375E528024A for ; Tue, 16 Jan 2018 17:52:08 -0500 (EST) Received: by mail-pl0-f69.google.com with SMTP id q1so6936247plr.15 for ; Tue, 16 Jan 2018 14:52:08 -0800 (PST) Received: from mail.kernel.org (mail.kernel.org. [198.145.29.99]) by mx.google.com with ESMTPS id y12si2768612pff.4.2018.01.16.14.52.07 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jan 2018 14:52:07 -0800 (PST) Received: from mail-io0-f169.google.com (mail-io0-f169.google.com [209.85.223.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DF7F821781 for ; Tue, 16 Jan 2018 22:52:06 +0000 (UTC) Received: by mail-io0-f169.google.com with SMTP id w188so18619307iod.10 for ; Tue, 16 Jan 2018 14:52:06 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20180116165213.GF2228@hirez.programming.kicks-ass.net> References: <1516120619-1159-1-git-send-email-joro@8bytes.org> <1516120619-1159-7-git-send-email-joro@8bytes.org> <20180116165213.GF2228@hirez.programming.kicks-ass.net> From: Andy Lutomirski Date: Tue, 16 Jan 2018 14:51:45 -0800 Message-ID: Subject: Re: [PATCH 06/16] x86/mm/ldt: Reserve high address-space range for the LDT Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-mm@kvack.org List-ID: To: Peter Zijlstra Cc: Joerg Roedel , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , X86 ML , LKML , linux-mm@kvack.org, Linus Torvalds , Andy Lutomirski , Dave Hansen , Josh Poimboeuf , Juergen Gross , Borislav Petkov , Jiri Kosina , Boris Ostrovsky , Brian Gerst , David Laight , Denys Vlasenko , Eduardo Valentin , Greg KH , Will Deacon , "Liguori, Anthony" , Daniel Gruss , Hugh Dickins , Kees Cook , Andrea Arcangeli , Waiman Long , Joerg Roedel On Tue, Jan 16, 2018 at 8:52 AM, Peter Zijlstra wrote: > On Tue, Jan 16, 2018 at 05:36:49PM +0100, Joerg Roedel wrote: >> From: Joerg Roedel >> >> Reserve 2MB/4MB of address space for mapping the LDT to >> user-space. > > LDT is 64k, we need 2 per CPU, and NR_CPUS <= 64 on 32bit, that gives > 64K*2*64=8M > 2M. If this works like it does on 64-bit, it only needs 128k regardless of the number of CPUs. The LDT mapping is specific to the mm. How are you dealing with PAE here? That is, what's your pagetable layout? What parts of the address space are owned by what code? -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org