[bionic:linux-azure-4.15][PULL REQUEST] LP#1877425 - linux-azure: Enable FSGSBASE instructions to support SGX

Marcelo Henrique Cerri marcelo.cerri at canonical.com
Fri May 15 19:11:39 UTC 2020


BugLink: http://bugs.launchpad.net/bugs/1877425

The following changes since commit cd6b58b95a2a23466b65e676e05bce3df6b32e33:

  UBUNTU: Ubuntu-azure-4.15-4.15.0-1083.93 (2020-04-30 10:53:28 -0700)

are available in the Git repository at:

  git://git.launchpad.net/~mhcerri/ubuntu/+source/linux/+git/azure azure-4.15-fsgsbase

for you to fetch changes up to 9c2fdd5054467fd7f4ab94b1fa938550d3e52e90:

  UBUNTU: SAUCE: x86/elf: Enumerate kernel FSGSBASE capability in AT_HWCAP2 (2020-05-07 12:21:13 -0300)

----------------------------------------------------------------
Andi Kleen (2):
      UBUNTU: SAUCE: x86/fsgsbase/64: Add intrinsics for FSGSBASE instructions
      UBUNTU: SAUCE: x86/elf: Enumerate kernel FSGSBASE capability in AT_HWCAP2

Andy Lutomirski (8):
      x86/entry/64: Further improve paranoid_entry comments
      selftests/x86/fsgsbase: Test RD/WRGSBASE
      selftests/x86/fsgsbase: Fix some test case bugs
      Revert "x86/ptrace: Prevent ptrace from clearing the FS/GS selector" and fix the test
      UBUNTU: SAUCE: x86/cpu: Add 'unsafe_fsgsbase' to enable CR4.FSGSBASE
      UBUNTU: SAUCE: x86/entry/64: Clean up paranoid exit
      UBUNTU: SAUCE: x86/fsgsbase/64: Use FSGSBASE in switch_to() if available
      UBUNTU: SAUCE: x86/fsgsbase/64: Enable FSGSBASE on 64bit by default and add a chicken bit

Chang S. Bae (17):
      x86/fsgsbase/64: Introduce FS/GS base helper functions
      x86/fsgsbase/64: Make ptrace use the new FS/GS base helpers
      x86/fsgsbase/64: Factor out FS/GS segment loading from __switch_to()
      x86/segments/64: Rename the GDT PER_CPU entry to CPU_NUMBER
      x86/vdso: Introduce helper functions for CPU and node number
      x86/vdso: Initialize the CPU/node NR segment descriptor earlier
      x86/fsgsbase/64: Fix the base write helper functions
      selftests/x86/fsgsbase: Test ptracer-induced GSBASE write
      selftests/x86/fsgsbase: Test ptracer-induced GSBASE write with FSGSBASE
      UBUNTU: SAUCE: x86/ptrace: Prevent ptrace from clearing the FS/GS selector
      UBUNTU: SAUCE: selftests/x86/fsgsbase: Test GS selector on ptracer-induced GS base write
      UBUNTU: SAUCE: x86/entry/64: Switch CR3 before SWAPGS in paranoid entry
      UBUNTU: SAUCE: x86/entry/64: Introduce the FIND_PERCPU_BASE macro
      UBUNTU: SAUCE: x86/entry/64: Handle FSGSBASE enabled paranoid entry/exit
      UBUNTU: SAUCE: x86/fsgsbase/64: Enable FSGSBASE instructions in helper functions
      UBUNTU: SAUCE: x86/fsgsbase/64: Use FSGSBASE instructions on thread copy and ptrace
      UBUNTU: SAUCE: selftests/x86/fsgsbase: Test ptracer-induced GS base write with FSGSBASE

Dave Hansen (1):
      x86/entry: Add some paranoid entry/exit CR3 handling comments

Ingo Molnar (2):
      x86/segments: Introduce the 'CPUNODE' naming to better document the segment limit CPU/node NR trick
      x86/fsgsbase/64: Clean up various details

Tony Luck (1):
      UBUNTU: SAUCE: x86/speculation/swapgs: Check FSGSBASE in enabling SWAPGS mitigation

 Documentation/admin-guide/kernel-parameters.txt |   2 +
 arch/x86/entry/calling.h                        |  40 ++++
 arch/x86/entry/entry_64.S                       | 143 +++++++++---
 arch/x86/entry/vdso/vgetcpu.c                   |   8 +-
 arch/x86/entry/vdso/vma.c                       |  38 +---
 arch/x86/include/asm/fsgsbase.h                 |  83 +++++++
 arch/x86/include/asm/inst.h                     |  15 ++
 arch/x86/include/asm/segment.h                  |  46 +++-
 arch/x86/include/asm/vgtod.h                    |  26 ---
 arch/x86/include/uapi/asm/hwcap2.h              |   3 +
 arch/x86/kernel/cpu/bugs.c                      |   6 +-
 arch/x86/kernel/cpu/common.c                    |  46 ++++
 arch/x86/kernel/process_64.c                    | 281 ++++++++++++++++++++----
 arch/x86/kernel/ptrace.c                        |  75 +------
 tools/testing/selftests/x86/fsgsbase.c          | 225 +++++++++++++++++--
 15 files changed, 798 insertions(+), 239 deletions(-)
 create mode 100644 arch/x86/include/asm/fsgsbase.h

-- 
Regards,
Marcelo

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20200515/2d123848/attachment-0001.sig>


More information about the kernel-team mailing list