From patchwork Tue Nov 10 16:24:41 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: 11894811 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 402111391 for ; Tue, 10 Nov 2020 16:25:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0311220780 for ; Tue, 10 Nov 2020 16:25:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0311220780 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 1DF036B005D; Tue, 10 Nov 2020 11:25:06 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 1B4AF6B0068; Tue, 10 Nov 2020 11:25:06 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0A4936B0070; Tue, 10 Nov 2020 11:25:06 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0047.hostedemail.com [216.40.44.47]) by kanga.kvack.org (Postfix) with ESMTP id D0CB96B005D for ; Tue, 10 Nov 2020 11:25:05 -0500 (EST) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 7C8081EE6 for ; Tue, 10 Nov 2020 16:25:05 +0000 (UTC) X-FDA: 77469032970.03.cork60_1109f97272f6 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin03.hostedemail.com (Postfix) with ESMTP id 557E728A4E8 for ; Tue, 10 Nov 2020 16:25:05 +0000 (UTC) X-Spam-Summary: 1,0,0,,d41d8cd98f00b204,yu-cheng.yu@intel.com,,RULES_HIT:30054:30055:30056:30064:30070:30074,0,RBL:134.134.136.24:@intel.com:.lbl8.mailshell.net-62.18.0.100 64.95.201.95;04yr1uoe9fd7zq19jw81ext8uegtkyp51nqhwpbydrbxw1h14pn4qjz1dqg99hh.bkgwr7ct4xne6qb78wtug7hgq3o9tihoemafmowf4mpouzbxsgg6k6nepmmybtx.h-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:ft,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:69,LUA_SUMMARY:none X-HE-Tag: cork60_1109f97272f6 X-Filterd-Recvd-Size: 4384 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by imf42.hostedemail.com (Postfix) with ESMTP for ; Tue, 10 Nov 2020 16:25:04 +0000 (UTC) IronPort-SDR: RQDlyAgKChTSGoV5lS2eadUqI67/YY6OEssuk9Q3GvoB1AhDN25ssZis/ax7gvunsm9g5FSIOg GLFscbdNsyRg== X-IronPort-AV: E=McAfee;i="6000,8403,9801"; a="170160133" X-IronPort-AV: E=Sophos;i="5.77,466,1596524400"; d="scan'208";a="170160133" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Nov 2020 08:25:02 -0800 IronPort-SDR: Rlg+98E3D0zvrpO8W9IDHJlIzwCXgco7nrYFOSoWHHWa0JP2giWKG0O9ihCdAfeE79xuu4SYb3 tXibfJ1vAMYw== X-IronPort-AV: E=Sophos;i="5.77,466,1596524400"; d="scan'208";a="308469023" Received: from yyu32-desk.sc.intel.com ([143.183.136.146]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Nov 2020 08:25:02 -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 v15 0/7] Control-flow Enforcement: Indirect Branch Tracking Date: Tue, 10 Nov 2020 08:24:41 -0800 Message-Id: <20201110162448.9846-1-yu-cheng.yu@intel.com> X-Mailer: git-send-email 2.21.0 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: Control-flow Enforcement (CET) is a new Intel processor feature that blocks return/jump-oriented programming attacks. Details are in "Intel 64 and IA-32 Architectures Software Developer's Manual" [1]. This is the second part of CET and enables Indirect Branch Tracking (IBT). It is built on top of the shadow stack series. Changes in v15: - Rebase to v5.10-rc3. - Remove changes to tools/arch/x86/include/ files. [1] Intel 64 and IA-32 Architectures Software Developer's Manual: https://software.intel.com/en-us/download/intel-64-and-ia-32- architectures-sdm-combined-volumes-1-2a-2b-2c-2d-3a-3b-3c-3d-and-4 [2] Indirect Branch Tracking patches v14: https://lkml.kernel.org/r/20201012154530.28382-1-yu-cheng.yu@intel.com/ H.J. Lu (3): x86/cet/ibt: Update arch_prctl functions for Indirect Branch Tracking x86/vdso/32: Add ENDBR32 to __kernel_vsyscall entry point x86/vdso: Insert endbr32/endbr64 to vDSO Yu-cheng Yu (4): x86/cet/ibt: Add Kconfig option for user-mode Indirect Branch Tracking x86/cet/ibt: User-mode Indirect Branch Tracking support x86/cet/ibt: Handle signals for Indirect Branch Tracking x86/cet/ibt: ELF header parsing for Indirect Branch Tracking arch/x86/Kconfig | 21 +++++++++ arch/x86/entry/vdso/Makefile | 4 ++ arch/x86/entry/vdso/vdso32/system_call.S | 3 ++ arch/x86/include/asm/cet.h | 3 ++ arch/x86/include/asm/disabled-features.h | 8 +++- arch/x86/kernel/cet.c | 60 +++++++++++++++++++++++- arch/x86/kernel/cet_prctl.c | 8 +++- arch/x86/kernel/cpu/common.c | 17 +++++++ arch/x86/kernel/fpu/signal.c | 8 ++-- arch/x86/kernel/process_64.c | 8 ++++ 10 files changed, 133 insertions(+), 7 deletions(-)