From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751137AbcIIOO5 (ORCPT ); Fri, 9 Sep 2016 10:14:57 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:34716 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750744AbcIIOO4 (ORCPT ); Fri, 9 Sep 2016 10:14:56 -0400 DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org 310C961BC5 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=cov@codeaurora.org Subject: Re: [PATCH] arm64: Expose TASK_SIZE to userspace via auxv To: Richard Weinberger References: <20160816183231.21179-1-cov@codeaurora.org> <20160817103006.GB20762@e104818-lin.cambridge.arm.com> Cc: Catalin Marinas , Will Deacon , Ard Biesheuvel , Mark Rutland , Suzuki K Poulose , James Hogan , "linux-arm-kernel@lists.infradead.org" , LKML , Jon Masters , Jeremy Linton From: Christopher Covington Message-ID: <857a7f1d-ecdb-21e1-6043-1bb6dce3aad6@codeaurora.org> Date: Fri, 9 Sep 2016 10:14:53 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Richard, On 08/18/2016 08:17 AM, Richard Weinberger wrote: > On Wed, Aug 17, 2016 at 1:12 PM, Christopher Covington > wrote: >> >> >> On August 17, 2016 6:30:06 AM EDT, Catalin Marinas wrote: >>> On Tue, Aug 16, 2016 at 02:32:29PM -0400, Christopher Covington wrote: >>>> Some userspace applications need to know the maximum virtual address >>> they can >>>> use (TASK_SIZE). >>> >>> Just curious, what are the cases needing TASK_SIZE in user space? >> >> Checkpoint/Restore In Userspace and the Mozilla Javascript Engine https://bugzilla.mozilla.org/show_bug.cgi?id=1143022 are the specific cases I've run into. I've heard LuaJIT might have a similar situation. In general I think making allocations from the top down is a shortcut for finding a large unused region of memory. > > I think this makes sense for all archs. > At lest UserModeLinux on x86 also needs to know bottom and top > addresses of the usable > address space. > Currently it figures by scanning and catching SIGSEGV. For the bottom, can you use /proc/sys/vm/mmap_min_addr? Cov -- Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.