Files
linux-stable-mirror/include/uapi/linux
Thomas Gleixner bf22a69768 futex: Provide FUTEX_LOCK_PI2 to support clock selection
The FUTEX_LOCK_PI futex operand uses a CLOCK_REALTIME based absolute
timeout since it was implemented, but it does not require that the
FUTEX_CLOCK_REALTIME flag is set, because that was introduced later.

In theory as none of the user space implementations can set the
FUTEX_CLOCK_REALTIME flag on this operand, it would be possible to
creatively abuse it and make the meaning invers, i.e. select CLOCK_REALTIME
when not set and CLOCK_MONOTONIC when set. But that's a nasty hackery.

Another option would be to have a new FUTEX_CLOCK_MONOTONIC flag only for
FUTEX_LOCK_PI, but that's also awkward because it does not allow libraries
to handle the timeout clock selection consistently.

So provide a new FUTEX_LOCK_PI2 operand which implements the timeout
semantics which the other operands use and leave FUTEX_LOCK_PI alone.

Reported-by: Kurt Kanzenbach <kurt@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20210422194705.440773992@linutronix.de
2021-06-22 16:42:09 +02:00
..
2021-01-25 18:44:44 +01:00
2020-12-28 14:21:31 +00:00
2021-02-09 10:58:19 +01:00
2021-04-19 15:27:36 -07:00
2021-03-04 17:58:15 -08:00
2021-02-08 13:01:24 +01:00
2021-02-26 09:41:03 -08:00
2021-03-23 23:40:55 -04:00
2021-03-10 09:34:06 +01:00
2021-01-24 14:43:45 +01:00
2021-04-02 14:21:50 -07:00
2021-01-16 23:19:26 +01:00
2021-03-10 09:34:06 +01:00
2021-01-07 16:17:32 +01:00