Re: [PATCH 6.0.y / 6.1.y] x86/split_lock: Add sysctl to control the misery mode

From: stsp
Date: Wed Mar 29 2023 - 13:51:44 EST


Hi Sean, thanks for a head-up!

29.03.2023 22:14, Sean Christopherson пишет:
Resurrecting this thread with a concrete use case.
dosemu2, which uses KVM to accelerate DOS emulation (stating the obvious), ran
into a problem where the hardcoded (prior to this patch) behavior will effectively
hang userspace if the 10ms sleep is interrupted, e.g. by a periodic SIGALRM[*].

Yes, and we also created a ready-to-use
host test-case with no dosemu2 involved.

Alternatively, we could try to figure out a way to ensure forward progress without
letting userpace run an end-around on the enforced misery, but backporting this
patch to stable kernels seems easier.

Stas, do you happen to know what the oldest stable kernel your users use, i.e.
how far back this backport would need to go?
It seems, the "broken" code was added by
the patch b041b525dab95 which is "described"
as v5.18-rc4-1-gb041b525dab9.
So I guess the answer would be "down to 5.18".

Of course I don't believe the patch you
mention, is a real solution. Its good for
-stable, but something else needs to be
developed in the future.