From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 596B4C433FE for ; Wed, 11 May 2022 06:50:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A937E6B0073; Wed, 11 May 2022 02:50:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A43CC6B0075; Wed, 11 May 2022 02:50:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 90A2B6B0078; Wed, 11 May 2022 02:50:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 7E87E6B0073 for ; Wed, 11 May 2022 02:50:04 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id 5150F81DF1 for ; Wed, 11 May 2022 06:50:04 +0000 (UTC) X-FDA: 79452537528.30.B124D1B Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf24.hostedemail.com (Postfix) with ESMTP id 09C5B1800CA for ; Wed, 11 May 2022 06:49:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Wb2IprcNdbCRFCgYDckZft2aeKRMMRpizPTVHCdq9g0=; b=oWKuI4E3xRnBU4umLmcQ1pnmQf LBr3d8Mp4iRH4vwyhYDq2IOOss3+KBuyWkhsc7rtMVBjlMEqnAfNVgaq93uubMCwyzOd5FZbyTZzG sbegnrNLtPGySXv5K4yfgixrJYiH4vI0lM1+oPYgUAi4hyeRytVJI8ddGe8D3C6IISSm9YIkyvcoj TMz5R6HKyqiDeyzEQNaO7tjB3YUfosoj0dZ5GpW3kXYWZSJ+62ETrVWScB+OGgJlKwipYnvClE0ey JfUGQ66pzagM/JllXwO6R/4wQoO3PlL6s9wMWtRJ7pmJULeFiIhk6h+0k4tRn57uwDBOKyeuTYHYM urGdqZlQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nogAM-005CRz-5i; Wed, 11 May 2022 06:49:46 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id DC5ED980E3A; Wed, 11 May 2022 08:49:43 +0200 (CEST) Date: Wed, 11 May 2022 08:49:43 +0200 From: Peter Zijlstra To: "Kirill A. Shutemov" Cc: Dave Hansen , Andy Lutomirski , x86@kernel.org, Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , "H . J . Lu" , Andi Kleen , Rick Edgecombe , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RFCv2 00/10] Linear Address Masking enabling Message-ID: <20220511064943.GR76023@worktop.programming.kicks-ass.net> References: <20220511022751.65540-1-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220511022751.65540-1-kirill.shutemov@linux.intel.com> X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 09C5B1800CA X-Stat-Signature: 3x9p9wt5q9pwzomnjjwmd1siskm6ig81 X-Rspam-User: Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=oWKuI4E3; spf=none (imf24.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=peterz@infradead.org; dmarc=none X-HE-Tag: 1652251794-625442 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, May 11, 2022 at 05:27:40AM +0300, Kirill A. Shutemov wrote: > Hi all. Here's long overdue update on LAM enabling. > > # Description # > > Linear Address Masking[1] (LAM) modifies the checking that is applied to > 64-bit linear addresses, allowing software to use of the untranslated > address bits for metadata. > > The patchset brings support for LAM for userspace addresses. > > The most sensitive part of enabling is change in tlb.c, where CR3 flags > get set. Please take a look that what I'm doing makes sense. > > The feature competes for bits with 5-level paging: LAM_U48 makes it > impossible to map anything about 47-bits. The patchset made these > capability mutually exclusive: whatever used first wins. LAM_U57 can be > combined with mappings above 47-bits. So aren't we creating a problem with LAM_U48 where programs relying on it are of limited sustainability? Any such program simply *cannot* run on 5 level pagetables. Why do we want to do this?