Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2318624imm; Thu, 11 Oct 2018 08:26:36 -0700 (PDT) X-Google-Smtp-Source: ACcGV60+n8JVXYjTd+7TmVmWj2CyskIwZsLNJKym4ReCxmIc2r+zQQbyHqjvL/odON8MwbkME617 X-Received: by 2002:a17:902:b70d:: with SMTP id d13-v6mr2027259pls.44.1539271596906; Thu, 11 Oct 2018 08:26:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539271596; cv=none; d=google.com; s=arc-20160816; b=VzEY/FqtQyzbtI5fEEPLzfmQavPPjXaiQ0dJ5NFRMMlCHd2oEBW+HOTVONIXIDfuwr P72A7IhHrFFz54lD7dHuR6BOo+vP7h19dA1/1mlEuFB4kdlJtkqBJlrHLGm0uig8C8Of 1xwZpHp+yvuOKBP+bHj/aftvws3fIq5IJGPS0HgWn9BiEhDh9u2+hjSxbSYLcju3w5Sq QKpVvYw56Mos6RtbaQbHfVkUl0Mqbm58ytpjYvVl1EzCRmPIzvb3zA6tyLwWIL+WYVXJ lr1/IakgB7wCi+cZcoAix+a/Tmx8ySXSTmJ7ieITzL1+fGFuoRzWsgqaW7tiA+qdIOPH 1A/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=kq1s4ljn8ySoNNOVxya1bPQFU+a5eZQhitgpvlmsRTU=; b=b91Dt3b6+BJJF23misQPLI/fWLU6suTEx1EltQLXL83EDzZD9iKwqIhkiUYUn2CLMp gMZPlJaMQYti7zwzQaRKwh1wEKZIMQguox5TMCALSfq54RsFSuQcQmObFFwFj+4u2aoj ETFC3q89P4eWQkqp2WVDI8z156/kQ/gLrImNIJcEY1WLxnI6zAyhyNyY2Yu2/keoYa0R Vqaxiopb8ynlqGPQ0Ch+2lPJqgxjJeO4VO9wCQ6zortiY9urA6eiRA5ZeFzDkxlC41EB FbVJTYmAPZTCcHRkA8LxKebOkzta375MqRHRV3PPhsaSR/lKr8xvRtF80HK9D6rbyIa+ uUaQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o186-v6si31863386pfo.236.2018.10.11.08.26.22; Thu, 11 Oct 2018 08:26:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727845AbeJKWsV (ORCPT + 99 others); Thu, 11 Oct 2018 18:48:21 -0400 Received: from mga05.intel.com ([192.55.52.43]:3984 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726189AbeJKWsU (ORCPT ); Thu, 11 Oct 2018 18:48:20 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Oct 2018 08:20:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,368,1534834800"; d="scan'208";a="78019075" Received: from 2b52.sc.intel.com ([143.183.136.147]) by fmsmga008.fm.intel.com with ESMTP; 11 Oct 2018 08:20:42 -0700 From: Yu-cheng Yu To: 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 , 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 Cc: Yu-cheng Yu Subject: [PATCH v5 01/27] x86/cpufeatures: Add CPUIDs for Control Flow Enforcement Technology (CET) Date: Thu, 11 Oct 2018 08:14:57 -0700 Message-Id: <20181011151523.27101-2-yu-cheng.yu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181011151523.27101-1-yu-cheng.yu@intel.com> References: <20181011151523.27101-1-yu-cheng.yu@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add CPUIDs for Control Flow Enforcement Technology (CET). CPUID.(EAX=7,ECX=0):ECX[bit 7] Shadow stack CPUID.(EAX=7,ECX=0):EDX[bit 20] Indirect branch tracking Signed-off-by: Yu-cheng Yu --- arch/x86/include/asm/cpufeatures.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h index 89a048c2faec..142b15da06fd 100644 --- a/arch/x86/include/asm/cpufeatures.h +++ b/arch/x86/include/asm/cpufeatures.h @@ -321,6 +321,7 @@ #define X86_FEATURE_PKU (16*32+ 3) /* Protection Keys for Userspace */ #define X86_FEATURE_OSPKE (16*32+ 4) /* OS Protection Keys Enable */ #define X86_FEATURE_AVX512_VBMI2 (16*32+ 6) /* Additional AVX512 Vector Bit Manipulation Instructions */ +#define X86_FEATURE_SHSTK (16*32+ 7) /* Shadow Stack */ #define X86_FEATURE_GFNI (16*32+ 8) /* Galois Field New Instructions */ #define X86_FEATURE_VAES (16*32+ 9) /* Vector AES */ #define X86_FEATURE_VPCLMULQDQ (16*32+10) /* Carry-Less Multiplication Double Quadword */ @@ -341,6 +342,7 @@ #define X86_FEATURE_AVX512_4VNNIW (18*32+ 2) /* AVX-512 Neural Network Instructions */ #define X86_FEATURE_AVX512_4FMAPS (18*32+ 3) /* AVX-512 Multiply Accumulation Single precision */ #define X86_FEATURE_PCONFIG (18*32+18) /* Intel PCONFIG */ +#define X86_FEATURE_IBT (18*32+20) /* Indirect Branch Tracking */ #define X86_FEATURE_SPEC_CTRL (18*32+26) /* "" Speculation Control (IBRS + IBPB) */ #define X86_FEATURE_INTEL_STIBP (18*32+27) /* "" Single Thread Indirect Branch Predictors */ #define X86_FEATURE_FLUSH_L1D (18*32+28) /* Flush L1D cache */ -- 2.17.1