From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) by sourceware.org (Postfix) with ESMTPS id 374133857C4F for ; Fri, 12 Feb 2021 13:07:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 374133857C4F Received: by mail-ot1-x32d.google.com with SMTP id d7so8291175otq.6 for ; Fri, 12 Feb 2021 05:07:00 -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=ZhWmClgGckE2YC6uef0II/TxRjSNBo9g/ffJr7zN6gg=; b=UifzSXaF3Dq2aw7M2pY+fIgFqTPp/AWZQDIEOyOUX4yL6+J5unkRbsrekP0CcHA5Xf 9+2BSaA12KfIbigTjDIQTon88e0mN6YVdifun3n8MhkJfCZZxR3euCFbR/88MN+3VfG+ 0zZ7Fq3py8LOcwBtyEfRA4UK4wvd0jQhEXw+WnNSs9RWR/iBoJJM4B1gLDoN5B83CC/A EnyFFHvP2AJfFLsrhP8G6zqauZhAnzocsx3xjdFARmpjcQobfbZUb4uCFLFpLTotSykA /JTiUDxRwgkvtNtPM9FsxkJlha8xxmSPwo9FBRrlj4zqACVIisz6fnTnQVErwPgbVOhV DhdQ== X-Gm-Message-State: AOAM531Xn3SEU9q7FEKJD0L3FaFgBcuYWZ/ij8f0cvqWgrioCeEpkANZ DBdzt+VPiA8QTlde9kUzkdzvKPQ0iBLkS2AlSlTbbIM1YBE= X-Google-Smtp-Source: ABdhPJwuHEv/swWWB2rjGCuh47p61ylGQbIlZx1/ZuCH+S5we5LMIrb5llXYShqIWhHnKzQTfJq/1sXhDeKXuecQXs4= X-Received: by 2002:a05:6830:1285:: with SMTP id z5mr1949005otp.90.1613135219639; Fri, 12 Feb 2021 05:06:59 -0800 (PST) MIME-Version: 1.0 References: <20210211173711.71736-1-hjl.tools@gmail.com> <877dndmxj3.fsf@oldenburg.str.redhat.com> In-Reply-To: <877dndmxj3.fsf@oldenburg.str.redhat.com> From: "H.J. Lu" Date: Fri, 12 Feb 2021 05:06:22 -0800 Message-ID: Subject: Re: [RFC] : An API for tagged address To: Florian Weimer Cc: "H.J. Lu via Libc-alpha" , Joseph Myers Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3030.4 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: Fri, 12 Feb 2021 13:07:01 -0000 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.