Skip to content

SBB 0

Thomas Gleixner historical-speck 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v7 Latest15 patches 34 repliesIn review

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15SBB 1arch/x86/kernel/cpu/common.c+11 -100 replies
2/15SBB 2arch/x86/kernel/cpu/bugs.c+32 -140 replies
3/15SBB 3arch/x86/include/asm/nospec-branch.h arch/x86/kernel/cpu/bugs.c+49 -43 replies
4/15SBB 4arch/x86/include/asm/nospec-branch.h arch/x86/kernel/cpu/bugs.c arch/x86/kvm/svm.c +1 more+32 -80 replies
5/15SBB 5arch/x86/include/asm/cpufeatures.h arch/x86/kernel/cpu/bugs.c arch/x86/kernel/cpu/common.c +2 more+36 -00 replies
6/15SBB 6arch/x86/include/asm/cpufeatures.h+1 -00 replies
7/15SBB 7Documentation/admin-guide/kernel-parameters.txt arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/nospec-branch.h +1 more+143 -00 replies
8/15SBB 8arch/x86/include/asm/msr-index.h arch/x86/kernel/cpu/bugs.c arch/x86/kernel/cpu/common.c +2 more+39 -60 replies
9/15SBB 9arch/x86/kernel/cpu/bugs.c+9 -20 replies
10/15SBB 10arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/nospec-branch.h arch/x86/kernel/cpu/amd.c +1 more+52 -12 replies
11/15SBB 11arch/x86/kvm/cpuid.c arch/x86/kvm/vmx.c+6 -40 replies
12/15SBB 12arch/x86/include/asm/nospec-branch.h arch/x86/include/asm/specctrl.h arch/x86/kernel/cpu/amd.c +3 more+25 -181 reply
13/15SBB 13Documentation/userspace-api/index.rst Documentation/userspace-api/spec_ctrl.rst include/linux/nospec.h +2 more+100 -07 replies
14/15SBB 14arch/x86/include/asm/msr-index.h arch/x86/include/asm/specctrl.h arch/x86/include/asm/thread_info.h +2 more+61 -73 replies
15/15SBB 15Documentation/admin-guide/kernel-parameters.txt arch/x86/include/asm/nospec-branch.h arch/x86/kernel/cpu/bugs.c+76 -510 replies

Reviews trailers per patch

10 of 15 patches have a Reviewed-by or Acked-by.

PatchBorislav PetkovKonrad Rzeszutek Wilk
1/15R-b
2/15R-b
3/15R-b
4/15R-b
5/15R-b
6/15
7/15R-b
8/15R-b
9/15
10/15
11/15
12/15R-b
13/15
14/15R-b
15/15R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v7 thread

Cover letter [patch V7 00/15] SBB 0

This is an update based on Konrads V6 series. The major changes are:

- Distangle the mitigation control from the AMD/Intel cpu init code and keep it confined to bugs.c. That's cleaner and required to make the prctl mode work properly on both AMD and Intel

- Avoid parsing the command line when RDS is not supported at all.

- Make all the spec ctrl msr related variables __ro_after_init instead of read_mostly. Nothing can fiddle with them after boot.

- Integrate the PRCTL:

- Split it up into separate patches

- Use the new scheme as proposed by Jon Masters

- Document the interface and return values

- Implement the context magic as I suggested in the earlier review

- Make it work for both AMD and Intel

- Allow caching of the AMD magic MSR to avoid a RMW in context switch.

- Implement the arch prctl according to the new scheme w/o all the magic nonsense of allowing writes when prctl control is disabled and reusing the existing functions instead of adding yet another pile.

Things which need some thought:

- The default mode for Intel is now PRCTL controlled, which might be OK for enterprise distro stuff. But what is going to happen for the rest of the world? Are the browsers prctl enabled on CRD? I seriously doubt that and I'm pondering to make the default ON for that very reason. We should not require that Joe User has to add magic crap to the kernel command line to get protected. Enterprise admins should know how to do that.

TODOs:
- Make the prctl documentation rst properly formatted
- Write a patch for the prctl(2) man page

Thanks,

tglx

8<--------------

 Documentation/admin-guide/kernel-parameters.txt |   36 ++
 Documentation/userspace-api/index.rst           |    1 
 arch/x86/include/asm/cpufeatures.h              |    4 
 arch/x86/include/asm/msr-index.h                |    3 
 arch/x86/include/asm/nospec-branch.h            |   32 +-
 arch/x86/include/asm/thread_info.h              |    4 
 arch/x86/kernel/cpu/amd.c                       |   21 +
 arch/x86/kernel/cpu/bugs.c                      |  337 +++++++++++++++++++++++-
 arch/x86/kernel/cpu/common.c                    |   47 ++-
 arch/x86/kernel/cpu/cpu.h                       |    2 
 arch/x86/kernel/cpu/intel.c                     |    1 
 arch/x86/kernel/process.c                       |   22 +
 arch/x86/kvm/cpuid.c                            |    2 
 arch/x86/kvm/svm.c                              |    8 
 arch/x86/kvm/vmx.c                              |   16 -
 b/Documentation/userspace-api/spec_ctrl.rst     |   65 ++++
 b/arch/x86/include/asm/specctrl.h               |   38 ++
 drivers/base/cpu.c                              |    8 
 include/linux/cpu.h                             |    2 
 include/linux/nospec.h                          |    5 
 include/uapi/linux/prctl.h                      |   11 
 kernel/sys.c                                    |   18 +
 22 files changed, 638 insertions(+), 45 deletions(-)