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=-18.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=ham 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 D2B42C433DB for ; Sun, 7 Feb 2021 14:11:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 70D7364E4E for ; Sun, 7 Feb 2021 14:11:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 70D7364E4E Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id EECCB6B0006; Sun, 7 Feb 2021 09:11:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E9DA66B006C; Sun, 7 Feb 2021 09:11:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DD7926B006E; Sun, 7 Feb 2021 09:11:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0240.hostedemail.com [216.40.44.240]) by kanga.kvack.org (Postfix) with ESMTP id C79956B0006 for ; Sun, 7 Feb 2021 09:11:52 -0500 (EST) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 71CE83632 for ; Sun, 7 Feb 2021 14:11:52 +0000 (UTC) X-FDA: 77791660464.17.egg87_3010dea275f6 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin17.hostedemail.com (Postfix) with ESMTP id 53FF3180D0180 for ; Sun, 7 Feb 2021 14:11:52 +0000 (UTC) X-HE-Tag: egg87_3010dea275f6 X-Filterd-Recvd-Size: 4676 Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50]) by imf37.hostedemail.com (Postfix) with ESMTP for ; Sun, 7 Feb 2021 14:11:51 +0000 (UTC) Received: by mail-qv1-f50.google.com with SMTP id l11so5824951qvt.1 for ; Sun, 07 Feb 2021 06:11:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EbecQ8zqHgOTcO4kzpmsL2upyxqqOx54oC+JT9KeA/4=; b=VoaGYA4WUtUvha0+74kbVoXOepwpjsHkoeLZhXi/1xkY49sjDbmzJMPgZaOKXqU85R Nn1tpOcn3Tehi9gE6GlaBHPy2J3lKiC8DSbAEOm1TjA7bYWbZOKjl4ka1utX9OBum7So CuZHEohpYwaG3IHeDIV2ihJ/xKPXUQDQ2WsFrQERAta05ODwlmnff81/EMxnWcfIk2Ow cdDsf4mePz4TwYH0y87ivhaJ936z3Agn20xVa7zKK4VojDgcXaLrK0DoN/sjwJSj9jke +8Yk20voiRe5dBjoRh9DJN2Vm2NzOcuUK6G+X+gwZFSjfB/QNB0AGFnys+w+WQJaUY0u e34g== 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=EbecQ8zqHgOTcO4kzpmsL2upyxqqOx54oC+JT9KeA/4=; b=g8WAIfEuTEr7rmLap+vYufs7+vvoKQB4EscGogjUbYknlTABwb5eGD9DpjtIh+zPcN rE5ZMR+3cYIHAKTj8YnxhVHAeWa91TT3kD9D5M1DpZO6SQvb3arsqKE5g2A0RTChKb0N TfNkxTW9Es7dMcOImUZxEZ7c7z+QYeTjdB3p6KTnvdat3Ep51Lo2JZN+eYtxpJuOTfsQ qqZGTxPGo/cKMBllZU4GhhTqKE00vEUKClcN/kxw8LtxYkHF9NRXiWxzEInqdf6z86M4 ElBGIAibWzP/cLN5Fxx2uyBbrr2NMqUJU7OcF166BCyarbkNpWP7arxTf0hfYOQb3OjB wf3g== X-Gm-Message-State: AOAM530zOcOcVj70qTrchqyyAr3Cf8p7yb1njxIlVb1rq+E8jN+GmOdA zrH1fm5zfkWxcwGWMtQIO4Bf2AvrC7fMFL/GeaBdQQ== X-Google-Smtp-Source: ABdhPJxHoy804puWmwQbYddKwGPvAoW1wM8OFFEwbBktJ3yBnCKrgnoO4o2XSPcFHIU5IrVf8JtulLV2WKfC1uMV10Y= X-Received: by 2002:a05:6214:522:: with SMTP id x2mr12631913qvw.13.1612707111041; Sun, 07 Feb 2021 06:11:51 -0800 (PST) MIME-Version: 1.0 References: <20210205151631.43511-1-kirill.shutemov@linux.intel.com> <20210205151631.43511-11-kirill.shutemov@linux.intel.com> <20210207140906.hdfzorevpmiqtryd@box> In-Reply-To: <20210207140906.hdfzorevpmiqtryd@box> From: Dmitry Vyukov Date: Sun, 7 Feb 2021 15:11:39 +0100 Message-ID: Subject: Re: [RFC 9/9] x86/mm: Implement PR_SET/GET_TAGGED_ADDR_CTRL with LAM To: "Kirill A. Shutemov" Cc: "H.J. Lu" , "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 , GNU C Library , GCC Development Content-Type: text/plain; charset="UTF-8" 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 Sun, Feb 7, 2021 at 3:09 PM Kirill A. Shutemov wrote: > > On Sun, Feb 07, 2021 at 09:07:02AM +0100, Dmitry Vyukov wrote: > > On Fri, Feb 5, 2021 at 4:43 PM H.J. Lu wrote: > > > > > > On Fri, Feb 5, 2021 at 7:16 AM Kirill A. Shutemov > > > wrote: > > > > > > > > Provide prctl() interface to enabled LAM for user addresses. Depending > > > > how many tag bits requested it may result in enabling LAM_U57 or > > > > LAM_U48. > > > > > > I prefer the alternate kernel interface based on CET arch_prctl interface which > > > is implemented in glibc on users/intel/lam/master branch: > > > > > > https://gitlab.com/x86-glibc/glibc/-/tree/users/intel/lam/master > > > > > > and in GCC on users/intel/lam/master branch: > > > > > > https://gitlab.com/x86-gcc/gcc/-/tree/users/intel/lam/master > > > > Hi Kirill, H.J., > > > > I don't have strong preference for PR_SET/GET_TAGGED_ADDR_CTRL vs > > ARCH_X86_FEATURE_1_ENABLE itself, but tying LAM to ELF and > > GNU_PROPERTY in the second option looks strange. LAM can be used > > outside of ELF/GNU, right? > > Sure. In both cases it's still a syscall. Oh, I meant just the naming scheme. The consts are declared in elf.h and are prefixed with GNU_PROPERTY.