linux-stable/Documentation/admin-guide/sysctl
Guilherme G. Piccoli bb1878d741 x86/split_lock: Add sysctl to control the misery mode
[ Upstream commit 727209376f ]

Commit b041b525da ("x86/split_lock: Make life miserable for split lockers")
changed the way the split lock detector works when in "warn" mode;
basically, it not only shows the warn message, but also intentionally
introduces a slowdown through sleeping plus serialization mechanism
on such task. Based on discussions in [0], seems the warning alone
wasn't enough motivation for userspace developers to fix their
applications.

This slowdown is enough to totally break some proprietary (aka.
unfixable) userspace[1].

Happens that originally the proposal in [0] was to add a new mode
which would warns + slowdown the "split locking" task, keeping the
old warn mode untouched. In the end, that idea was discarded and
the regular/default "warn" mode now slows down the applications. This
is quite aggressive with regards proprietary/legacy programs that
basically are unable to properly run in kernel with this change.
While it is understandable that a malicious application could DoS
by split locking, it seems unacceptable to regress old/proprietary
userspace programs through a default configuration that previously
worked. An example of such breakage was reported in [1].

Add a sysctl to allow controlling the "misery mode" behavior, as per
Thomas suggestion on [2]. This way, users running legacy and/or
proprietary software are allowed to still execute them with a decent
performance while still observing the warning messages on kernel log.

[0] https://lore.kernel.org/lkml/20220217012721.9694-1-tony.luck@intel.com/
[1] https://github.com/doitsujin/dxvk/issues/2938
[2] https://lore.kernel.org/lkml/87pmf4bter.ffs@tglx/

[ dhansen: minor changelog tweaks, including clarifying the actual
  	   problem ]

Fixes: b041b525da ("x86/split_lock: Make life miserable for split lockers")
Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Tested-by: Andre Almeida <andrealmeid@igalia.com>
Link: https://lore.kernel.org/all/20221024200254.635256-1-gpiccoli%40igalia.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-31 13:31:55 +01:00
..
abi.rst docs: admin-guide: sysctl: avoid using ReST :doc:foo markup 2021-06-17 13:24:36 -06:00
fs.rst Update Documentation/admin-guide/sysctl/fs.rst 2021-01-28 15:45:10 -07:00
index.rst
kernel.rst x86/split_lock: Add sysctl to control the misery mode 2022-12-31 13:31:55 +01:00
net.rst bpf: Use bpf_capable() instead of CAP_SYS_ADMIN for blinding decision 2022-09-16 22:11:57 +02:00
sunrpc.rst
user.rst time/namespace: Add max_time_namespaces ucount 2020-04-07 12:37:21 +02:00
vm.rst userfaultfd: update documentation to describe /dev/userfaultfd 2022-09-11 20:25:49 -07:00