From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (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 61F99189B95 for ; Mon, 9 Sep 2024 19:07:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725908856; cv=none; b=S0XuK9aS91F99z1gSfPgZrEW8KoQ87AQ0/DktlNBOFVnyRjrqW7HwUnTxckAEujk7YnAKex4wHA7xPBIJy96EovfjWLWQb3j/e8gtPmhg9GTBxTOtstpgBEvrq74GKNZsCnbiTanNNF8sTcZv7dj2NNdHTUvNoz5ymroEcLvABM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725908856; 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=BTzIHW8LABAbmA+fxfovZAW/MIO0GsRMaLjjWvLhTx8eLZu9TABa+9n8eAUYZfGV+PqRD1GLF7sPWdCWsABGguDKu6HRO1Ol6ulsOznCcUoyRvlF6P8eeBp7HPaZJ+pq/unnBGfz5vyGTSvtjUPDOla/JrtXE38c9T/N6nPHT04= 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=t0htwVoB; arc=none smtp.client-ip=209.85.214.180 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="t0htwVoB" Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-206f9b872b2so25486385ad.3 for ; Mon, 09 Sep 2024 12:07:33 -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=lists.linux.dev; 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=t0htwVoBwFWEKrsndLLIraF4TkLsNYg7DsQxlsMz9vckMwp46Xr0PMJ3sUJyfrrs8u 5eiVWBjwMRpJnMqJslu0NgajT0BRYX28QVAFO4Tt/cQuHG+b/yw20SoWwbNfrKbDX4Rk MAd0Ma3bd6Mp8cnhY1MkKJqjQmDgtgf5ZsZAqMa6oawxSHTVMgCta0/WmDfGE6nTyUDS nNGkCAbcLB4/HTFqEjLeujMhXxLfwxTR0iXAfTalCaFYA95FsXrG1rmAvXG8ZeqrhYY1 tTstHR5d5EnREBUey/R8dTcUQ1wydFja5kwNcjmP6TT7demtVxKeVHwkiwunYUK9H6g2 QE9Q== 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=UUBBI0mcqo/gUzrcPUlojlNjtcM88wZabXHiI6+ycZZl4d81r34DnPc5ugDkK0RJwS 73rQmiTQLoxUITPz30/ZfzhIVyCDPYIGCd5trNvJ0BmuXyg7ONnkOv9a5PiSNODZ7Q/7 uuepuLbn+ivh3zsMCDgR5RdLq2G3lDCpRS8UDLjeoQ+E/KB79SHhIH0rIqXBBz1jpE1B gIXBFCtYSG97rl2lBBjZrYDE9gGZO4/KAzjUXdzsiaGBX/UIdkE9B+B6UCuNYlCv81rj FZee/PSLQZoxlSAeT8xbGEmaE+QOQvvOLFTF+hvY+/7r1OkImk25qbGCJDnQAzTG90v6 l2sg== X-Forwarded-Encrypted: i=1; AJvYcCWMgnJxCinzIFGrmr3C7biqWCe//6yk05drG41DuXlNBLijukul9D7lFD3yvR5ZH6SktoBjS6u3pRY=@lists.linux.dev X-Gm-Message-State: AOJu0YyNaCdgcSi4bPbCi7Cd1f5y6zOMiWShIzC/+PYJ/TwtG4npnPkb DFtMFjCNdhPc57Ut7Fzgb7xUXQGZRLNgPhlKJRfE9f3fh8oW9r0PCTkJOjwaLSc= 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: loongarch@lists.linux.dev 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