Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6657883iob; Wed, 11 May 2022 02:28:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9Gt+7boRbtdVCkFE7jcuTY4fwa4LvCVsUFDczHmfgpl9OA6S9oQmWuh72ImD53WosuQvd X-Received: by 2002:a65:404b:0:b0:3c5:ffca:54a4 with SMTP id h11-20020a65404b000000b003c5ffca54a4mr20560252pgp.152.1652261302078; Wed, 11 May 2022 02:28:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652261302; cv=none; d=google.com; s=arc-20160816; b=fC8TZdwIY8a6tk+p5UP8uNFBaFoa3gI0mpeFpVGpnAHv754L7cDBK9iNRRo5ZZARBI i+B79gqCMBmQGor/cXRhbQERsmJsknflDd7EGTaOcv/rlurf6y5UF8XA0NtqJq0WSHZE 7iW+CheHpit5QD0Fw85ekti0JB5zYa02mEAngLp9Bvg1RK4tH3ZYRrkp7153NeJvx3Jt GkpBJKilhgI1RdSqDr9k53Q5jD0GM1z4YwdPlR5qO6o1JMYZ7+SM4hcNAVTpIodRtbYH 4rLCluSmNCB8ulHrxkfTQBfSHYYb9ImsGJust9HG8rZ3IgGWj1NvbutRiHLufq4bynHe 3+Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Wb2IprcNdbCRFCgYDckZft2aeKRMMRpizPTVHCdq9g0=; b=0zPKPrKuvRtg1VeILoDBE0QvZOWhEXnSq/nLcTo9Wsp6mTRMILwJfcXEzeZLMZPwBz o8FMgUbskp7LLwhaJaDRXU3jV5q/PBxdnxND2inIquapkS2u8woG1WkPlj+LlkMZoeKo 8Blk2MIkU9RtkSRCbydaddfjMUf6uBwh5gz+OMPMCBan8IE/PuECtlf15R1BCP9Wdhi8 rbbWHCroejravMikbwtQoP4hxKw1vYpMosz7tWkrqinxeArHhE+QeATFA05ye3ce0IZr +YOVrxd0DIb2heooM9EqGeqz/+EVa/XDjdBlXbqYvBQDidj0sPsOEM2C2rvmOeltS9Yf u4SA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=oWKuI4E3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p10-20020a635b0a000000b003c62592bfadsi2065353pgb.805.2022.05.11.02.28.07; Wed, 11 May 2022 02:28:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=oWKuI4E3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242397AbiEKGuY (ORCPT + 99 others); Wed, 11 May 2022 02:50:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242431AbiEKGuL (ORCPT ); Wed, 11 May 2022 02:50:11 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F8652438C8 for ; Tue, 10 May 2022 23:50:06 -0700 (PDT) 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-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?