From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233]) by sourceware.org (Postfix) with ESMTPS id 5BB44386187B for ; Wed, 17 Feb 2021 18:43:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5BB44386187B Received: by mail-oi1-x233.google.com with SMTP id d20so15988640oiw.10 for ; Wed, 17 Feb 2021 10:43:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=M2swpnFVJdz/tW9/w+1hecPyUEFfDwE0X04+ugmZpN0=; b=nMvdOTmBbu3751GfJddIR9eYE4ajZEDu7b3Y10IQjAtfA4usPL9IltPPQimSq7A2Vb gftC26bwkhj41cbbVFpYcCQje0BI9JJnyNSMynXRn3a5unx/2nrDlIxReOPGNO26FcI8 gjihgk05X9NgJjXwSepdJbe02Q5FYNj5LVWkr7B/6L3ME60Xj/5qbFDAzxyiLg/d3Bpa ConG3TDHWNcL3O5f89VB8DybTivhIsNq8kKH9TWt/Dxpkn6GvJtmlimTMgVOu89Pw259 XkaiqLBXcUYh+64VHE0EVu7d4vLDxtlMxW6oAcCPPG6lzOL1BKhMKNpGX5b8YNbg9KOB GdEw== X-Gm-Message-State: AOAM530DUWOUsOfDY9gX9CLVYOopZmu6ccho04PlnAbdeO1EyaQ0U/hk PBAcgc/riRAqQI+pTw/+i1SqqkoxhijfOW0k4A4= X-Google-Smtp-Source: ABdhPJzUDdrxz+2dvcVmVUS/rcAQa155wBU3bJ849KOTJXvUJhGVsTWhQECmU0uyFi8JwbbJj5MmNrdPjDSYvkVV8A8= X-Received: by 2002:aca:c40e:: with SMTP id u14mr145472oif.25.1613587434811; Wed, 17 Feb 2021 10:43:54 -0800 (PST) MIME-Version: 1.0 References: <20210211173711.71736-1-hjl.tools@gmail.com> <877dndmxj3.fsf@oldenburg.str.redhat.com> In-Reply-To: From: "H.J. Lu" Date: Wed, 17 Feb 2021 10:43:18 -0800 Message-ID: Subject: Re: [RFC] : An API for tagged address To: Florian Weimer , "Kirill A. Shutemov" , "Shanbhogue, Vedvyas" Cc: "H.J. Lu via Libc-alpha" , Joseph Myers Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3029.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 18:43:56 -0000 On Fri, Feb 12, 2021 at 5:06 AM H.J. Lu wrote: > > On Fri, Feb 12, 2021 at 1:43 AM Florian Weimer wrote: > > > > * H. J. Lu via Libc-alpha: > > > > > On Thu, Feb 11, 2021 at 12:28 PM Joseph Myers wrote: > > >> > > >> On Thu, 11 Feb 2021, H.J. Lu via Libc-alpha wrote: > > >> > > >> > An API for tagged address: > > >> > > >> Please write a longer commit message, discussing what "tagged address" is, > > >> which architectures have such a thing (the API should try to cover > > >> whatever is common between architectures as far as possible - is this > > >> meant to relate to AArch64 MTE, how does it relate to the MTE code we > > > > > > This API is for Intel LAM: > > > > > > https://www.phoronix.com/scan.php?page=news_item&px=Intel-LAM-Glibc#:~:text=Intel%20Linear%20Address%20Masking%20(LAM,bit%20linear%20addresses%20for%20metadata.&text=With%20LAM%20enabled%2C%20the%20processor,linear%20address%20to%20access%20memory. > > > > > > and ARM TBI: > > > > > > https://en.wikichip.org/wiki/arm/tbi > > > > Do the setters/getters change process or thread properties? > > On x86-64, mask is stored in TCB. TCB will be updated. It applies > to all threads. > > > The interface assumes that the tag bits are uniform across pointer > > types. I think that's not true, at least from a historical perspective. > > This is true for LAM and TBI. > > > People complained that our protection key interfaces are too slow to be > > useful. Do we need to find a way to inline the tag/untag operations? > > > > The internal interface is inlined. We can also inline the public interface > if needed. But set_tagged_address_mask isn't inlined at all. > > -- > H.J. Add Ved and Kirill. -- H.J.