Skip to content

RFC-MDSv1 1

Andi Kleen historical-speck 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4RFC-MDSv1 4Documentation/admin-guide/kernel-parameters.txt arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/msr-index.h +2 more+30 -00 replies
2/4RFC-MDSv1 0arch/x86/entry/calling.h arch/x86/entry/entry_64.S arch/x86/entry/entry_64_compat.S+15 -08 replies
3/4RFC-MDSv1 3arch/x86/include/asm/irqflags.h arch/x86/include/asm/mwait.h arch/x86/include/asm/nospec-branch.h +4 more+36 -00 replies
4/4RFC-MDSv1 2arch/x86/kernel/cpu/bugs.c drivers/base/cpu.c+24 -02 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [MODERATED] [PATCH 0/4] RFC-MDSv1 1

Here's a preview of patches to add VERW support to the Linux for the recently released Coffelake microcode. This allows the kernel to flush CPU buffers on kernel boundaries and when going into idle.

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.

Patches passed some stress testing.

Some notes:
- So far against 4.19
- 64bit only so far. 32bit will be in future versions.
- Some other CPUs will need software sequences. These will be in a future version of the patchkit, and also will require moving some of the hooks.
- One of the MSR bits uses the older name "Microarchitectural Buffer Sampling" (MBS). So far I kept that until that documentation is updated.

Right now this is not to apply, but to discuss and that people can experiment if they want.

Comments welcome.

Andi Kleen (4):
x86/speculation/mds: Add basic bug infrastructre 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

 .../admin-guide/kernel-parameters.txt         |  3 ++
 arch/x86/entry/calling.h                      |  8 ++++
 arch/x86/entry/entry_64.S                     |  6 +++
 arch/x86/entry/entry_64_compat.S              |  1 +
 arch/x86/include/asm/cpufeatures.h            |  2 +
 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          |  5 +++
 arch/x86/kernel/cpu/bugs.c                    | 44 +++++++++++++++++++
 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 +
 drivers/base/cpu.c                            |  8 ++++
 15 files changed, 105 insertions(+)
Signature · 1 line
2.17.2