From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) by sourceware.org (Postfix) with ESMTPS id BA2C83947C3B for ; Sun, 7 Feb 2021 14:11:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org BA2C83947C3B Received: by mail-qv1-xf29.google.com with SMTP id w11so5801668qvz.12 for ; Sun, 07 Feb 2021 06:11:51 -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=EbecQ8zqHgOTcO4kzpmsL2upyxqqOx54oC+JT9KeA/4=; b=fsDCWGVGcJ6WXS8vPHhTLN71HspPzEssFmedRqlnZb2RVoWR93qtn4AYuF2bWkEWO/ wPrklVkLjU7j6SwqvTFerXIvWZN2dXNfeLFTsnx4JjIFPoJ9I7Np24PUDyWcfygEcAsM kp0cMAQp6FSASDGHSetEJoLmmRWWu2DdkRTcZEqG+aOZflTK6Cpf6Mj7MgmqW3fsiV0B owRXCMVsHZxoMqAnsmUMeRgDqCflqVf28Vlfkg2wbmi9bHOQdgh9Jxy1hbcKIoBAUKZK RrUzQTzaGtz3X78jwOTkqaVosQHYvYDd9XY+pYrKm7L0bjbMVNnE5ir75SKTi65mm39A vjpA== X-Gm-Message-State: AOAM533BcdhclF4c9g5qaEsRdQHE2hKxicy0UYSjCqEj6FIE9CEj2kSP fNbpJYc6eK+WU5xGNxVZMd2nb7V7QbnnxrZ9sFHWdw== 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-Spam-Status: No, score=-19.7 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL 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: Sun, 07 Feb 2021 14:11:53 -0000 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.