From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753372AbdKMPnn (ORCPT ); Mon, 13 Nov 2017 10:43:43 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:33917 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753062AbdKMPnl (ORCPT ); Mon, 13 Nov 2017 10:43:41 -0500 Date: Mon, 13 Nov 2017 16:43:26 +0100 (CET) From: Thomas Gleixner To: "Kirill A. Shutemov" cc: Ingo Molnar , Linus Torvalds , x86@kernel.org, "H. Peter Anvin" , Andy Lutomirski , Cyrill Gorcunov , Nicholas Piggin , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86/mm: Do not allow non-MAP_FIXED mapping across DEFAULT_MAP_WINDOW border In-Reply-To: <20171107130539.52676-1-kirill.shutemov@linux.intel.com> Message-ID: References: <20171107130539.52676-1-kirill.shutemov@linux.intel.com> 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 Tue, 7 Nov 2017, Kirill A. Shutemov wrote: > In case of 5-level paging, we don't put any mapping above 47-bit, unless > userspace explicitly asked for it. > > Userspace can ask for allocation from full address space by specifying > hint address above 47-bit. > > Nicholas noticed that current implementation violates this interface: > we can get vma partly in high addresses if we ask for a mapping at very > end of 47-bit address space. > > Let's make sure that, when consider hint address for non-MAP_FIXED > mapping, start and end of resulting vma are on the same side of 47-bit > border. What happens for mappings with MAP_FIXED which cross the border? Thanks, tglx