From mboxrd@z Thu Jan 1 00:00:00 1970 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=-3.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,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 0E6F0C43387 for ; Wed, 16 Jan 2019 22:50:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DA90E20840 for ; Wed, 16 Jan 2019 22:50:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387936AbfAPWu3 (ORCPT ); Wed, 16 Jan 2019 17:50:29 -0500 Received: from mga02.intel.com ([134.134.136.20]:57462 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387465AbfAPWtI (ORCPT ); Wed, 16 Jan 2019 17:49:08 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Jan 2019 14:49:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,487,1539673200"; d="scan'208";a="117288373" Received: from chang-linux-2.sc.intel.com ([10.3.52.165]) by fmsmga008.fm.intel.com with ESMTP; 16 Jan 2019 14:49:07 -0800 From: "Chang S. Bae" To: Andy Lutomirski , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , Andi Kleen Cc: Dave Hansen , Markus T Metzger , Ravi Shankar , "Chang S . Bae" , LKML Subject: [PATCH v4 00/13] x86: Enable FSGSBASE instructions Date: Wed, 16 Jan 2019 14:48:36 -0800 Message-Id: <20190116224849.8617-1-chang.seok.bae@intel.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Update from v3 [3]: * Raise minimum binutils requirement to use the new instructions directly * Optimize FIND_PERCPU_BASE macro * Rename some helper functions, __{rd,wr}gsbase_inactive() * Use NOKPROBE_SYMBOL instead of __kprobes Update from v2 [2]: * Separate out the preparatory patches [11] (now merged to the tip) * Bisect the paranoid_entry update patch * Edit minor nits Updates from v1 [1]: * Update the GSBASE update mechanism on the paranoid entry/exit. * Exclude ptracer backward compatibility patches. * Include FSGSBASE documentation and enumerating capability for user space * Add the TAINT_INSECURE flag. [1] Version 1: https://lore.kernel.org/patchwork/cover/934843 [2] Version 2: https://lore.kernel.org/patchwork/cover/912063 [3] Version 3: https://lore.kernel.org/patchwork/cover/1002725 Andi Kleen (3): x86/fsgsbase/64: Add intrinsics/macros for FSGSBASE instructions x86/elf: Enumerate kernel FSGSBASE capability in AT_HWCAP2 x86/fsgsbase/64: Add documentation for FSGSBASE Andy Lutomirski (4): x86/fsgsbase/64: Add 'unsafe_fsgsbase' to enable CR4.FSGSBASE x86/fsgsbase/64: Preserve FS/GS state in __switch_to() if FSGSBASE is on selftests/x86/fsgsbase: Test WRGSBASE x86/fsgsbase/64: Enable FSGSBASE by default and add a chicken bit Chang S. Bae (6): taint: Introduce a new taint flag (insecure) kbuild: Raise the minimum required binutils version to 2.21 x86/fsgsbase/64: Enable FSGSBASE instructions in the helper functions x86/fsgsbase/64: When copying a thread, use the FSGSBASE instructions if available x86/fsgsbase/64: Introduce the FIND_PERCPU_BASE macro x86/fsgsbase/64: Use the per-CPU base as GSBASE at the paranoid_entry .../admin-guide/kernel-parameters.txt | 2 + Documentation/process/changes.rst | 6 +- Documentation/sysctl/kernel.txt | 1 + Documentation/x86/fsgs.txt | 104 +++++++++++++++ arch/x86/entry/entry_64.S | 71 ++++++++-- arch/x86/include/asm/fsgsbase.h | 126 ++++++++++++++++-- arch/x86/include/asm/inst.h | 15 +++ arch/x86/include/uapi/asm/hwcap2.h | 3 + arch/x86/kernel/cpu/common.c | 22 +++ arch/x86/kernel/process_64.c | 108 +++++++++++++-- include/linux/kernel.h | 3 +- kernel/panic.c | 1 + tools/testing/selftests/x86/fsgsbase.c | 102 +++++++++++++- 13 files changed, 523 insertions(+), 41 deletions(-) create mode 100644 Documentation/x86/fsgs.txt -- 2.19.1