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 9D5E9C4332F for ; Sat, 12 Feb 2022 00:11:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2CDC16B007B; Fri, 11 Feb 2022 19:11:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 27D946B007D; Fri, 11 Feb 2022 19:11:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 145D36B007E; Fri, 11 Feb 2022 19:11:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0242.hostedemail.com [216.40.44.242]) by kanga.kvack.org (Postfix) with ESMTP id 060CE6B007B for ; Fri, 11 Feb 2022 19:11:10 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id C000D8249980 for ; Sat, 12 Feb 2022 00:11:09 +0000 (UTC) X-FDA: 79132197858.20.60EE05F Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by imf22.hostedemail.com (Postfix) with ESMTP id 0276AC0007 for ; Sat, 12 Feb 2022 00:11:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644624669; x=1676160669; h=message-id:date:mime-version:to:cc:references:from: subject:in-reply-to:content-transfer-encoding; bh=VdSJ8eY/U+4hpxtDAQ/eHvpH0QesMIBN4OIVk8QPpY0=; b=k5ljxvYxDbso+zjXAvubaJPUL2v5L6tXk22YWSdfjBR/1n6euaTPa/0r X33ju8ZbiUyIBOKoWXz89gMbUU06sI7FiJ+51S7QDpmbdViaKmo4AFEGj PELPThjsQUwGnxt3KcWNrWhaVgmMUcCEhVehE/WQ2oAcTl2SO0B7eCyIU BJzdKHwTdGVwefn7DUm7ezqPaC82HMPqV1dRuI+mqlTo6XWCYGd9BMd8x hspt4bNQTDxwy5eoi6N02UYXqmr1T0Xipxnn23KYTbjXX1jlt5bXcXCC8 3lPrzpf6T3orNNutHUSeS37RmYQnydkXDXtwyG12tIg5H5rCpwv9bps2o A==; X-IronPort-AV: E=McAfee;i="6200,9189,10255"; a="248664686" X-IronPort-AV: E=Sophos;i="5.88,361,1635231600"; d="scan'208";a="248664686" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Feb 2022 16:11:07 -0800 X-IronPort-AV: E=Sophos;i="5.88,361,1635231600"; d="scan'208";a="542295349" Received: from nsmdimra-mobl.amr.corp.intel.com (HELO [10.209.96.127]) ([10.209.96.127]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Feb 2022 16:11:06 -0800 Message-ID: Date: Fri, 11 Feb 2022 16:11:03 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US To: Andy Lutomirski , 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 References: <20220130211838.8382-1-rick.p.edgecombe@intel.com> <20220130211838.8382-26-rick.p.edgecombe@intel.com> <4eeab037-502c-4d8d-84da-e29203dad6ad@www.fastmail.com> From: Dave Hansen Subject: Re: [PATCH 25/35] x86/cet/shstk: Add user-mode shadow stack support In-Reply-To: <4eeab037-502c-4d8d-84da-e29203dad6ad@www.fastmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=k5ljxvYx; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf22.hostedemail.com: domain of dave.hansen@intel.com has no SPF policy when checking 192.55.52.120) smtp.mailfrom=dave.hansen@intel.com X-Rspam-User: X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 0276AC0007 X-Stat-Signature: x5r79jy5m53dpubyz8qbh871azxi9h14 X-HE-Tag: 1644624668-75438 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 2/11/22 16:07, Andy Lutomirski wrote: > 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. I was grouping PASID along with the CET MSRs because they're the only supervisor state. But, yeah, it's all XRSTOR'd at the same spot right now, user or kernel.