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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3FAD2C433F5 for ; Sat, 12 Feb 2022 00:08:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A721C6B0075; Fri, 11 Feb 2022 19:08:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9FB4B6B007B; Fri, 11 Feb 2022 19:08:19 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 873DE6B007D; Fri, 11 Feb 2022 19:08:19 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.28]) by kanga.kvack.org (Postfix) with ESMTP id 74A0F6B0075 for ; Fri, 11 Feb 2022 19:08:19 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 4BDBA485 for ; Sat, 12 Feb 2022 00:08:19 +0000 (UTC) X-FDA: 79132190718.02.90C437B Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf01.hostedemail.com (Postfix) with ESMTP id B16F140003 for ; Sat, 12 Feb 2022 00:08:18 +0000 (UTC) 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 310BBB82DD6; Sat, 12 Feb 2022 00:08:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59ACBC340E9; 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 Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=hlvSQbFr; spf=pass (imf01.hostedemail.com: domain of luto@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=luto@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-Rspamd-Server: rspam07 X-Rspam-User: X-Rspamd-Queue-Id: B16F140003 X-Stat-Signature: uk48b7gkanswojnnjd8mi7sghagxnyd8 X-HE-Tag: 1644624498-124514 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 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.