[PATCH v7 00/18] x86: Enable FSGSBASE instructions

From: Chang S. Bae
Date: Wed May 08 2019 - 13:05:25 EST


Updates from v6 [6]:
* Fix ptracer-induced FS/GSBASE write behavior (Andy)
* Fix GSBASE handling in the NMI path
* Remove local_irq_save/restore() from switch_to()
* Separate things into new patches (from 12th to 9th and 10th)
* Add GSBASE handling in the documentation
* Add more comments for entry changes
* Edit changelog (multiple patches)
(all points by Thomas if not mentioned)

Previous versions: [1-5]

[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
[4] Version 4: https://lore.kernel.org/patchwork/cover/1032799
[5] Version 5: https://lore.kernel.org/patchwork/cover/1038035
[6] Version 6: https://lore.kernel.org/patchwork/cover/1051240

Andi Kleen (3):
x86/fsgsbase/64: Add intrinsics 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 (11):
x86/fsgsbase/64: Fix ARCH_SET_FS/GS behaviors for a remote task
selftests/x86/fsgsbase: Test ptracer-induced GSBASE write
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
x86/entry/64: Add the READ_MSR_GSBASE macro
x86/entry/64: Switch CR3 before SWAPGS on the paranoid entry
x86/fsgsbase/64: Introduce the FIND_PERCPU_BASE macro
x86/fsgsbase/64: GSBASE handling with FSGSBASE in the paranoid path
x86/fsgsbase/64: Document GSBASE handling in the paranoid path
selftests/x86/fsgsbase: Test ptracer-induced GSBASE write with
FSGSBASE

Documentation/admin-guide/kernel-parameters.txt | 2 +
Documentation/process/changes.rst | 6 +-
Documentation/x86/entry_64.txt | 17 +++
Documentation/x86/fsgs.txt | 103 ++++++++++++++
arch/x86/entry/calling.h | 49 +++++++
arch/x86/entry/entry_64.S | 142 ++++++++++++++++---
arch/x86/include/asm/fsgsbase.h | 45 ++++--
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 | 132 +++++++++++++----
arch/x86/kernel/ptrace.c | 14 +-
tools/testing/selftests/x86/fsgsbase.c | 179 +++++++++++++++++++++++-
13 files changed, 660 insertions(+), 69 deletions(-)
create mode 100644 Documentation/x86/fsgs.txt

--
2.7.4