From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua0-f197.google.com (mail-ua0-f197.google.com [209.85.217.197]) by kanga.kvack.org (Postfix) with ESMTP id 3BCB7680FC1 for ; Fri, 17 Feb 2017 12:22:09 -0500 (EST) Received: by mail-ua0-f197.google.com with SMTP id q14so29343849uaq.2 for ; Fri, 17 Feb 2017 09:22:09 -0800 (PST) Received: from mail-ua0-x230.google.com (mail-ua0-x230.google.com. [2607:f8b0:400c:c08::230]) by mx.google.com with ESMTPS id a72si3372503vke.221.2017.02.17.09.22.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Feb 2017 09:22:08 -0800 (PST) Received: by mail-ua0-x230.google.com with SMTP id y9so34230885uae.2 for ; Fri, 17 Feb 2017 09:22:08 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <20170217141328.164563-1-kirill.shutemov@linux.intel.com> <20170217141328.164563-34-kirill.shutemov@linux.intel.com> From: Andy Lutomirski Date: Fri, 17 Feb 2017 09:21:47 -0800 Message-ID: Subject: Re: [PATCHv3 33/33] mm, x86: introduce PR_SET_MAX_VADDR and PR_GET_MAX_VADDR Content-Type: text/plain; charset=UTF-8 Sender: owner-linux-mm@kvack.org List-ID: To: Dave Hansen Cc: "Kirill A. Shutemov" , Linus Torvalds , Andrew Morton , X86 ML , Thomas Gleixner , Ingo Molnar , Arnd Bergmann , "H. Peter Anvin" , Andi Kleen , linux-arch , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Catalin Marinas , Linux API On Fri, Feb 17, 2017 at 9:19 AM, Dave Hansen wrote: > On 02/17/2017 06:13 AM, Kirill A. Shutemov wrote: >> +/* >> + * Default maximum virtual address. This is required for >> + * compatibility with applications that assumes 47-bit VA. >> + * The limit can be changed with prctl(PR_SET_MAX_VADDR). >> + */ >> +#define MAX_VADDR_DEFAULT ((1UL << 47) - PAGE_SIZE) > > This is a bit goofy. It's not the largest virtual adddress that can be > accessed, but the beginning of the last page. No, it really is the limit. We don't allow user code to map the last page because ti would be a root hole due to SYSRET. Thanks, Intel. See the comment near TASK_SIZE_MAX IIRC. --Andy -- 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