From patchwork Tue Dec 29 21:33:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yu-cheng Yu X-Patchwork-Id: 11992721 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=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 C1E07C43217 for ; Tue, 29 Dec 2020 21:34:23 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6E38F223C8 for ; Tue, 29 Dec 2020 21:34:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6E38F223C8 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 E516B8D0066; Tue, 29 Dec 2020 16:34:22 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E2BD98D0065; Tue, 29 Dec 2020 16:34:22 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C5E478D0066; Tue, 29 Dec 2020 16:34:22 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0185.hostedemail.com [216.40.44.185]) by kanga.kvack.org (Postfix) with ESMTP id A94258D0063 for ; Tue, 29 Dec 2020 16:34:22 -0500 (EST) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 7DEC5181AEF07 for ; Tue, 29 Dec 2020 21:34:22 +0000 (UTC) X-FDA: 77647623564.08.linen30_5f0b9462749f Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id 61B331819E76B for ; Tue, 29 Dec 2020 21:34:22 +0000 (UTC) X-HE-Tag: linen30_5f0b9462749f X-Filterd-Recvd-Size: 3459 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by imf40.hostedemail.com (Postfix) with ESMTP for ; Tue, 29 Dec 2020 21:34:21 +0000 (UTC) IronPort-SDR: KPKB/K+lO04ICHqWQVStg6+uC0oW/VmDmDG4wcBcUoJ+I/lpxYxKXbnljnwWINi9Icy3A9JhBK KIbfjoYDoyyw== X-IronPort-AV: E=McAfee;i="6000,8403,9849"; a="156328573" X-IronPort-AV: E=Sophos;i="5.78,459,1599548400"; d="scan'208";a="156328573" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Dec 2020 13:34:19 -0800 IronPort-SDR: xKduQI6vS/Ne/1fhpLN/O3KhP08lmGBsDJGR5yQWcmMKkMqp9M7kEPkdkxQvNVOVhKc0RqffPR qHKPsf+vGvsg== X-IronPort-AV: E=Sophos;i="5.78,459,1599548400"; d="scan'208";a="376190118" Received: from yyu32-desk.sc.intel.com ([143.183.136.146]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Dec 2020 13:34:18 -0800 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 , 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 , Pengfei Xu Cc: Yu-cheng Yu Subject: [PATCH v17 1/7] x86/cet/ibt: Update Kconfig for user-mode Indirect Branch Tracking Date: Tue, 29 Dec 2020 13:33:44 -0800 Message-Id: <20201229213350.17010-2-yu-cheng.yu@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20201229213350.17010-1-yu-cheng.yu@intel.com> References: <20201229213350.17010-1-yu-cheng.yu@intel.com> MIME-Version: 1.0 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: Indirect branch tracking is a hardware security feature that verifies near indirect call/jump instructions arrive at intended targets, which are labeled by the compiler with ENDBR opcodes. If such instructions reach unlabeled locations, the processor raises control-protection faults. Check the compiler is up-to-date at config time. Signed-off-by: Yu-cheng Yu --- arch/x86/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index b26c79c87558..d19f8aa381db 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1961,6 +1961,7 @@ config X86_CET_USER def_bool n depends on CPU_SUP_INTEL && X86_64 depends on AS_WRUSS + depends on $(cc-option,-fcf-protection) select ARCH_USES_HIGH_VMA_FLAGS select ARCH_HAS_SHADOW_STACK select ARCH_MAYBE_MKWRITE