Skip to content

MDSv2 8

Andi Kleen historical-speck 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest8 patches 50 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8MDSv2 4Documentation/admin-guide/kernel-parameters.txt arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/msr-index.h +2 more+30 -04 replies
2/8MDSv2 1arch/x86/entry/calling.h arch/x86/entry/entry_64.S arch/x86/entry/entry_64_compat.S +1 more+19 -013 replies
3/8MDSv2 5arch/x86/include/asm/irqflags.h arch/x86/include/asm/mwait.h arch/x86/include/asm/nospec-branch.h +4 more+41 -022 replies
4/8MDSv2 0Documentation/ABI/testing/sysfs-devices-system-cpu arch/x86/kernel/cpu/bugs.c drivers/base/cpu.c+25 -03 replies
5/8MDSv2 7Documentation/admin-guide/kernel-parameters.txt arch/x86/include/asm/cpufeatures.h arch/x86/kernel/cpu/bugs.c +2 more+176 -34 replies
6/8MDSv2 3arch/x86/entry/entry_64.S+8 -04 replies
7/8MDSv2 6arch/x86/include/asm/nospec-branch.h arch/x86/kernel/cpu/bugs.c arch/x86/kvm/vmx.c+19 -30 replies
8/8MDSv2 2arch/x86/entry/entry_32.S+5 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [MODERATED] [PATCH v2 0/8] MDSv2 8

Here's support for flushing CPU buffers on kernel exit or going idle for group 4. This prevents leaking any data in the non SMT case.

This either uses the VERW instruction using the recently released microcode updates, or using software sequences for some platforms.

This mainly covers single thread, not SMT (except for the idle case).

I lumped all the issues together under the Microarchitectural Data Sampling (MDS) name because they need the same mitigations,a and it doesn't seem worth duplicating the sysfs files and bug entries.

Some notes:
- Against 4.20-rc5
- There's a (bogus) build time warning from objtool about unreachable code.
- No support for Xeon Phi so far.

Changes against previous version:
- Added software sequences
- Various fixes and cleanups.

Andi Kleen (8):
x86/speculation/mds: Add basic bug infrastructure for MDS x86/speculation/mds: Clear CPU buffers on kernel exit for 64bit x86/speculation/mds: Clear CPU buffers on entering idle x86/speculation/mds: Add sysfs reporting x86/speculation/mds: Add software sequences for older CPUs. x86/speculation/mds: Force MDS_EXIT on paranoid exit for sw sequence x86/speculation/mds: Call software sequences on KVM entry x86/speculation/mds: Clear buffers on kernel exit for 32bit kernels

 .../ABI/testing/sysfs-devices-system-cpu      |   1 +
 .../admin-guide/kernel-parameters.txt         |  13 +++
 arch/x86/entry/calling.h                      |   2 +
 arch/x86/entry/entry_32.S                     |   5 +
 arch/x86/entry/entry_64.S                     |  16 +++
 arch/x86/entry/entry_64_compat.S              |   1 +
 arch/x86/include/asm/cpufeatures.h            |   4 +
 arch/x86/include/asm/irqflags.h               |   3 +
 arch/x86/include/asm/msr-index.h              |   1 +
 arch/x86/include/asm/mwait.h                  |   4 +
 arch/x86/include/asm/nospec-branch.h          |  14 +++
 arch/x86/kernel/cpu/bugs.c                    | 109 ++++++++++++++++++
 arch/x86/kernel/cpu/common.c                  |  14 +++
 arch/x86/kernel/kvm.c                         |   1 +
 arch/x86/kernel/process.c                     |   4 +
 arch/x86/kernel/smpboot.c                     |   1 +
 arch/x86/kvm/vmx.c                            |   8 ++
 arch/x86/lib/Makefile                         |   1 +
 arch/x86/lib/clear_cpu.S                      | 107 +++++++++++++++++
 drivers/base/cpu.c                            |   8 ++
 20 files changed, 317 insertions(+)
 create mode 100644 arch/x86/lib/clear_cpu.S
Signature · 1 line
2.17.2