Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3343483pxb; Sun, 7 Feb 2021 06:15:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJyXa8UOvQpjEIhyTXwxNAeYitsmjQp88Uk2huAlGGrloRek8Es6Gpw4JXRWtxgnNuTjn1j2 X-Received: by 2002:a17:906:4dc3:: with SMTP id f3mr12757956ejw.233.1612707315938; Sun, 07 Feb 2021 06:15:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612707315; cv=none; d=google.com; s=arc-20160816; b=exSc8aTJN7xFcBIWUN8Q5qS+kaYR5AWpfCzKatkv0fZhVkrdV7BAkNWGE57fwzelxb CH/jHzSW4br22nUMGu+bdh+R8mFOBL+5XmXDs+m6kmA2ra4BTNMlnBcl1mXZO4ylqr+b kk/86kGDmypHMzzDiKeBIUYKeYF51NV+DCSTlBSHYIUxxDAfv/WYI63/7k+sBf2RQFGI dEBfnF+UskUVPCSSJHycdIKiKT8KzdcTHZxqxOh/Nvucwy9ZTHoli6C+0wjz4G88B+L7 rk/nWCWtpAnSrW50jxWXxx5KLijoBcYkuHBtJEuqlYh+Sdw3694q8zFMNGbgjhoVUG2Q RKog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=EbecQ8zqHgOTcO4kzpmsL2upyxqqOx54oC+JT9KeA/4=; b=WUIK3WY7wvdMZsyKZm7neGGii5Y1nNLYoqIpBomLoJZc4uFlDof1M4+dRM1r3zs4gJ TFOkPN7aBsAyd1bXWRmJRSifaE2t3oqgJ74BRbiUcQW4WaSZRa+D3jXbAqTOrRUkx86m 3jflJyfTPpHF2OMOn0KOoLwfnvkHkFyxKEzGmWBu2sHK6d8fir5PyMwhAidg0Y9a5OVV ZjioFkMdqzwOP2XWs0Z3Do3AbNAigWDrk3nZ7wF8D32JXLzGddHCabVKM80jIx0MCo7L /uIdHPwG60JifQ6+DjId4EXF+lCt3cNKwmKqoLZO+ixil4TSsDYrh4idLuAqmqPvU54L 0GOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=VoaGYA4W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v19si9047185eda.391.2021.02.07.06.14.52; Sun, 07 Feb 2021 06:15:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=VoaGYA4W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230091AbhBGOMn (ORCPT + 99 others); Sun, 7 Feb 2021 09:12:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230064AbhBGOMe (ORCPT ); Sun, 7 Feb 2021 09:12:34 -0500 Received: from mail-qv1-xf32.google.com (mail-qv1-xf32.google.com [IPv6:2607:f8b0:4864:20::f32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19FDCC061756 for ; Sun, 7 Feb 2021 06:11:52 -0800 (PST) Received: by mail-qv1-xf32.google.com with SMTP id es14so5813036qvb.3 for ; Sun, 07 Feb 2021 06:11:52 -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=ZeMuF2Xd2XkEo/4MuDybFDvpbXqiZVxBHxDXmzxZ2ZoINREMRH5d7796ZgxMhsb5bM lB1QzPV6XjWzuSNQZGID1EtgwMoqTW4qxpFFzS42CmDwRvewTSSdcJW1e5SS2tRu6yku c7pAPSZ2y7TG14Lt2auUXR5sFOMGuna8d0BscvURjZbvXfOf4+fElnLXTwVdNCCVQbMp qXn5/I+nwiaBphcjCg8lZN2RktCh7PhVYOjHA09RLnTU5ZCBa6nng8kkgrmEncU0gk9a HZUMT2LaElUR48hDXG27tgeETUSV7C/NCHTJdMF7Cg6Eg+a+bxiQXpX1nN3n0OAOTgkB vMig== X-Gm-Message-State: AOAM531G12ICCoDwKvH9EA2p0EdzRaR2Pb/l4LTnU0yGBVrZtLoQo9pn u0k34/xN0rYEuQL7aDH0DVVz9JdOuAp2ZfrHHIRkcA== 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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.