Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1407360pxb; Thu, 4 Feb 2021 12:06:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJyCStfs1cgvtNHxVJOEzk4NwPm6GlWoNuUdq2AfxV4qOKJW9wdG2TaAb/910lCgMrVifQ8Y X-Received: by 2002:aa7:d15a:: with SMTP id r26mr270710edo.29.1612469212139; Thu, 04 Feb 2021 12:06:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612469212; cv=none; d=google.com; s=arc-20160816; b=oVaAO6+Whw8nB3OcjdTasu2rjc4Yrjs0Fh1uSWeUtvEtIyXMsn2x7epDHDkXhFGyRU P5vinXyF8PKdvakLZmT6raHVo4DdrUUFfizX3QmYzSu3lnz94oOjDCOVcUGYdn857x/u q+1WO3lAvbUqKsekb1i9kpsKmPxwG9g85CjoKZ1vQ79fbu/jjTdDRuudjQgj75BK+zto 3RqhlCHaxLFsThB6kQMWkLvthPbJP/YeC1+UXF+4wPvdiNlZ6eCL3MTalSfqE3hB/YMV kwwtos6vuo7252Z3AELa0bS0eoq0APTAG7CcbwJmmYA9ijde9h7SuAyaigSg0sGEAqVH OPCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=WHZcK8QVoi2vD+8PmR3PN87wlH3ll61Of0Qx4MDMC64=; b=VKuO1mwowt620asL3AYzWSMNB6MuGVrN53v3RgVw2+rR3pg71DLg2tVxL4BBpINooW kHe8hFDQzURJ1YlKDBjLwi0aZi13Dv+MsVnd+m3hDBt6THRre/gqp92kMqe7N5U7Xdmw lbmLrZHL9Q5EciOMk/QNN/SEdlMki/u/TNP+hIIVP1JPvX4UpDLKkCXJSSnp3Lo9Vwby Y/KmyEu5itHI/x1WBpQRQ+p3lo2QNfDZqdJzRoLoiv9hX6VwTARgW1jYb111S6s3kP4L cxo6DBaDuV2T9RN5GQA8Mfaq5yipV1zr7Tmnl4AcgVhrDR+oXz5qqhXRDtln+F1zUUsL GNmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=molOl3Ia; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v20si3856000ejh.685.2021.02.04.12.06.27; Thu, 04 Feb 2021 12:06:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=molOl3Ia; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239926AbhBDUDu (ORCPT + 99 others); Thu, 4 Feb 2021 15:03:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239689AbhBDT6u (ORCPT ); Thu, 4 Feb 2021 14:58:50 -0500 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DC35C061793 for ; Thu, 4 Feb 2021 11:58:10 -0800 (PST) Received: by mail-pl1-x632.google.com with SMTP id g3so2348736plp.2 for ; Thu, 04 Feb 2021 11:58:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=WHZcK8QVoi2vD+8PmR3PN87wlH3ll61Of0Qx4MDMC64=; b=molOl3IaFUBpm5yvQ+A9OSIeN/orT8NNAi7aoCp/sWRTGk9g8W86tnSPVFkc6HCXf9 hsJE5R/PsP/yXgKBnMfhV0KWTTuF8GznA2Hes0318EUCdxwVk1O/ne9RKEddHsRO0MXM Pm1woq1H8TFsGBL88AcxlJjWoS26XDCKZu0Zg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=WHZcK8QVoi2vD+8PmR3PN87wlH3ll61Of0Qx4MDMC64=; b=XhkoW/TNzJb6oAE45NQAUqS9k3HibryofAY+bT/M4JnIGIPQBdh92JNuUumFcoLeNd s2UscMNJL2wE+7zaWxY65q5rCgHCErJjKFpKA/LqXFRxSAOX/6ejCubgVrmleEBdnL6F 8pgtsoJt46mH17H0HemKZeuStW73wVVu9sOaSyVP7Cx5CvkLe9pds+m0V8gYmXWHIDPU /IZRGoI3tRqj4Q4AwSq3U/mbA//QeWh0DD+IWE9i6NsQCB3txLD9kbCd3IqZmF1vSweI fwHJddY8Nne6m0nLXBg3YWZEyN6g+IMPvWVyPXeQeJQ1GnnRGcyDqd9DK2eQZmn5oGCI f8ew== X-Gm-Message-State: AOAM530Wk1Uy/hqSALbc08ZlC3GtuZEXUuz+ZiRHqa4wgvhBjBofHBSh /DrtezZNA3/A0YICdmFQeRm9dw== X-Received: by 2002:a17:902:bb8c:b029:dc:2e5e:2b2 with SMTP id m12-20020a170902bb8cb02900dc2e5e02b2mr702471pls.10.1612468689661; Thu, 04 Feb 2021 11:58:09 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id y124sm4219551pfg.166.2021.02.04.11.58.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Feb 2021 11:58:08 -0800 (PST) Date: Thu, 4 Feb 2021 11:58:08 -0800 From: Kees Cook To: Yu-cheng Yu 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 , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Peter Zijlstra , Randy Dunlap , "Ravi V. Shankar" , Vedvyas Shanbhogue , Dave Martin , Weijiang Yang , Pengfei Xu Subject: Re: [PATCH v19 04/25] x86/cpufeatures: Introduce X86_FEATURE_CET and setup functions Message-ID: <202102041158.9EBAD9392@keescook> References: <20210203225547.32221-1-yu-cheng.yu@intel.com> <20210203225547.32221-5-yu-cheng.yu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210203225547.32221-5-yu-cheng.yu@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 03, 2021 at 02:55:26PM -0800, Yu-cheng Yu wrote: > Introduce a software-defined X86_FEATURE_CET, which indicates either Shadow > Stack or Indirect Branch Tracking (or both) is present. Also introduce > related cpu init/setup functions. > > Signed-off-by: Yu-cheng Yu Reviewed-by: Kees Cook -- Kees Cook