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=-7.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 722BCC433DB for ; Fri, 5 Feb 2021 23:23:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 46BA964FDE for ; Fri, 5 Feb 2021 23:23:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232085AbhBEXW7 (ORCPT ); Fri, 5 Feb 2021 18:22:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232569AbhBEOZQ (ORCPT ); Fri, 5 Feb 2021 09:25:16 -0500 Received: from mail-oi1-x230.google.com (mail-oi1-x230.google.com [IPv6:2607:f8b0:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5451AC061A2B for ; Fri, 5 Feb 2021 07:50:52 -0800 (PST) Received: by mail-oi1-x230.google.com with SMTP id h192so7920698oib.1 for ; Fri, 05 Feb 2021 07:50:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DXaDfNcUv+WdAxJMcKk3vOMMC2UEVA2HeEFd3d5xH68=; b=QEpRBNE5E1CgI4//GqSAN6QmRzxv+u84cAcrQo3xpHZxWICl2LU1+Gw7kvZq24L1wQ RvqnsxhSe/427ydgOfUZ1gjIe/5qEelN5CIj1lw2L/8nRTntKn/twGMp4JPUbF3Ubtkg F7AXKcpR/kZb85nSfkNCOdcT5SOYLIQiaoLyHz+GVsOGDJyyyQBB/RqcXkEppLd9OfZ8 ITbnMJKOEB4fE7R4OFjpdItHofu6U+cyfcUPHvN0Xfx/E1+r7MIyENUHg3bH1lcZ1g4q fi6+PsMjCZ2ct/+d+H3r5m1cLpUe1SPwhj2Ih+udCQXYYPZbam3u33bdxYE03QecCt9Z iTJA== 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=DXaDfNcUv+WdAxJMcKk3vOMMC2UEVA2HeEFd3d5xH68=; b=CBXy0iPO+fjSee6c3HURPjYW7+vqjkzhjlZ62eIYUY/IKw6fIZPjr2KI1wbiNLk9yE Fb/Og2g1F31/WuGh4ryhHoo8eIW3awlVMXSvLHmEMqo1qwr86kQ7OCJ0bzSBrvJxa93X EQpYRTJ6yN0gmyFfUKHcGgCE2QS1eS5Jt8B+7OVoNLWiJE8NjmO9qMP/io5PzuclMYQF GHmrIYsq+0qwBLvGep0DZhUHxUUeRbsEwV+UN7d8xgVsvofR8XTR4AM5YI/0cejoQcEK Bo1nMFrkUR3aDt4WmTfFKStFf9aeqNQ3pfXvUYS9UKvbn28Lglf3uIK8wlYxPH2yzjEr 8b2g== X-Gm-Message-State: AOAM532GpYVtAKbOegE09HCMrMSpZi6ZPCwgQ4sAueyxfEHuw+ExGVLT xcQtwnbzUeLGX10+paGeB/DuPNSNNI69naq+P9YjsAzjwaU= X-Google-Smtp-Source: ABdhPJwHTnPAUM85HdMxOyVKYR58qW1z0dM2qVU5dOnBXWP29Z6+qCP6jMhGC6R7R9dw7IYl0+73dKZvG/k1a7nVFxU= X-Received: by 2002:aca:c693:: with SMTP id w141mr3370936oif.58.1612539792227; Fri, 05 Feb 2021 07:43:12 -0800 (PST) MIME-Version: 1.0 References: <20210205151631.43511-1-kirill.shutemov@linux.intel.com> <20210205151631.43511-11-kirill.shutemov@linux.intel.com> In-Reply-To: <20210205151631.43511-11-kirill.shutemov@linux.intel.com> From: "H.J. Lu" Date: Fri, 5 Feb 2021 07:42:36 -0800 Message-ID: Subject: Re: [RFC 9/9] x86/mm: Implement PR_SET/GET_TAGGED_ADDR_CTRL with LAM To: "Kirill A. Shutemov" Cc: Dave Hansen , Andy Lutomirski , Peter Zijlstra , "the arch/x86 maintainers" , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , 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 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 -- H.J. 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=-7.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 32711C433E0 for ; Fri, 5 Feb 2021 15:43:15 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 98D08650EC for ; Fri, 5 Feb 2021 15:43:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 98D08650EC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id EAE036B006E; Fri, 5 Feb 2021 10:43:13 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E5C0A6B0070; Fri, 5 Feb 2021 10:43:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D74BD6B0072; Fri, 5 Feb 2021 10:43:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0190.hostedemail.com [216.40.44.190]) by kanga.kvack.org (Postfix) with ESMTP id C07EC6B006E for ; Fri, 5 Feb 2021 10:43:13 -0500 (EST) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 8DAC6181AEF09 for ; Fri, 5 Feb 2021 15:43:13 +0000 (UTC) X-FDA: 77784633066.07.nerve32_4c0d9d6275e5 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id 5FC441803FF02 for ; Fri, 5 Feb 2021 15:43:13 +0000 (UTC) X-HE-Tag: nerve32_4c0d9d6275e5 X-Filterd-Recvd-Size: 3736 Received: from mail-oi1-f173.google.com (mail-oi1-f173.google.com [209.85.167.173]) by imf33.hostedemail.com (Postfix) with ESMTP for ; Fri, 5 Feb 2021 15:43:12 +0000 (UTC) Received: by mail-oi1-f173.google.com with SMTP id y199so5855168oia.4 for ; Fri, 05 Feb 2021 07:43:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DXaDfNcUv+WdAxJMcKk3vOMMC2UEVA2HeEFd3d5xH68=; b=QEpRBNE5E1CgI4//GqSAN6QmRzxv+u84cAcrQo3xpHZxWICl2LU1+Gw7kvZq24L1wQ RvqnsxhSe/427ydgOfUZ1gjIe/5qEelN5CIj1lw2L/8nRTntKn/twGMp4JPUbF3Ubtkg F7AXKcpR/kZb85nSfkNCOdcT5SOYLIQiaoLyHz+GVsOGDJyyyQBB/RqcXkEppLd9OfZ8 ITbnMJKOEB4fE7R4OFjpdItHofu6U+cyfcUPHvN0Xfx/E1+r7MIyENUHg3bH1lcZ1g4q fi6+PsMjCZ2ct/+d+H3r5m1cLpUe1SPwhj2Ih+udCQXYYPZbam3u33bdxYE03QecCt9Z iTJA== 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=DXaDfNcUv+WdAxJMcKk3vOMMC2UEVA2HeEFd3d5xH68=; b=S/8TOy2gZVwFac8LMwLTpvtFzlqYsxgXE73M2jFVyqYdCPA6DbdtY/R5EXpl4SJF+2 6ib2pPLFQHPcanP2Dy5eUd5zlCgXkgie+CLdZWuagFOZ9DA+Twcne9BjHuAlNGTAF2a0 S79+Ke5aOuHdnDeCD/iO0kYKAsxwabYu8LCE3vJy2HO7h+7uEbmtubH7vJt7UBqXmT3l eoBNnZCSmrlI3xJKwH9xDRU+MxJniLIMVeb9AkCeCHrINmjdKvHS+BriFAHUM1raXCoZ t7nwvQ7QsN75KrDvSBMcL9lvsLd12NwHNiiaxRHThFs/F/FpEgG8rCTHcjXMG6R5V7Q/ H6fg== X-Gm-Message-State: AOAM533NdPAdqd/8y1PpEH+f6JAW6xR+rMnOD2vJ4NmRjkC2BnI+92BA hAI5xpoOf8vqsOYcn5HmTPGHPytyrRRBBcqUnF0= X-Google-Smtp-Source: ABdhPJwHTnPAUM85HdMxOyVKYR58qW1z0dM2qVU5dOnBXWP29Z6+qCP6jMhGC6R7R9dw7IYl0+73dKZvG/k1a7nVFxU= X-Received: by 2002:aca:c693:: with SMTP id w141mr3370936oif.58.1612539792227; Fri, 05 Feb 2021 07:43:12 -0800 (PST) MIME-Version: 1.0 References: <20210205151631.43511-1-kirill.shutemov@linux.intel.com> <20210205151631.43511-11-kirill.shutemov@linux.intel.com> In-Reply-To: <20210205151631.43511-11-kirill.shutemov@linux.intel.com> From: "H.J. Lu" Date: Fri, 5 Feb 2021 07:42:36 -0800 Message-ID: Subject: Re: [RFC 9/9] x86/mm: Implement PR_SET/GET_TAGGED_ADDR_CTRL with LAM To: "Kirill A. Shutemov" Cc: Dave Hansen , Andy Lutomirski , Peter Zijlstra , "the arch/x86 maintainers" , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , 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 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 -- H.J.