From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761784AbdAKVqK (ORCPT ); Wed, 11 Jan 2017 16:46:10 -0500 Received: from mga06.intel.com ([134.134.136.31]:11626 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753097AbdAKVqI (ORCPT ); Wed, 11 Jan 2017 16:46:08 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,346,1477983600"; d="scan'208";a="1092908417" Date: Wed, 11 Jan 2017 13:46:03 -0800 From: Andi Kleen To: Linus Torvalds Cc: Andy Lutomirski , Dave Hansen , "Kirill A. Shutemov" , "Kirill A. Shutemov" , Andrew Morton , X86 ML , Thomas Gleixner , Ingo Molnar , Arnd Bergmann , "H. Peter Anvin" , linux-arch , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Linux API Subject: Re: [RFC, PATCHv2 29/29] mm, x86: introduce RLIMIT_VADDR Message-ID: <20170111214603.GF8388@tassilo.jf.intel.com> References: <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> <0a6f1ee4-e260-ae7b-3d39-c53f6bed8102@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 11, 2017 at 11:31:25AM -0800, Linus Torvalds wrote: > On Wed, Jan 11, 2017 at 11:20 AM, Andy Lutomirski wrote: > > > > Taking a step back, I think it would be fantastic if we could find a > > way to make this work without any inheritable settings at all. > > Perhaps we could have a per-mm value that is initialized to 2^47-1 on > > execve() and can be raised by ELF note or by prctl()? > > I definitely think this is the right model. No inheritable settings, > no suid issues, no worries. Make people who want the large address > space (and there aren't going to be a lot of them) just mark their > binaries at compile time. Compile time is inconvenient if you want to test some existing random binary if it works. I tried to write a tool which patched ELF notes into binaries some time ago for another project, but it ran into difficulties and didn't work everywhere. An inheritance scheme is much nicer for such use cases. -Andi