From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752496AbeAQH76 (ORCPT + 1 other); Wed, 17 Jan 2018 02:59:58 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:44741 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752467AbeAQH75 (ORCPT ); Wed, 17 Jan 2018 02:59:57 -0500 Date: Wed, 17 Jan 2018 08:59:24 +0100 From: Peter Zijlstra To: Andy Lutomirski Cc: Joerg Roedel , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , X86 ML , LKML , linux-mm@kvack.org, Linus Torvalds , 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 Subject: Re: [PATCH 06/16] x86/mm/ldt: Reserve high address-space range for the LDT Message-ID: <20180117075924.GI2228@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Tue, Jan 16, 2018 at 02:51:45PM -0800, Andy Lutomirski wrote: > 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. Ah, then I got my LDT things confused again... which is certainly possible, we had a few too many variants back then. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f200.google.com (mail-pf0-f200.google.com [209.85.192.200]) by kanga.kvack.org (Postfix) with ESMTP id C20E3280281 for ; Wed, 17 Jan 2018 02:59:47 -0500 (EST) Received: by mail-pf0-f200.google.com with SMTP id q8so8036147pfh.12 for ; Tue, 16 Jan 2018 23:59:47 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org. [65.50.211.133]) by mx.google.com with ESMTPS id q4si3256359pgn.232.2018.01.16.23.59.46 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Jan 2018 23:59:46 -0800 (PST) Date: Wed, 17 Jan 2018 08:59:24 +0100 From: Peter Zijlstra Subject: Re: [PATCH 06/16] x86/mm/ldt: Reserve high address-space range for the LDT Message-ID: <20180117075924.GI2228@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Andy Lutomirski Cc: Joerg Roedel , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , X86 ML , LKML , linux-mm@kvack.org, Linus Torvalds , 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 02:51:45PM -0800, Andy Lutomirski wrote: > 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. Ah, then I got my LDT things confused again... which is certainly possible, we had a few too many variants back then. -- 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