Re: [patch 8/8] x86/vdso: Implement __vdso_futex_robust_try_unlock()
From: Florian Weimer
Date: Tue Mar 17 2026 - 06:38:12 EST
* Thomas Gleixner:
> On Tue, Mar 17 2026 at 09:28, Florian Weimer wrote:
>> * Thomas Gleixner:
>>
>>> Arguably this could be avoided by providing separate functions and making
>>> the IP range for the quick check in the exit to user path cover the whole
>>> text section which contains the two functions. But that's not a win at all
>>> because:
>>>
>>> 1) User space needs to handle the two variants instead of just
>>> relying on a bit which can be saved in the mutex at
>>> initialization time.
>>
>> I'm pretty sure that on the user-space side, we wouldn't have
>> cross-word-size operations (e.g., 64-bit code working on both 64-bit and
>> 32-bit robust mutexes). Certainly not within libcs. The other point
>> about complexity is of course still valid.
>
> Right, I know that no libc implementation supports such an insanity, but
> the kernel unfortunately allows to do so and it's used in the wild :(
>
> So we have to deal with it somehow and the size modifier was the most
> straight forward solution I could come up with. I'm all ears if someone
> has a better idea.
Maybe a separate futex op? And the vDSO would have the futex call,
mangle uaddr2 as required for the shared code section that handles both
ops?
As far as I can tell at this point, the current proposal should work.
We'd probably start with using the syscall-based unlock.
Thanks,
Florian