From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B0E48145B11; Fri, 6 Sep 2024 06:59:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=150.107.74.76 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725605990; cv=none; b=T5kgYa2CUG0aukJU4ecRh0rPnPIFo8so3I7kMhC1RTpdLpRz1tvyumIbp07Vv183ZxSqiY8meYWTLVRN1BIcTlGfMU1yRznm5e/is4cUe9mxyJZjCGvYdq2D2TkXoeYu2+6Gay6tRJfhzw3YAXrSEId8Q7k+hxKU6l2MdYxVn7w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725605990; c=relaxed/simple; bh=Upc8XWfetGI1gtyR95rbZZ4/7td25ncn9d0JTpGxvI0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=auU81gas0N6sv6Vu2kofZie4moShfODS2FlsDK5h1ihtTuF2KPe1wu/l262BPXvn+irwFer20YkirR33rh9p/AkKmieQMfp1GR7AgwT9wDz7WVYMM0Sg/jeJDSMVQbuZAKcO4JYfKh9pDfo8vTPkiUeR0hR/7/es8+nAWAGNwck= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au; spf=pass smtp.mailfrom=ellerman.id.au; dkim=pass (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b=JPN2IXXt; arc=none smtp.client-ip=150.107.74.76 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ellerman.id.au Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b="JPN2IXXt" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1725605984; bh=sUHXIrjnHS+Ol+xIsY2BagDRHrRUVN5ksj5mkzk0GWk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=JPN2IXXt8T9uK4WYrDF/aF6tNmSORt6qbIW8Scxf7Yj0cQGJxTUZFKXGO5myErUhO dheOx7TGFohEGncpupi9qLpH83n3AoXHGCjFRaE5Niax6X5n9aT7nWA+I3bK9x+Eiu t/dnkmhZucV62gV/Pjw/qwUz/2SdQGvC8Z7HFyyYFE1maTeK28OAbv9xMO/lRl53vR fKTDg3SbBMv8DMAXesSGLDGuR2pGfdcOTY/rxpyxqpZlA4RGjpSxeBvc3wq5DGClm0 ulPvkdGfU6/akU45rkH7aLtvWoVsLT7oyn1+O++FpgqAAdWj4erLl8CjsBT5teWKFY UOvnBfG3WqM6A== Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mail.ozlabs.org (Postfix) with ESMTPSA id 4X0RtN4J6hz4w2N; Fri, 6 Sep 2024 16:59:40 +1000 (AEST) From: Michael Ellerman To: Charlie Jenkins , Arnd Bergmann , Richard Henderson , Ivan Kokshaysky , Matt Turner , Vineet Gupta , Russell King , Guo Ren , Huacai Chen , WANG Xuerui , Thomas Bogendoerfer , "James E.J. Bottomley" , Helge Deller , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Alexander Gordeev , Gerald Schaefer , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Sven Schnelle , Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , "David S. Miller" , Andreas Larsson , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Andy Lutomirski , Peter Zijlstra , Muchun Song , Andrew Morton , "Liam R. Howlett" , Vlastimil Babka , Lorenzo Stoakes , Shuah Khan , Christoph Hellwig , Michal Hocko , "Kirill A. Shutemov" , Chris Torek Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-abi-devel@lists.sourceforge.net, Charlie Jenkins Subject: Re: [PATCH RFC v3 1/2] mm: Add personality flag to limit address to 47 bits In-Reply-To: <20240905-patches-below_hint_mmap-v3-1-3cd5564efbbb@rivosinc.com> References: <20240905-patches-below_hint_mmap-v3-0-3cd5564efbbb@rivosinc.com> <20240905-patches-below_hint_mmap-v3-1-3cd5564efbbb@rivosinc.com> Date: Fri, 06 Sep 2024 16:59:40 +1000 Message-ID: <87zfol468z.fsf@mail.lhotse> Precedence: bulk X-Mailing-List: linux-alpha@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Charlie Jenkins writes: > Create a personality flag ADDR_LIMIT_47BIT to support applications > that wish to transition from running in environments that support at > most 47-bit VAs to environments that support larger VAs. This > personality can be set to cause all allocations to be below the 47-bit > boundary. Using MAP_FIXED with mmap() will bypass this restriction. > > Signed-off-by: Charlie Jenkins > --- > include/uapi/linux/personality.h | 1 + > mm/mmap.c | 3 +++ > 2 files changed, 4 insertions(+) > > diff --git a/include/uapi/linux/personality.h b/include/uapi/linux/personality.h > index 49796b7756af..cd3b8c154d9b 100644 > --- a/include/uapi/linux/personality.h > +++ b/include/uapi/linux/personality.h > @@ -22,6 +22,7 @@ enum { > WHOLE_SECONDS = 0x2000000, > STICKY_TIMEOUTS = 0x4000000, > ADDR_LIMIT_3GB = 0x8000000, > + ADDR_LIMIT_47BIT = 0x10000000, > }; I wonder if ADDR_LIMIT_128T would be clearer? Have you looked at writing an update for the personality(2) man page? :) cheers