From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754287AbdAKSt6 (ORCPT ); Wed, 11 Jan 2017 13:49:58 -0500 Received: from mga14.intel.com ([192.55.52.115]:48714 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754192AbdAKSt4 (ORCPT ); Wed, 11 Jan 2017 13:49:56 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,346,1477983600"; d="scan'208";a="807737624" Subject: Re: [RFC, PATCHv2 29/29] mm, x86: introduce RLIMIT_VADDR To: "Kirill A. Shutemov" , Andy Lutomirski References: <20161227015413.187403-1-kirill.shutemov@linux.intel.com> <20161227015413.187403-30-kirill.shutemov@linux.intel.com> <5a3dcc25-b264-37c7-c090-09981b23940d@intel.com> <20170105192910.q26ozg4ci4i3j2ai@black.fi.intel.com> <161ece66-fbf4-cb89-3da6-91b4851af69f@intel.com> <978d5f1a-ec4d-f747-93fd-27ecfe10cb88@intel.com> <20170111142904.GD4895@node.shutemov.name> <20170111183750.GE4895@node.shutemov.name> 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" , Linux API From: Dave Hansen Message-ID: <0a6f1ee4-e260-ae7b-3d39-c53f6bed8102@intel.com> Date: Wed, 11 Jan 2017 10:49:55 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20170111183750.GE4895@node.shutemov.name> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/11/2017 10:37 AM, Kirill A. Shutemov wrote: >> How about preventing the max addr from being changed to too high a >> value while MPX is on instead of overriding the set value? This would >> have the added benefit that it would prevent silent failures where you >> think you've enabled large addresses but MPX is also on and mmap >> refuses to return large addresses. > Setting rlimit high doesn't mean that you necessary will get access to > full address space, even without MPX in picture. TASK_SIZE limits the > available address space too. OK, sure... If you want to take another mechanism into account with respect to MPX, we can do that. We'd just need to change every mechanism we want to support to ensure that it can't transition in ways that break MPX. What are you arguing here, though? Since we *might* be limited by something else that we should not care about controlling the rlimit? > I think it's consistent with other resources in rlimit: setting RLIMIT_RSS > to unlimited doesn't really means you are not subject to other resource > management. The farther we get into this, the more and more I think using an rlimit is a horrible idea. Its semantics aren't a great match, and you seem to be resistant to making *this* rlimit differ from the others when there's an entirely need to do so. We're already being bitten by "legacy" rlimit. IOW, being consistent with *other* rlimit behavior buys us nothing, only complexity.