From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032444AbdAETcf (ORCPT ); Thu, 5 Jan 2017 14:32:35 -0500 Received: from mga06.intel.com ([134.134.136.31]:62573 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763543AbdAET3q (ORCPT ); Thu, 5 Jan 2017 14:29:46 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,322,1477983600"; d="scan'208";a="210086251" Date: Thu, 5 Jan 2017 22:29:10 +0300 From: "Kirill A. Shutemov" To: Dave Hansen Cc: Linus Torvalds , Andrew Morton , x86@kernel.org, Thomas Gleixner , Ingo Molnar , Arnd Bergmann , "H. Peter Anvin" , Andi Kleen , Andy Lutomirski , linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org Subject: Re: [RFC, PATCHv2 29/29] mm, x86: introduce RLIMIT_VADDR Message-ID: <20170105192910.q26ozg4ci4i3j2ai@black.fi.intel.com> References: <20161227015413.187403-1-kirill.shutemov@linux.intel.com> <20161227015413.187403-30-kirill.shutemov@linux.intel.com> <5a3dcc25-b264-37c7-c090-09981b23940d@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5a3dcc25-b264-37c7-c090-09981b23940d@intel.com> User-Agent: NeoMutt/20161126 (1.7.0) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 05, 2017 at 11:13:57AM -0800, Dave Hansen wrote: > On 12/26/2016 05:54 PM, Kirill A. Shutemov wrote: > > MM would use min(RLIMIT_VADDR, TASK_SIZE) as upper limit of virtual > > address available to map by userspace. > > What happens to existing mappings above the limit when this upper limit > is dropped? Nothing: we only prevent creating new mappings. All existing are not affected. The semantics here the same as with other resource limits. > Similarly, why do we do with an application running with something > incompatible with the larger address space that tries to raise the > limit? Say, legacy MPX. It has to know what it does. Yes, it can change limit to the point where application is unusable. But you can to the same with other limits. -- Kirill A. Shutemov