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 X-Spam-Level: X-Spam-Status: No, score=-2.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B6A5C433F5 for ; Tue, 21 Sep 2021 17:16:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B626D61002 for ; Tue, 21 Sep 2021 17:16:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B626D61002 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id E4F4A900002; Tue, 21 Sep 2021 13:16:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DD8336B0071; Tue, 21 Sep 2021 13:16:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C7840900002; Tue, 21 Sep 2021 13:16:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0134.hostedemail.com [216.40.44.134]) by kanga.kvack.org (Postfix) with ESMTP id B2B966B006C for ; Tue, 21 Sep 2021 13:16:16 -0400 (EDT) Received: from smtpin35.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 661272B35A for ; Tue, 21 Sep 2021 17:16:16 +0000 (UTC) X-FDA: 78612233952.35.CB913C7 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by imf02.hostedemail.com (Postfix) with ESMTP id 2C9317001C87 for ; Tue, 21 Sep 2021 17:16:16 +0000 (UTC) Received: by mail-pl1-f173.google.com with SMTP id n18so13846783plp.7 for ; Tue, 21 Sep 2021 10:16:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=eUN2nnZeqtF9V4R2FiAyrA03lEbiwBDRrmR/8zObR7M=; b=U4wQ6cOVPKfZdxAMFAmoymsbOG8L9a8yN6qeAHwwKMBW4PkJsSLJveeZVLfHe+YGWy ot7F54svu4ip2vq94EQNZRqCQ+AF8qo48Jkn6+Cq4fYGIvpKzPl3GLwYiOx2LLjbyniF wu/fSGWk6l+i6CWAGS6vpseU0D+FA97N3bprGhZVTI44xmDbpOs6NrySHRAlJHpA1FG0 ejxqYLQRKgTqI7XNr7XPp92QCbAE+jISv4vCTvPwOgSwrEQa/htMVomov331N28Z1aNF 7G+Pg9vcOfY/LtbBDBVLHYrkCN+pFBS8DaLZ9qZtV+TaHZIMMZ0Qk1K9pBg+wSHxl5gx 30PA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=eUN2nnZeqtF9V4R2FiAyrA03lEbiwBDRrmR/8zObR7M=; b=6OduWqHQDSAqpmeFQDNprHv2UGMyFXIcBHp7YDMnAqsiQY6cAg+Xo6oRFeuz8K5Ye3 OyqI7oXPrWFPaaH1H+wITTWGMFdKQD4H+gbXMuliYcQlxyhIYVtck2Si/t/1rwH8hgd/ tqe1TRkpnYchxX3jKRQ2IZhGora93fHyNLnH4+mL+9hK+ImVvaR8S5vZThTgSAnwmEM2 b8gEszumFsh3QyTuD9fV5vNcJe261aDdQ1HUIw2OHJYiIEpnjw4bTBRh2n50tQAx6El9 qXaJoB8Xn13UNkH31Py1BePqziVQiAl6CT5pupuD6KpwvUXMNEUffEfzZyEC5ccsNQTk 19pA== X-Gm-Message-State: AOAM533xpqtP5UUTWoB7N9mUFc0kdvtcKM5mibaiOjXUgFmKCGJCOmiJ LH2ymgTIXtpXQZL5VEIIp6rm+gOwVHfmLMJbRG8= X-Google-Smtp-Source: ABdhPJyfCLZRS/cA/qIX+cu2GOvpUCvUmw/JxxSiq7XFWMsar5eLynsqdU4dnEyymkkSIK21o1Fy4MJib0eFC0t8Cco= X-Received: by 2002:a17:90b:3805:: with SMTP id mq5mr6401185pjb.143.1632244574967; Tue, 21 Sep 2021 10:16:14 -0700 (PDT) MIME-Version: 1.0 References: <20210205151631.43511-1-kirill.shutemov@linux.intel.com> <20210207141104.ikxbdxhoisgqaoio@box> In-Reply-To: From: "H.J. Lu" Date: Tue, 21 Sep 2021 10:15:39 -0700 Message-ID: Subject: Re: [RFC 0/9] Linear Address Masking enabling To: Dmitry Vyukov Cc: "Kirill A. Shutemov" , "Kirill A. Shutemov" , Dave Hansen , Andy Lutomirski , Peter Zijlstra , "the arch/x86 maintainers" , Andrey Ryabinin , Alexander Potapenko , Catalin Marinas , Will Deacon , Andi Kleen , Linux-MM , LKML , "Carlos O'Donell" , Marco Elver , Taras Madan , "xiang1...@intel.com" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 2C9317001C87 Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=U4wQ6cOV; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf02.hostedemail.com: domain of hjl.tools@gmail.com designates 209.85.214.173 as permitted sender) smtp.mailfrom=hjl.tools@gmail.com X-Stat-Signature: u4d1651nxmyuhzu71zx4b6nqfusof39t X-HE-Tag: 1632244576-597606 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 Tue, Sep 21, 2021 at 9:52 AM Dmitry Vyukov wrote: > > On Sun, 7 Feb 2021 at 15:11, Kirill A. Shutemov wrote: > > > > On Sun, Feb 07, 2021 at 09:24:23AM +0100, Dmitry Vyukov wrote: > > > On Fri, Feb 5, 2021 at 4:16 PM Kirill A. Shutemov > > > wrote: > > > > > > > > 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 patchset is RFC quality and the code requires more testing before it > > > > can be applied. > > > > > > > > The userspace API is not finalized yet. The patchset extends API used by > > > > ARM64: PR_GET/SET_TAGGED_ADDR_CTRL. The API is adjusted to not imply ARM > > > > TBI: it now allows to request a number of bits of metadata needed and > > > > report where these bits are located in the address. > > > > > > > > There's an alternative proposal[2] for the API based on Intel CET > > > > interface. Please let us know if you prefer one over another. > > > > > > > > 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. > > > > > > > > I include QEMU patch in case if somebody wants to play with the feature. > > > > > > Exciting! Do you plan to send the QEMU patch to QEMU? > > > > Sure. After more testing, once I'm sure it's conforming to the hardware. > > A follow up after H.J.'s LPC talk: > https://linuxplumbersconf.org/event/11/contributions/1010/ > (also +Carlos) > > As far as I understood, this kernel series depends on the Intel CET patches. > > Where are these compiler-rt patches that block gcc support? Hi Xiang, Please share your compiler-rt changes for LAM. -- H.J.