Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2314457imm; Thu, 7 Jun 2018 08:38:15 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKNOpQhOpmC50zFZFZa0GeEj9wdaIHI0LjqUTrt4ATYNNaXFUFpuVwTC5J49iNjPnFXKEtu X-Received: by 2002:a17:902:1023:: with SMTP id b32-v6mr2537289pla.145.1528385894984; Thu, 07 Jun 2018 08:38:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528385894; cv=none; d=google.com; s=arc-20160816; b=AOcZ3YKiJPPU6/ZppcOaeyiGm2T5Kph+q9J/sjYVAznvhTF1UUs4AdMt0YuKIPTKrc EPIbiO8WJb3lJq+cB+QehF3H7NFr1LCT7IpI+8sarJzSTzNBXz4g3TL/b5O+BfiMIB/B 7gaoIc76DB+lYebj8jWeXCW/0v6YfAurAfGfkJMGwdzjnKduNfkPJ86DJ92smLNOC4vN u1/qVcuSwsySB/Dcp57915oaSxVnefMFqtxCT5de7RyvaBZLY1Apk5K3POx4YcaqYTlo CSOZcAb2i5lE2ILnpUlWL191aTSpcSNFfxz7IFCfvhdMV9nnhGgWjGefKS8wfZj6Jtf/ szig== 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:arc-authentication-results; bh=KfKcgW2UQWgHEN482vbTcUqEanEfKEbmjeagJ6HIEDw=; b=ZzfaGtz1dWbPm+9amCUlZwUB7uSqpBTKjXv2D3YNNEEFAK5XC9Z4DGXs0RkMdvXqhE 1YaAlOxOB8dfFYfZR3Px+2fJTusp+cUxhcXFZ14W8bFyWPCQhGsBy3Z0JU5sJ54/urGU bLZHaof/hhur5n4d+of+3IDxNDxfCjAlJm2tEtWF1aFpeMojUuN/loIzE24KwQq+bfnM azak3SpASA4Hk/C1OjJ+wT9KIlU947WX1ZuiYRGqi06yeRSD77NfM08HWCj1HdqU0KnH pdj5ZGi4OFIkdfaglJjMplqBOYDdnGUxHebfJCpTnV/Ua9c8bRf9G8OhXj2SfqJOufM9 YoQA== 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 d14-v6si19482314plj.57.2018.06.07.08.38.00; Thu, 07 Jun 2018 08:38:14 -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 S934346AbeFGOmd (ORCPT + 99 others); Thu, 7 Jun 2018 10:42:33 -0400 Received: from mga17.intel.com ([192.55.52.151]:61234 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933255AbeFGOma (ORCPT ); Thu, 7 Jun 2018 10:42:30 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Jun 2018 07:42:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,486,1520924400"; d="scan'208";a="235505938" Received: from 2b52.sc.intel.com ([143.183.136.51]) by fmsmga006.fm.intel.com with ESMTP; 07 Jun 2018 07:42:29 -0700 From: Yu-cheng Yu To: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, x86@kernel.org, "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , "H.J. Lu" , Vedvyas Shanbhogue , "Ravi V. Shankar" , Dave Hansen , Andy Lutomirski , Jonathan Corbet , Oleg Nesterov , Arnd Bergmann , Mike Kravetz Cc: Yu-cheng Yu Subject: [PATCH 1/7] x86/cet: Add Kconfig option for user-mode Indirect Branch Tracking Date: Thu, 7 Jun 2018 07:38:49 -0700 Message-Id: <20180607143855.3681-2-yu-cheng.yu@intel.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180607143855.3681-1-yu-cheng.yu@intel.com> References: <20180607143855.3681-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 The user-mode indirect branch tracking support is done mostly by GCC to insert ENDBR64/ENDBR32 instructions at branch targets. The kernel provides CPUID enumeration, feature MSR setup and the allocation of legacy bitmap. Signed-off-by: Yu-cheng Yu --- arch/x86/Kconfig | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 24339a5299da..27bfbd137fbe 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1953,6 +1953,18 @@ config X86_INTEL_SHADOW_STACK_USER If unsure, say y. +config X86_INTEL_BRANCH_TRACKING_USER + prompt "Intel Indirect Branch Tracking for user-mode" + def_bool n + depends on CPU_SUP_INTEL && X86_64 + select X86_INTEL_CET + select ARCH_HAS_PROGRAM_PROPERTIES + ---help--- + Indirect Branch Tracking provides hardware protection against return-/jmp- + oriented programing attacks. + + If unsure, say y + config EFI bool "EFI runtime service support" depends on ACPI -- 2.15.1