From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Kirill A. Shutemov" Subject: [PATCH 5/5] x86/mm: Allow userspace have mapping above 47-bit Date: Thu, 22 Jun 2017 15:26:08 +0300 Message-ID: <20170622122608.80435-6-kirill.shutemov@linux.intel.com> References: <20170622122608.80435-1-kirill.shutemov@linux.intel.com> Return-path: In-Reply-To: <20170622122608.80435-1-kirill.shutemov@linux.intel.com> Sender: owner-linux-mm@kvack.org To: Linus Torvalds , Andrew Morton , x86@kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" Cc: Andi Kleen , Dave Hansen , Andy Lutomirski , linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Kirill A. Shutemov" List-Id: linux-arch.vger.kernel.org All bits and pieces now in place and we can allow userspace to have VMAs above 47-bit. Signed-off-by: Kirill A. Shutemov --- arch/x86/include/asm/processor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index 42b87689ecd7..0ed01fdd7fa2 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h @@ -844,9 +844,9 @@ static inline void spin_lock_prefetch(const void *x) * particular problem by preventing anything from being mapped * at the maximum canonical address. */ -#define TASK_SIZE_MAX ((1UL << 47) - PAGE_SIZE) +#define TASK_SIZE_MAX ((1UL << __VIRTUAL_MASK_SHIFT) - PAGE_SIZE) -#define DEFAULT_MAP_WINDOW TASK_SIZE_MAX +#define DEFAULT_MAP_WINDOW ((1UL << 47) - PAGE_SIZE) /* This decides where the kernel will search for a free chunk of vm * space during mmap's. -- 2.11.0 -- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com ([134.134.136.65]:9396 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753256AbdFVM0a (ORCPT ); Thu, 22 Jun 2017 08:26:30 -0400 From: "Kirill A. Shutemov" Subject: [PATCH 5/5] x86/mm: Allow userspace have mapping above 47-bit Date: Thu, 22 Jun 2017 15:26:08 +0300 Message-ID: <20170622122608.80435-6-kirill.shutemov@linux.intel.com> In-Reply-To: <20170622122608.80435-1-kirill.shutemov@linux.intel.com> References: <20170622122608.80435-1-kirill.shutemov@linux.intel.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Linus Torvalds , Andrew Morton , x86@kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" Cc: Andi Kleen , Dave Hansen , Andy Lutomirski , linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Kirill A. Shutemov" Message-ID: <20170622122608.jdExlIAcoUnnyy6YduXfsGz2qQpnCzDMlUMByF9ap4c@z> All bits and pieces now in place and we can allow userspace to have VMAs above 47-bit. Signed-off-by: Kirill A. Shutemov --- arch/x86/include/asm/processor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index 42b87689ecd7..0ed01fdd7fa2 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h @@ -844,9 +844,9 @@ static inline void spin_lock_prefetch(const void *x) * particular problem by preventing anything from being mapped * at the maximum canonical address. */ -#define TASK_SIZE_MAX ((1UL << 47) - PAGE_SIZE) +#define TASK_SIZE_MAX ((1UL << __VIRTUAL_MASK_SHIFT) - PAGE_SIZE) -#define DEFAULT_MAP_WINDOW TASK_SIZE_MAX +#define DEFAULT_MAP_WINDOW ((1UL << 47) - PAGE_SIZE) /* This decides where the kernel will search for a free chunk of vm * space during mmap's. -- 2.11.0