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=-4.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 C1263C433E8 for ; Fri, 24 Jul 2020 03:41:37 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8B05120737 for ; Fri, 24 Jul 2020 03:41:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8B05120737 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 02A836B002F; Thu, 23 Jul 2020 23:41:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EF68D8D0003; Thu, 23 Jul 2020 23:41:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DBDFD6B0031; Thu, 23 Jul 2020 23:41:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0133.hostedemail.com [216.40.44.133]) by kanga.kvack.org (Postfix) with ESMTP id C149F6B002F for ; Thu, 23 Jul 2020 23:41:36 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 5179B16AF2 for ; Fri, 24 Jul 2020 03:41:36 +0000 (UTC) X-FDA: 77071569792.11.hole15_1517efa26f44 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin11.hostedemail.com (Postfix) with ESMTP id 258A2180BF15C for ; Fri, 24 Jul 2020 03:41:36 +0000 (UTC) X-HE-Tag: hole15_1517efa26f44 X-Filterd-Recvd-Size: 4718 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by imf38.hostedemail.com (Postfix) with ESMTP for ; Fri, 24 Jul 2020 03:41:34 +0000 (UTC) IronPort-SDR: q9+RoWtXe7G4wJBRmHGB61Mu/L7XeFDqXDlf7szcElGwkaFmBXMyjZ1sPO3Ps4tEaYBZ17FFYm aknaRm085lBg== X-IronPort-AV: E=McAfee;i="6000,8403,9691"; a="138721714" X-IronPort-AV: E=Sophos;i="5.75,389,1589266800"; d="scan'208";a="138721714" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jul 2020 20:41:32 -0700 IronPort-SDR: vZBCjDyBnbRpnpu2P81a/SKOPLVUIRzclKVaAwTsp4BON/vvAMoExoSxXrR5S5hf2e3C9xmFP+ BEXI1a2QqAjw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,389,1589266800"; d="scan'208";a="288864767" Received: from yyu32-desk.sc.intel.com ([143.183.136.146]) by orsmga006.jf.intel.com with ESMTP; 23 Jul 2020 20:41:31 -0700 Message-ID: Subject: Re: [PATCH v10 00/26] Control-flow Enforcement: Shadow Stack From: Yu-cheng Yu To: Dave Hansen , Sean Christopherson Cc: x86@kernel.org, "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org, Arnd Bergmann , Andy Lutomirski , 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 , Randy Dunlap , "Ravi V. Shankar" , Vedvyas Shanbhogue , Dave Martin , Weijiang Yang Date: Thu, 23 Jul 2020 20:40:33 -0700 In-Reply-To: References: <20200429220732.31602-1-yu-cheng.yu@intel.com> <20200723162531.GF21891@linux.intel.com> <2e9806a3-7485-a0d0-b63d-f112fcff954c@intel.com> <20200723165649.GG21891@linux.intel.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.4 (3.32.4-1.fc30) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 258A2180BF15C X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 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 Thu, 2020-07-23 at 11:41 -0700, Dave Hansen wrote: > On 7/23/20 9:56 AM, Sean Christopherson wrote: > > On Thu, Jul 23, 2020 at 09:41:37AM -0700, Dave Hansen wrote: > > > On 7/23/20 9:25 AM, Sean Christopherson wrote: > > > > How would people feel about taking the above two patches (02 and 03 in the > > > > series) through the KVM tree to enable KVM virtualization of CET before the > > > > kernel itself gains CET support? I.e. add the MSR and feature bits, along > > > > with the XSAVES context switching. The feature definitons could use "" to > > > > suppress displaying them in /proc/cpuinfo to avoid falsely advertising CET > > > > to userspace. > > > > > > > > AIUI, there are ABI issues that need to be sorted out, and that is likely > > > > going to drag on for some time. > > > > > > > > Is this a "hell no" sort of idea, or something that would be feasible if we > > > > can show that there are no negative impacts to the kernel? > > > Negative impacts like bloating every task->fpu with XSAVE state that > > > will never get used? ;) > > Gah, should have qualified that with "meaningful or measurable negative > > impacts". E.g. the extra 40 bytes for CET XSAVE state seems like it would > > be acceptable overhead, but noticeably increasing the latency of XSAVES > > and/or XRSTORS would not be acceptable. > > It's 40 bytes, but it's 40 bytes of just pure, unadulterated waste. It > would have no *chance* of being used. It's also quite precisely > measurable on a given system: > > cat /proc/slabinfo | grep task_struct | awk '{print $3 * 40}' If there is value in getting these two patches merged first, we can move XFEATURE_MASK_CET_USER to XFEATURE_MASK_SUPERVISOR_UNSUPPORTED for now, until CET is eventually merged. That way, there is no space wasted. Yu-cheng