Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5522825pxb; Mon, 14 Feb 2022 00:42:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJw649qPvuj+plegG6dvB8pceeZyS4kh0iudz7JRKIIvQ9Ofml8RfqUrJnOzKjg3crvHFvbU X-Received: by 2002:a17:907:1b21:: with SMTP id mp33mr10971383ejc.523.1644828122192; Mon, 14 Feb 2022 00:42:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644828122; cv=none; d=google.com; s=arc-20160816; b=EbhNE68cc2m6g7LzLwZJd7fOgVLz8Y4k/OunCy1fJZEhPXQ7rIab6+xTb/m4nn95la L4XS4FLIz6Eztqi4XHnlL1eWQowlVXDF85g3WEwrNSSjkhIzvxpuPbxPmRGOeiPIiIL2 mwmyavjxcjVRj2WpbwxD7iTJx20hxL8jqFhxnS8Mg0zcxL9bBRTDW0sM7wyENNI+23kw dh4zquVSVFUQy4w5FOaX1ksI21Di7b2lLAWHNC6ouJOSKKqHtXnVzluTxsZDigV51D22 VTDWfafdWACULccQbFIBMq9scKFPYdO7OLh9z5iLd3w+sdc+8l52TQm9/Vzixoe88vVL N+Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:dkim-signature; bh=CyJco5X6rQ88qGNqXuVp83NA3BmayLkZBAEu1s2+5P0=; b=03nfSU39KYbIXtb5L1xdDWEhk2QNWLIKaPZCIep3BvC2nJr8URC8QA91jYhf1WHDxY f5ASceHFLyFhuWRFgw1GAJmEPJFlV6it27h5gsNYDwv3khaZ2f7vsn/YqPBhyLAqT/cL h5ViV4jrW9EPkTA2uJ1aJe0wKwocxspnLHXT1Jh2YYpfXZrRo3JU8wBZxXa7kKawdDDd T7Vehdx17yuXMnY+HOsEHkvsSl+JzfoCvSP0NVsB4Fb5du1V02fYsenA8DAD1r0oP+Vw ArIlgkLNzZ4UnLribdgcFAAfKhJ6kMABJD+0GmnRiaH5CsY9MOYSRcEsQtKc0vt/lA2G UdCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hlvSQbFr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mp41si16316580ejc.153.2022.02.14.00.41.37; Mon, 14 Feb 2022 00:42:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hlvSQbFr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354320AbiBLAIW (ORCPT + 93 others); Fri, 11 Feb 2022 19:08:22 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:51450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242360AbiBLAIU (ORCPT ); Fri, 11 Feb 2022 19:08:20 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0334FD6C; Fri, 11 Feb 2022 16:08:17 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 938DCB82DAF; Sat, 12 Feb 2022 00:08:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E0B3C340EB; Sat, 12 Feb 2022 00:08:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1644624495; bh=gqdzFF5kDLCMBodiKxmUXermGyRjGnle42YGkTQN5Vk=; h=In-Reply-To:References:Date:From:To:Cc:Subject:From; b=hlvSQbFrQxmDi6X7OgKXY8erSLYZBXiMp+3RUvAs7zi4JkYDwT3AmnwmkI1jGS+do +6sQsyUTdFs3KMziR4RfqebJt1M8+M7wRerkve3HULwvaaUWs5rlIBScv/7w9JQXjN +0gRs5gfN9P/Cpkx1oKGa6eHg6INKwdQy4pz1CN9kl52D36Oos4vcD/PFGbiksNNVF fea1HmbbGEnQ2huCyuzPscWrNhyxl4pY1uFgxglLQ14LMZDUVv5BNEpiTjy2jN3Q/A cjq81L4qtwIqS6JFA92ICb5x211+Zc/Zox4kcJ/5XL6QMQVb4ryHhAFrtXc1Z0DXGN MoCcRY3Ly+RFg== Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id EC30227C0054; Fri, 11 Feb 2022 19:08:12 -0500 (EST) Received: from imap48 ([10.202.2.98]) by compute5.internal (MEProxy); Fri, 11 Feb 2022 19:08:13 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrieeggddukecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedftehnugih ucfnuhhtohhmihhrshhkihdfuceolhhuthhosehkvghrnhgvlhdrohhrgheqnecuggftrf grthhtvghrnheptdfhheettddvtedvtedugfeuuefhtddugedvleevleefvdetleffgfef vdekgeefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprghnugihodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdduudeiudekheei fedvqddvieefudeiiedtkedqlhhuthhopeepkhgvrhhnvghlrdhorhhgsehlihhnuhigrd hluhhtohdruhhs X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id D415E21E006E; Fri, 11 Feb 2022 19:08:11 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-4748-g31a5b5f50e-fm-cal2020-20220204.001-g31a5b5f5 Mime-Version: 1.0 Message-Id: <4eeab037-502c-4d8d-84da-e29203dad6ad@www.fastmail.com> In-Reply-To: References: <20220130211838.8382-1-rick.p.edgecombe@intel.com> <20220130211838.8382-26-rick.p.edgecombe@intel.com> Date: Fri, 11 Feb 2022 16:07:51 -0800 From: "Andy Lutomirski" To: "Dave Hansen" , "Rick P Edgecombe" , "the arch/x86 maintainers" , "H. Peter Anvin" , "Thomas Gleixner" , "Ingo Molnar" , "Linux Kernel Mailing List" , linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, "Linux API" , "Arnd Bergmann" , "Balbir Singh" , "Borislav Petkov" , "Cyrill Gorcunov" , "Dave Hansen" , "Eugene Syromiatnikov" , "Florian Weimer" , "H.J. Lu" , "Jann Horn" , "Jonathan Corbet" , "Kees Cook" , "Mike Kravetz" , "Nadav Amit" , "Oleg Nesterov" , "Pavel Machek" , "Peter Zijlstra (Intel)" , "Randy Dunlap" , "Shankar, Ravi V" , "Dave Martin" , "Weijiang Yang" , "Kirill A. Shutemov" , "Moreira, Joao" , "john.allen@amd.com" , "kcc@google.com" , "Eranian, Stephane" Cc: "Yu-cheng Yu" Subject: Re: [PATCH 25/35] x86/cet/shstk: Add user-mode shadow stack support Content-Type: text/plain X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 11, 2022, at 3:37 PM, Dave Hansen wrote: > On 1/30/22 13:18, Rick Edgecombe wrote: >> Add the user shadow stack MSRs to the xsave helpers, so they can be used >> to implement the functionality. > > Do these MSRs ever affect kernel-mode operation? > > If so, we might need to switch them more aggressively at context-switch > time like PKRU. > > If not, they can continue to be context-switched with the PASID state > which does not affect kernel-mode operation. PASID? PASID is all kinds of weird. I assume you mean switching it with all the normal state. > > Either way, it would be nice to have some changelog material to that effect.