[groovy:linux-azure][PULL] Update fsgsbase suport

Marcelo Henrique Cerri marcelo.cerri at canonical.com
Wed Sep 30 17:41:35 UTC 2020


The fsgsbase patches that we carry in linux-azure broke after the
rebase to 5.8. However those patches were recently accepted upstream
for 5.9. This pull request reverts the old patches and apply the new
version currently in the mainline kernel. All the changes are clean
cherry-picks.

However considering this kernel will be constantly rebased on top of
groovy:linux, I recommend that we drop the old patches instead of
applying the reverts. That will probably avoid several conflicts
during the preparation of new version for our regular SRY cycle.

---
The following changes since commit a5d8b6fbcec4975881b47afff8a5c0b12fc295e8:

  UBUNTU: Ubuntu-azure-5.8.0-1006.6 (2020-09-23 10:42:28 +0200)

are available in the Git repository at:

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

for you to fetch changes up to 6d987ef7baf805ef4e0bb22d5b3669ada89052d3:

  x86/fsgsbase: Fix Xen PV support (2020-09-29 15:03:00 -0300)

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

Andy Lutomirski (5):
      x86/cpu: Add 'unsafe_fsgsbase' to enable CR4.FSGSBASE
      x86/process/64: Use FSBSBASE in switch_to() if available
      x86/cpu: Enable FSGSBASE on 64bit by default and add a chicken bit
      x86/ptrace: Fix 32-bit PTRACE_SETREGS vs fsbase and gsbase
      x86/fsgsbase: Fix Xen PV support

Chang S. Bae (8):
      x86/ptrace: Prevent ptrace from clearing the FS/GS selector
      x86/fsgsbase/64: Enable FSGSBASE instructions in helper functions
      x86/process/64: Use FSGSBASE instructions on thread copy and ptrace
      x86/entry/64: Switch CR3 before SWAPGS in paranoid entry
      x86/entry/64: Introduce the FIND_PERCPU_BASE macro
      x86/entry/64: Handle FSGSBASE enabled paranoid entry/exit
      selftests/x86/fsgsbase: Test GS selector on ptracer-induced GS base write
      selftests/x86/fsgsbase: Test ptracer-induced GS base write with FSGSBASE

Marcelo Henrique Cerri (13):
      Revert "UBUNTU: SAUCE: Documentation/x86/64: Add documentation for GS/FS addressing mode"
      Revert "UBUNTU: SAUCE: x86/elf: Enumerate kernel FSGSBASE capability in AT_HWCAP2"
      Revert "UBUNTU: SAUCE: x86/fsgsbase/64: Enable FSGSBASE on 64bit by default and add a chicken bit"
      Revert "UBUNTU: SAUCE: selftests/x86/fsgsbase: Test ptracer-induced GS base write with FSGSBASE"
      Revert "UBUNTU: SAUCE: x86/speculation/swapgs: Check FSGSBASE in enabling SWAPGS mitigation"
      Revert "UBUNTU: SAUCE: x86/fsgsbase/64: Use FSGSBASE in switch_to() if available"
      Revert "UBUNTU: SAUCE: x86/fsgsbase/64: Enable FSGSBASE instructions in helper functions"
      Revert "UBUNTU: SAUCE: x86/fsgsbase/64: Add intrinsics for FSGSBASE instructions"
      Revert "UBUNTU: SAUCE: x86/entry/64: Document GSBASE handling in the paranoid path"
      Revert "UBUNTU: SAUCE: x86/entry/64: Switch CR3 before SWAPGS in paranoid entry"
      Revert "UBUNTU: SAUCE: x86/cpu: Add 'unsafe_fsgsbase' to enable CR4.FSGSBASE"
      Revert "UBUNTU: SAUCE: selftests/x86/fsgsbase: Test GS selector on ptracer-induced GS base write"
      Revert "UBUNTU: SAUCE: x86/ptrace: Prevent ptrace from clearing the FS/GS selector"

Thomas Gleixner (2):
      x86/process/64: Make save_fsgs_for_kvm() ready for FSGSBASE
      Documentation/x86/64: Add documentation for GS/FS addressing mode

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

 Documentation/x86/entry_64.rst                 |   9 -
 arch/x86/entry/calling.h                       |  40 ++++
 arch/x86/entry/entry_64.S                      | 124 ++++++++++---
 arch/x86/include/asm/fsgsbase.h                |   2 +
 arch/x86/include/asm/inst.h                    |  15 ++
 arch/x86/include/asm/processor.h               |   6 +-
 arch/x86/kernel/process.c                      |  10 +-
 arch/x86/kernel/process_64.c                   | 119 +++++++-----
 arch/x86/kernel/ptrace.c                       |  43 +++--
 arch/x86/kvm/vmx/vmx.c                         |   2 +-
 tools/testing/selftests/x86/Makefile           |   2 +-
 tools/testing/selftests/x86/fsgsbase_restore.c | 245 +++++++++++++++++++++++++
 12 files changed, 511 insertions(+), 106 deletions(-)
 create mode 100644 tools/testing/selftests/x86/fsgsbase_restore.c

-- 
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/20200930/39910682/attachment-0001.sig>


More information about the kernel-team mailing list