[GIT pull] x86/splitlock for v5.7

From: Thomas Gleixner
Date: Mon Mar 30 2020 - 10:50:07 EST


Linus,

please pull the latest x86/splitlock branch from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-splitlock-2020-03-30

up to: a6a60741035b: x86/split_lock: Avoid runtime reads of the TEST_CTRL MSR

Support for "split lock" detection:

- Atomic operations (lock prefixed instructions) which span two cache
lines have to acquire the global bus lock. This is at least 1k cycles
slower than an atomic operation within a cache line and disrupts
performance on other cores. Aside of performance disruption this is
a unpriviledged form of DoS.

Some newer CPUs have the capability to raise an #AC trap when such an
operation is attempted. The detection is by default enabled in warning
mode which will warn once when a user space application is caught. A
command line option allows to disable the detection or to select fatal
mode which will terminate offending applications with SIGBUS.

Thanks,

tglx

------------------>
Peter Zijlstra (Intel) (1):
x86/split_lock: Enable split lock detection by kernel

Xiaoyao Li (2):
x86/split_lock: Rework the initialization flow of split lock detection
x86/split_lock: Avoid runtime reads of the TEST_CTRL MSR


Documentation/admin-guide/kernel-parameters.txt | 22 +++
arch/x86/include/asm/cpu.h | 12 ++
arch/x86/include/asm/cpufeatures.h | 2 +
arch/x86/include/asm/msr-index.h | 9 ++
arch/x86/include/asm/thread_info.h | 4 +-
arch/x86/kernel/cpu/common.c | 2 +
arch/x86/kernel/cpu/intel.c | 183 ++++++++++++++++++++++++
arch/x86/kernel/process.c | 3 +
arch/x86/kernel/traps.c | 24 +++-
9 files changed, 258 insertions(+), 3 deletions(-)