Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4072055pxu; Mon, 12 Oct 2020 08:47:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwki+aDApp9WkN0dG9KbPrOLgkQCMtd+LHE9buldRMOxmV8l8zs3GLNEXmRcRwzHNAvQAbJ X-Received: by 2002:a17:906:f4f:: with SMTP id h15mr28235129ejj.17.1602517638084; Mon, 12 Oct 2020 08:47:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602517638; cv=none; d=google.com; s=arc-20160816; b=rgm4eiHxtKfLXP3HoQNrK4+Ky79SLRohzV3i1sY3RkQOrJmYD05edMvmk4GydyC2Oa NqP9ezX0qBAYwvAO0vBLI4QqG/rZncEUjoq0HdH6FfL+Aph+9VmGIUt/NlwjU2oiY3Km hML0a4ibZZKty2hh46xbBG/sYUfVl1/C4HfkKXjbS6yW1cKTypuAB7Ys8FLJyEonLobi OnHefT1J8sDiNj9zY2AturzO78JSlgBwAA1BWdPwLhlX8DcXCD9DAKsS2kziOkt01Pdp bKVhMcKn/JPwrawR6SWC/TftJBvQc8Z6iwwIUOGVcdlGobQOuVUs4LIdSvv7bw5HwATe YKdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=C336yYSFw29umUm1LpK8Cf5P7jl8TVrq7FnmujIphek=; b=el4HBmAB1Enks4yBPoE5SMVngDX4j4kCHNwaaHSg3s2FgbkM5YHKh3Il+Xo3vBeRlh gQFT6B5ce0u6qFrMTHwlUnFA8gmsWfCZKtyCRhdQvCSVaFsxNqYhk7z/U2NdwQJ6LFoD W3bAvo09ZD/rf9UX9gHsth5r5POV+lTzL4T+NgtTRvjIzRSuod08kuPajprbiRpttpJA +GOJACabmJ0ja+bSaasaYQBkQ8+Pqc9xlfDUpTUWQ1/rtzdXCfJ3CUv7ap+alaJ9VMP3 kTiN1ymmoYeLjDfuhgB0orP9RmGeS/Znlah+UIt6NhlrIIiCJBrsoNTYFfnTVdxdBBzq /BYQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q9si12910853edn.539.2020.10.12.08.46.53; Mon, 12 Oct 2020 08:47:18 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390344AbgJLPpv (ORCPT + 99 others); Mon, 12 Oct 2020 11:45:51 -0400 Received: from mga07.intel.com ([134.134.136.100]:28363 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389582AbgJLPpu (ORCPT ); Mon, 12 Oct 2020 11:45:50 -0400 IronPort-SDR: LEdm2jFFVWCP697DtktTiCUQBhOxZf1GlvTfxExIfEPW6uKlwipH7et6QNmouahcTnkuL6e7Vr ZcG9v0FfhFIA== X-IronPort-AV: E=McAfee;i="6000,8403,9772"; a="229939271" X-IronPort-AV: E=Sophos;i="5.77,367,1596524400"; d="scan'208";a="229939271" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2020 08:45:49 -0700 IronPort-SDR: 1DwwV6EvQzKBNo45+Jap1U1SiJo47/XJEJutdAOg9xQ6Li3Oa2ENwDGVPfkZ20tt5rZyLyoYk9 wgHkurmM/leA== X-IronPort-AV: E=Sophos;i="5.77,367,1596524400"; d="scan'208";a="530012620" Received: from yyu32-desk.sc.intel.com ([143.183.136.146]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2020 08:45:48 -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 , 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 v14 0/7] Control-flow Enforcement: Indirect Branch Tracking Date: Mon, 12 Oct 2020 08:45:23 -0700 Message-Id: <20201012154530.28382-1-yu-cheng.yu@intel.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 v14: - Drop vsyscall fixup patch, as this needs more discussion and testing. I will send this out separately. [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 v13. https://lkml.kernel.org/r/20200925145804.5821-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 +++ .../arch/x86/include/asm/disabled-features.h | 8 ++- 11 files changed, 140 insertions(+), 8 deletions(-) -- 2.21.0