Re: [RFC PATCH] futex: Introduce __vdso_robust_futex_unlock
From: André Almeida
Date: Thu Mar 12 2026 - 14:59:38 EST
Em 12/03/2026 15:40, Mathieu Desnoyers escreveu:
On 2026-03-12 10:04, Mathieu Desnoyers wrote:
On 2026-03-12 09:46, André Almeida wrote:[...]
First because we have FUTEX2_SIZE's, so uaddr could have different size here.
The robust futex ABI defines:
#define FUTEX_OWNER_DIED 0x40000000
#define FUTEX_WAITERS 0x80000000
So how can a robust futex use a uaddr smaller than 32-bit ?
And if the uaddr is 64-bit, I would expect those two values
to be bits 63 and 62 (indexed from 0), but this contradicts
the defines.
What am I missing ?
Oh, I didn't realized that. So, for the current API, robust mutexes need to be 32bit integers. If everyone agrees on that, we can document this and let it be.
In the future we could something like FUTEX_OWNER_DIED_U64 and FUTEX_WAITERS_U64 to make it work correctly. But right now, robust futexes can only work with u32.