From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 13EC0189B91 for ; Mon, 9 Sep 2024 19:07:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725908855; cv=none; b=Zr1hnAw6cZjwMwDAufOcrGeGh4hpZv+uT6Th52mcG75ufJR0WodzD19cm/5VXeOxr3hfyZ8wv2VvVg4S59hp2PPXwb3HD32/r/crpxZPRg++RQfKiOqMslp2tvvkJATBZK2n0VI/WOF4FelXnNZJ4gAsoxotQztAEH52vtS8vsE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725908855; c=relaxed/simple; bh=b5qblVINKWpCxCCHs3yo0m2YOZxorXz/O91qn7T/Zoo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=iCcgt1ozzdROahWC9ei8B6Te9dNjPhXN/SIU2rR3NYAejUFto7S53y5gWVZfPI6o6GkoVhPcSZujZOzHithHYdCCJuubvIkscYnk/HBXRt4Ox9/rHNIYPQ5Nm9Yz5GT5IZQBZsuor4Qx4dCyvVnC1uLsJkKMzc0T9PJQjqvu7wQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=zt1diLUK; arc=none smtp.client-ip=209.85.214.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="zt1diLUK" Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-205659dc63aso46182395ad.1 for ; Mon, 09 Sep 2024 12:07:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1725908852; x=1726513652; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=KeQ2Et/fFCRS76/RDVc52ODWIM932uTGcPwA4XQOW3E=; b=zt1diLUKBRzBgAAhuaS3c65B403jJ1PIWUnGUl7eLQcBXezTKo/zOEjDsLVBcXivZm hC6VwfUcRBGNGsO2vpWaquCMchhsO1SduftMewCg1y8Ps9A74s6zd1z8oT/bL8BcvVGm fib4NpZAv18x27QuJtV0noRd2jBa01UgFAXYQLPl/GFvj9IxJuZprEzq8zAFhSIBsIt7 Z9mWsue5sSu/wNGgECRZn/0nCn+zVG3ZPaXK62oEBZEKJidnwr7n6SzUvKYU3a5WGQIK sMSRoRQU9ZA+lDqyO/c5Tedb/FVLXgx16VBvJDNoahWQaZtv+ovKIv/4gyPl4VXgNWgR xJXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725908852; x=1726513652; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=KeQ2Et/fFCRS76/RDVc52ODWIM932uTGcPwA4XQOW3E=; b=DG6KYWpSLj3TKKZ4A2dDTpjLPIC2H1PguDVrpAke60u+67+v4tNpEbxvl5pBzpHRKy Qq+T6BS0XWoVR66Ec2of/9wwXlHp7NzAlnDZP/WRy8HbhFwCqRK9kMGV6m/PRID1JwDV yIoYH640j1NIB09hVGfaYqU6JhXlxZUyEFlaOTskqEEMlwvHg2uFuxQgr4p19aayZzSw rEDW7+9Qv+Od4Ap2r7Hu0UBqd7N7y+rG6G4UQ+PdGdSf2dIut1IMhJLUZ/5m7ciL6xHN 83udc0qBEmGsKVm/M8SpZgFiLWOTXIt/i465ms54mkvNOkusp51qQ5Cb7fap+evWk0AB oT2A== X-Forwarded-Encrypted: i=1; AJvYcCUgsIIZROO8ceVxBQIcst95eZJ3Wl9XcxAvtnLw3FXKElwYLnfvFlv0L7qff4UJB7mjKAkTWI2jjawX@vger.kernel.org X-Gm-Message-State: AOJu0YzSLsO9rFsQ25gdNU++4g5/6uVoUFVghPqdNjubv0lekWWVoP7i g2c8QQOLIw6sWsgoiHexWj+QfVZrlFCd4IF4+LNSxGeixSrCpRX7/t6MXGstwdE= X-Google-Smtp-Source: AGHT+IFr8qMBk49qQaWgQwdEeSwPNLRpIJ6+/NqAAdbEE2n6wWPI3+1ojCwWs7k3VHGjnw2a54FzLg== X-Received: by 2002:a17:903:22c9:b0:205:5fb6:2aba with SMTP id d9443c01a7336-206f0539d1amr123273675ad.30.1725908851946; Mon, 09 Sep 2024 12:07:31 -0700 (PDT) Received: from ghost ([50.145.13.30]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20710f31729sm37014315ad.261.2024.09.09.12.07.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Sep 2024 12:07:31 -0700 (PDT) Date: Mon, 9 Sep 2024 12:07:26 -0700 From: Charlie Jenkins To: Michael Ellerman Cc: 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 , 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 Subject: Re: [PATCH RFC v3 1/2] mm: Add personality flag to limit address to 47 bits Message-ID: References: <20240905-patches-below_hint_mmap-v3-0-3cd5564efbbb@rivosinc.com> <20240905-patches-below_hint_mmap-v3-1-3cd5564efbbb@rivosinc.com> <87zfol468z.fsf@mail.lhotse> Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87zfol468z.fsf@mail.lhotse> On Fri, Sep 06, 2024 at 04:59:40PM +1000, Michael Ellerman wrote: > 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? > I don't follow, what does 128T represent? > Have you looked at writing an update for the personality(2) man page? :) I will write an update to the man page if this patch is approved! > > cheers - Charlie